Re: [Rpm-maint] [PATCH 5/5] Fix handling of zero-length file digests
On 04/27/2016 11:00 PM, Stefan Berger wrote: "Rpm-maint" wrote on 04/27/2016 05:45:56 AM: I get the following warning: ima.c:23:1: warning: ‘PACKED’ attribute directive ignored [-Wattributes] } __attribute__((PACKED)); May be there is an simpler way to check for the header being zeros only? One way of doing it would be to create an array of 9 zero bytes (with a comment of what it represents) and compare against that. Yes, and there's precedent for that in rpm, at least: http://rpm.org/gitweb?p=rpm.git;a=blob;f=rpmio/rpmkeyring.c;h=ac3e3bc5ab4cc240318605e2f82797872f19604e;hb=HEAD#l218 I guess you wouldn't like gcc #pragma tricks to disable -Wattributes in this case. Compiler specifics are nasty, no need for that here because there's a simple, standard solution. - Panu - ___ Rpm-maint mailing list Rpm-maint@lists.rpm.org http://lists.rpm.org/mailman/listinfo/rpm-maint
Re: [Rpm-maint] [PATCH 5/5] Fix handling of zero-length file digests
"Rpm-maint" wrote on 04/27/2016 05:45:56 AM: > > I get the following warning: > > ima.c:23:1: warning: ‘PACKED’ attribute directive ignored [-Wattributes] > } __attribute__((PACKED)); > > May be there is an simpler way to check for the header being zeros only? One way of doing it would be to create an array of 9 zero bytes (with a comment of what it represents) and compare against that. I guess you wouldn't like gcc #pragma tricks to disable -Wattributes in this case. Stefan > > Florian > > -- > > Red Hat GmbH, http://www.de.redhat.com/, Registered seat: Grasbrunn, > Commercial register: Amtsgericht Muenchen, HRB 153243, > Managing Directors: Paul Argiry, Charles Cachera, Michael Cunningham, > Michael O'Neill > ___ > Rpm-maint mailing list > Rpm-maint@lists.rpm.org > http://lists.rpm.org/mailman/listinfo/rpm-maint > ___ Rpm-maint mailing list Rpm-maint@lists.rpm.org http://lists.rpm.org/mailman/listinfo/rpm-maint
Re: [Rpm-maint] [PATCH 4/5] Extend header size to 64MB due to file signatures
"Rpm-maint" wrote on 04/27/2016 05:50:54 AM: > > Well changing header size limit needs a bit more thought. The main > problem is that packages with bigger header will look broken on older > rpm versions and the usual way of dealing with this (adding rpmlib() > Requires) won't work it needs reading the header. These huge headers are only occurring in a few very large packages and only if one applies the per-file signatures. So most users probably won't notice. > > Also I wonder if we should increase the header size even more, to get > rid of this topic for a longer time. I thought about 256MB which gives a > 4 times increase over the 16MB. I am kinda tempted to go even further. > Otoh the limit is there for a reason. And having rpm chew through one GB > of broken data doesn't sound like a pleasant experience. Anything >=16 MB works with signed files for all packages in Fedora 23. Let me know if you want me to resubmit the patch with a higher limit. Stefan > > Florian > > -- > > Red Hat GmbH, http://www.de.redhat.com/, Registered seat: Grasbrunn, > Commercial register: Amtsgericht Muenchen, HRB 153243, > Managing Directors: Paul Argiry, Charles Cachera, Michael Cunningham, > Michael O'Neill > ___ > Rpm-maint mailing list > Rpm-maint@lists.rpm.org > http://lists.rpm.org/mailman/listinfo/rpm-maint > ___ Rpm-maint mailing list Rpm-maint@lists.rpm.org http://lists.rpm.org/mailman/listinfo/rpm-maint
Re: [Rpm-maint] [PATCH 4/5] Extend header size to 64MB due to file signatures
Well changing header size limit needs a bit more thought. The main problem is that packages with bigger header will look broken on older rpm versions and the usual way of dealing with this (adding rpmlib() Requires) won't work it needs reading the header. Also I wonder if we should increase the header size even more, to get rid of this topic for a longer time. I thought about 256MB which gives a 4 times increase over the 16MB. I am kinda tempted to go even further. Otoh the limit is there for a reason. And having rpm chew through one GB of broken data doesn't sound like a pleasant experience. Florian -- Red Hat GmbH, http://www.de.redhat.com/, Registered seat: Grasbrunn, Commercial register: Amtsgericht Muenchen, HRB 153243, Managing Directors: Paul Argiry, Charles Cachera, Michael Cunningham, Michael O'Neill ___ Rpm-maint mailing list Rpm-maint@lists.rpm.org http://lists.rpm.org/mailman/listinfo/rpm-maint
Re: [Rpm-maint] [PATCH 5/5] Fix handling of zero-length file digests
I get the following warning: ima.c:23:1: warning: ‘PACKED’ attribute directive ignored [-Wattributes] } __attribute__((PACKED)); May be there is an simpler way to check for the header being zeros only? Florian -- Red Hat GmbH, http://www.de.redhat.com/, Registered seat: Grasbrunn, Commercial register: Amtsgericht Muenchen, HRB 153243, Managing Directors: Paul Argiry, Charles Cachera, Michael Cunningham, Michael O'Neill ___ Rpm-maint mailing list Rpm-maint@lists.rpm.org http://lists.rpm.org/mailman/listinfo/rpm-maint
Re: [Rpm-maint] [PATCH 0/5] Fix issues related to signed files
On 04/26/2016 12:33 AM, Stefan Berger wrote: > This series of patches fixes several issues related to signed files > produced by rpmsign. Thanks for the patches I already pushed the first few. Florian -- Red Hat GmbH, http://www.de.redhat.com/, Registered seat: Grasbrunn, Commercial register: Amtsgericht Muenchen, HRB 153243, Managing Directors: Paul Argiry, Charles Cachera, Michael Cunningham, Michael O'Neill ___ Rpm-maint mailing list Rpm-maint@lists.rpm.org http://lists.rpm.org/mailman/listinfo/rpm-maint