Update modsign patch to latest upstream

This commit is contained in:
Josh Boyer 2012-07-18 14:04:10 -04:00
parent 5e516250e5
commit 5a0e7f0b45
3 changed files with 2263 additions and 1403 deletions

View File

@ -62,7 +62,7 @@ Summary: The Linux kernel
# For non-released -rc kernels, this will be appended after the rcX and # For non-released -rc kernels, this will be appended after the rcX and
# gitX tags, so a 3 here would become part of release "0.rcX.gitX.3" # gitX tags, so a 3 here would become part of release "0.rcX.gitX.3"
# #
%global baserelease 1 %global baserelease 2
%global fedora_build %{baserelease} %global fedora_build %{baserelease}
# base_sublevel is the kernel version we're starting with and patching # base_sublevel is the kernel version we're starting with and patching
@ -672,8 +672,7 @@ Patch700: linux-2.6-e1000-ich9-montevina.patch
Patch800: linux-2.6-crash-driver.patch Patch800: linux-2.6-crash-driver.patch
# crypto/ # crypto/
Patch900: modsign-20120510.patch Patch900: modsign-20120718.patch
Patch901: modsign-fix-elf-rel.patch
# virt + ksm patches # virt + ksm patches
Patch1555: fix_xen_guest_on_old_EC2.patch Patch1555: fix_xen_guest_on_old_EC2.patch
@ -1377,8 +1376,7 @@ ApplyPatch linux-2.6-crash-driver.patch
ApplyPatch linux-2.6-e1000-ich9-montevina.patch ApplyPatch linux-2.6-e1000-ich9-montevina.patch
# crypto/ # crypto/
ApplyPatch modsign-20120510.patch ApplyPatch modsign-20120718.patch
ApplyPatch modsign-fix-elf-rel.patch
# Assorted Virt Fixes # Assorted Virt Fixes
ApplyPatch fix_xen_guest_on_old_EC2.patch ApplyPatch fix_xen_guest_on_old_EC2.patch
@ -2300,6 +2298,9 @@ fi
# ||----w | # ||----w |
# || || # || ||
%changelog %changelog
* Wed Jul 18 2012 Josh Boyer <jwboyer@redhat.com>
- Update modsign patch to latest upstream
* Wed Jul 18 2012 Justin M. Forbes <jforbes@redhat.com> - 3.5.0-0.rc7.git2.1 * Wed Jul 18 2012 Justin M. Forbes <jforbes@redhat.com> - 3.5.0-0.rc7.git2.1
- Linux v3.5-rc7-81-ga018540 - Linux v3.5-rc7-81-ga018540

File diff suppressed because it is too large Load Diff

View File

@ -1,26 +0,0 @@
--- a/kernel/module-verify.c
+++ a/kernel/module-verify.c
@@ -391,16 +391,19 @@ static int extract_elf_rel(struct module_verify_data *mvdata,
#endif
} __packed relocation;
+ const Elf_Shdr *relsec, *symsec, *strsec;
const Elf_Rel *reloc;
const Elf_Sym *symbols, *symbol;
const char *strings;
unsigned long r_sym;
size_t nsyms, loop;
- nsyms = mvdata->sections[secix].sh_size / sizeof(Elf_Sym);
- symbols = mvdata->buffer + mvdata->sections[secix].sh_offset;
- strings = mvdata->buffer +
- mvdata->sections[mvdata->sections[secix].sh_link].sh_offset;
+ relsec = &mvdata->sections[secix];
+ symsec = &mvdata->sections[relsec->sh_link];
+ strsec = &mvdata->sections[symsec->sh_link];
+ nsyms = symsec->sh_size / sizeof(Elf_Sym);
+ symbols = mvdata->buffer + symsec->sh_offset;
+ strings = mvdata->buffer + strsec->sh_offset;
/* Contribute the relevant bits from a join of
* { REL, SYMBOL, SECTION }