]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
Don't include .note.gnu.build-id in the digest
authorDavid Howells <dhowells@redhat.com>
Wed, 11 Nov 2009 20:47:42 +0000 (15:47 -0500)
committerMaxim Uvarov <maxim.uvarov@oracle.com>
Wed, 12 Oct 2011 01:13:22 +0000 (18:13 -0700)
Don't include the .note.gnu.build-id ELF note in the digest as it's altered by debugedit.

Signed-off-by: Aristeu Rozanski <arozansk@redhat.com>
Signed-off-by: Chris Mason <chris.mason@oracle.com>
(cherry picked from commit 99a2f2fb5f9146139b71d3a7165c42d43ab0d978)

Signed-off-by: Greg Marsden <greg.marsden@oracle.com>
kernel/module-verify-sig.c
scripts/mod/mod-extract.c

index b0511e0227df00a2a78ab750993102e1e4625307..9810ee32b3680c895e4ce746dfd61dcd8d8b2a7e 100644 (file)
@@ -213,6 +213,11 @@ int module_verify_signature(struct module_verify_data *mvdata,
                        continue;
                }
 
+               /* ignore gcc's build ID section as it seems to get modified by
+                * the build process */
+               if (strcmp(sh_name, ".note.gnu.build-id") == 0)
+                       continue;
+
                /* include allocatable loadable sections */
                if (sh_type != SHT_NOBITS && sh_flags & SHF_ALLOC)
                        goto include_section;
index 8b36a11c6ad167f7360e30c448bcc2b7ac0ba0cb..0922e3a9bb8f2cb681560a6c014c2cf101307d12 100644 (file)
@@ -510,6 +510,11 @@ static void extract_elf64(void *buffer, size_t len, Elf64_Ehdr *hdr)
                        continue;
                }
 
+               /* ignore gcc's build ID section as it seems to get modified by
+                * the build process */
+               if (strcmp(sh_name, ".note.gnu.build-id") == 0)
+                       continue;
+
                /* include allocatable loadable sections */
                if (sh_type != SHT_NOBITS && sh_flags & SHF_ALLOC)
                        goto include_section;
@@ -861,6 +866,11 @@ static void extract_elf32(void *buffer, size_t len, Elf32_Ehdr *hdr)
                        continue;
                }
 
+               /* ignore gcc's build ID section as it seems to get modified by
+                * the build process */
+               if (strcmp(sh_name, ".note.gnu.build-id") == 0)
+                       continue;
+
                /* include allocatable loadable sections */
                if (sh_type != SHT_NOBITS && sh_flags & SHF_ALLOC)
                        goto include_section;