rpms/kernel/F-13 kbuild-fix-modpost-segfault.patch, NONE, 1.1 kernel.spec, 1.2089, 1.2090

Chuck Ebbert cebbert at fedoraproject.org
Fri Jul 9 12:04:38 UTC 2010


Author: cebbert

Update of /cvs/pkgs/rpms/kernel/F-13
In directory cvs01.phx2.fedoraproject.org:/tmp/cvs-serv5676

Modified Files:
	kernel.spec 
Added Files:
	kbuild-fix-modpost-segfault.patch 
Log Message:
Fix modpost segfault when building kernels. (#595915)

kbuild-fix-modpost-segfault.patch:
 modpost.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- NEW FILE kbuild-fix-modpost-segfault.patch ---
From: Krzysztof Halasa <khc at pm.waw.pl>
Date: Thu, 10 Jun 2010 23:08:20 +0000 (+0200)
Subject: kbuild: Fix modpost segfault
X-Git-Url: http://git.kernel.org/?p=linux%2Fkernel%2Fgit%2Ftorvalds%2Flinux-2.6.git;a=commitdiff_plain;h=1c938663d58b5b2965976a6f54cc51b5d6f691aa

kbuild: Fix modpost segfault

Alan <alan at clueserver.org> writes:

> program: /home/alan/GitTrees/linux-2.6-mid-ref/scripts/mod/modpost -o
> Module.symvers -S vmlinux.o
>
> Program received signal SIGSEGV, Segmentation fault.

It just hit me.
It's the offset calculation in reloc_location() which overflows:
        return (void *)elf->hdr + sechdrs[section].sh_offset +
               (r->r_offset - sechdrs[section].sh_addr);

E.g. for the first rodata r entry:
r->r_offset < sechdrs[section].sh_addr
and the expression in the parenthesis produces 0xFFFFFFE0 or something
equally wise.

Reported-by: Alan <alan at clueserver.org>
Signed-off-by: Krzysztof Hałasa <khc at pm.waw.pl>
Tested-by: Alan <alan at clueserver.org>
Signed-off-by: Michal Marek <mmarek at suse.cz>
---

diff --git a/scripts/mod/modpost.c b/scripts/mod/modpost.c
index 3318692..f877900 100644
--- a/scripts/mod/modpost.c
+++ b/scripts/mod/modpost.c
@@ -1342,7 +1342,7 @@ static unsigned int *reloc_location(struct elf_info *elf,
 	int section = sechdr->sh_info;
 
 	return (void *)elf->hdr + sechdrs[section].sh_offset +
-		(r->r_offset - sechdrs[section].sh_addr);
+		r->r_offset - sechdrs[section].sh_addr;
 }
 
 static int addend_386_rel(struct elf_info *elf, Elf_Shdr *sechdr, Elf_Rela *r)


Index: kernel.spec
===================================================================
RCS file: /cvs/pkgs/rpms/kernel/F-13/kernel.spec,v
retrieving revision 1.2089
retrieving revision 1.2090
diff -u -p -r1.2089 -r1.2090
--- kernel.spec	9 Jul 2010 10:41:58 -0000	1.2089
+++ kernel.spec	9 Jul 2010 12:04:38 -0000	1.2090
@@ -753,6 +753,7 @@ Patch12110: ata-generic-implement-ata-ge
 Patch12200: x86-debug-send-sigtrap-for-user-icebp.patch
 Patch12210: ethtool-fix-buffer-overflow.patch
 Patch12220: sched-fix-over-scheduling-bug.patch
+Patch12230: kbuild-fix-modpost-segfault.patch
 
 %endif
 
@@ -1384,6 +1385,9 @@ ApplyPatch ethtool-fix-buffer-overflow.p
 # fix performance problem with CGROUPS
 ApplyPatch sched-fix-over-scheduling-bug.patch
 
+# fix modpost segfault during kernel build (#595915)
+ApplyPatch kbuild-fix-modpost-segfault.patch
+
 # END OF PATCH APPLICATIONS
 
 %endif
@@ -2003,6 +2007,9 @@ fi
 
 
 %changelog
+* Fri Jul 09 2010 Chuck Ebbert <cebbert at redhat.com>  2.6.34.1-6
+- Fix modpost segfault when building kernels. (#595915)
+
 * Fri Jul 09 2010 Chuck Ebbert <cebbert at redhat.com>  2.6.34.1-5
 - pci-change-error-messages-to-kern-info.patch:
   Use new upstream patch to silence more useless messages.
@@ -2020,6 +2027,124 @@ fi
 - Initial commit of 2.6.34 for F-13
 - Previous history is in the branch private-f14-2_6_34
 
+* Wed Jul 07 2010 Chuck Ebbert <cebbert at redhat.com>
+- pci-acpi-disable-aspm-if-no-osc.patch, pci-aspm-dont-enable-too-early.patch
+  PCI layer fixes for problems with hardware that doesn't support ASPM.
+
+* Wed Jul 07 2010 Chuck Ebbert <cebbert at redhat.com>
+- attempt to fix hibernate on Intel GPUs (kernel.org #13811) (RHBZ#537494)
+
+* Wed Jul 07 2010 Chuck Ebbert <cebbert at redhat.com>
+- Let ata_generic handle SATA interface on new MacBook Pro (#608034)
+
+* Tue Jul 06 2010 Chuck Ebbert <cebbert at redhat.com>
+- Re-enable options: DYNAMIC_FTRACE, FUNCTION_TRACER and STACK_TRACER
+
+* Tue Jul 06 2010 Chuck Ebbert <cebbert at redhat.com>
+- Linux 2.6.34.1
+
+* Thu Jul 01 2010 Chuck Ebbert <cebbert at redhat.com>
+- Linux 2.6.34.1-rc1
+- Drop patches merged upstream:
+    btrfs-should-add-permission-check-for-setfacl.patch (CVE-2010-2071)
+    iwlwifi-recalculate-average-tpt-if-not-current.patch
+    iwlwifi-fix-internal-scan-race.patch
+- Revert DRM patches we already have:
+    drm-i915-rebind-bo-if-currently-bound-with-incorrect-alignment.patch
+    drm-radeon-fix-the-r100-r200-ums-block-0-page-fix.patch
+    drm-radeon-r100-r200-ums-block-ability-for-userspace-app-to-trash-0-page-and-beyond.patch
+    drm-radeon-kms-atom-fix-typo-in-lvds-panel-info-parsing.patch
+    drm-radeon-kms-reset-ddc_bus-in-object-header-parsing.patch
+    drm-edid-fix-1024x768-85hz.patch
+    drm-i915-reject-bind_to_gtt-early-if-object-aperture.patch
+    drm-i915-fix-82854-pci-id-and-treat-it-like-other-85x.patch
+- Revert broken -stable patch:
+    perf-fix-endianness-argument-compatibility-with-opt_boolean-and-introduce-opt_incr.patch
+
+* Wed Jun 30 2010 Kyle McMartin <kyle at redhat.com>
+- Disable MRST on x86 here as well.
+
+* Tue Jun 29 2010 Kyle McMartin <kyle at redhat.com>
+- i915-fix-crt-hotplug-regression.patch: copy from rawhide.
+
+* Mon Jun 28 2010 Chuck Ebbert <cebbert at redhat.com>
+- ppc64: enable active memory sharing and DLPAR memory remove (#607175)
+
+* Mon Jun 28 2010 Chuck Ebbert <cebbert at redhat.com>
+- Copy fix for BZ#220892 from F-13.
+
+* Fri Jun 25 2010 Kyle McMartin <kyle at redhat.com>
+- drm-i915-fix-edp-panels.patch: copy from rawhide.
+
+* Mon Jun 21 2010 Dave Jones <davej at redhat.com>
+- Disable workaround for obscure SMP pentium pro errata.
+  I miss the 1990s too, but it's time to move on.
+  If anyone actually needs this it would be better done using
+  the apply_alternatives infrastructure.
+
+* Mon Jun 21 2010 Kyle McMartin <kyle at redhat.com>
+- drm-revert-drm-fbdev-rework-output-polling-to-be-back-in-core.patch
+  Revert eb1f8e4f, bisected by Nicolas Kaiser. Thanks! (rhbz#599190)
+  (If this works, will try to root-cause.)
+- rebase previous patch on top of above reversion
+
+* Mon Jun 21 2010 Kyle McMartin <kyle at redhat.com>
+- revert-drm-kms-toggle-poll-around-switcheroo.patch (rhbz#599190)
+
+* Thu Jun 17 2010 Kyle McMartin <kyle at redhat.com>
+- Suck in patch from Dave Miller in 2.6.35 to add async hash testing,
+  hopefully fixes error from previous commit. (But making it modular
+  is still a good idea.)
+
+* Thu Jun 17 2010 Kyle McMartin <kyle at redhat.com>
+- make ghash-clmulni modular to get rid of early boot noise (rhbz#586954)
+  (not a /fix/ but it should at least quiet boot down a bit if you have
+   the cpu support)
+
+* Wed Jun 16 2010 Kyle McMartin <kyle at redhat.com>
+- Snag some more DRM commits into drm-next.patch that I missed the first
+  time.
+- Fix up radeon_pm toggle to work with the upstream code.
+
+* Tue Jun 15 2010 Prarit Bhargava <prarit at redhat.com>
+- Turn off CONFIG_I2O on x86.
+  It is broken on 64-bit address spaces (i686/PAE, x86_64), and frankly, I'm
+  having trouble finding anyone who actually uses it.
+
+* Tue Jun 15 2010 Kyle McMartin <kyle at redhat.com>
+- Fix build by nuking superfluous "%{expand" which was missing a
+  trailing '}'. You may now reward me with an array of alcoholic
+  beverages, I so richly deserve for spending roughly a full
+  day staring at the diff of the spec.
+
+* Mon Jun 14 2010 Kyle McMartin <kyle at redhat.com>
+- btrfs ACL fixes from CVE-2010-2071.
+
+* Sun Jun 13 2010 Kyle McMartin <kyle at redhat.com>
+- remunge and reapply hdpvr-ir-enable
+
+* Sun Jun 13 2010 Kyle McMartin <kyle at redhat.com>
+- mac80211/iwlwifi fix connections to some APs (rhbz#558002)
+  patches from sgruszka at .
+
+* Sun Jun 13 2010 Kyle McMartin <kyle at redhat.com>
+- Provide a knob to enable radeon_pm to allow users to test
+  that functionality. Add radeon.pm=1 to your kernel cmdline
+  in order to enable it. (It still defaults to off though.)
+
+* Sun Jun 13 2010 Kyle McMartin <kyle at redhat.com>
+- Update drm-next to include fixes since 2.6.35-rc1.
+
+* Fri Jun 11 2010 Justin M. Forbes <jforbes at redhat.com>
+- Disable xsave for so that kernel will boot on ancient EC2 hosts.
+
+* Wed Jun 09 2010 John W. Linville <linville at redhat.com>
+- Disable rt20xx and rt35xx chipset support in rt2800 drivers (#570869)
+
+* Wed Jun 09 2010 David Woodhouse <David.Woodhouse at intel.com>
+- Include PHY modules in modules.networking (#602155)
+
+
 ###
 # The following Emacs magic makes C-c C-e use UTC dates.
 # Local Variables:



More information about the scm-commits mailing list