[kernel] r18108 - in dists/trunk/linux-2.6/debian: . patches/bugfix/x86 patches/series

Ben Hutchings benh at alioth.debian.org
Wed Sep 21 04:39:27 UTC 2011


Author: benh
Date: Wed Sep 21 04:39:25 2011
New Revision: 18108

Log:
[i386] Fix alignment of alternative instruction entries (Closes: #640964)

Added:
   dists/trunk/linux-2.6/debian/patches/bugfix/x86/x86-32-Fix-alignment-of-alternative-instruction-entr.patch
Modified:
   dists/trunk/linux-2.6/debian/changelog
   dists/trunk/linux-2.6/debian/patches/series/base

Modified: dists/trunk/linux-2.6/debian/changelog
==============================================================================
--- dists/trunk/linux-2.6/debian/changelog	Tue Sep 20 22:53:38 2011	(r18107)
+++ dists/trunk/linux-2.6/debian/changelog	Wed Sep 21 04:39:25 2011	(r18108)
@@ -6,6 +6,7 @@
   * [ia64] Disable GENERIC_GPIO (fixes FTBFS)
   * [i386] libertas: prioritize usb8388_olpc.bin firmware on OLPC machines
   * [armel/ixp4xx] Add gpioblib support (fixes FTBFS)
+  * [i386] Fix alignment of alternative instruction entries (Closes: #640964)
 
  -- Ben Hutchings <ben at decadent.org.uk>  Mon, 05 Sep 2011 04:18:43 +0100
 

Added: dists/trunk/linux-2.6/debian/patches/bugfix/x86/x86-32-Fix-alignment-of-alternative-instruction-entr.patch
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ dists/trunk/linux-2.6/debian/patches/bugfix/x86/x86-32-Fix-alignment-of-alternative-instruction-entr.patch	Wed Sep 21 04:39:25 2011	(r18108)
@@ -0,0 +1,37 @@
+From: Ben Hutchings <ben at decadent.org.uk>
+Date: Wed, 21 Sep 2011 04:55:14 +0100
+Subject: [PATCH] x86-32: Fix alignment of alternative instruction entries
+
+The altinstruction_entry macro was originally used only on x86-64,
+and assumed 64-bit pointers and alignment.
+
+Commit b4ca46e4e82a0a5976fe5eab85be585d75f8202f ("x86-32: Fix boot
+with CONFIG_X86_INVD_BUG") introduced a use of the macro on x86-32.
+Before this, the 64-bit pointers had been replaced by 32-bit offsets,
+so it worked - in at least one case.  However, the alignment is still
+wrong for x86-32, which can result in zero-padding between entries and
+a BUG in apply_alternatives.
+
+Reported-by: Andres Salomon <dilinger at queued.net>
+References: http://bugs.debian.org/640964
+Signed-off-by: Ben Hutchings <ben at decadent.org.uk>
+---
+ arch/x86/include/asm/alternative-asm.h |    2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+diff --git a/arch/x86/include/asm/alternative-asm.h b/arch/x86/include/asm/alternative-asm.h
+index 4554cc6..d00dc2a 100644
+--- a/arch/x86/include/asm/alternative-asm.h
++++ b/arch/x86/include/asm/alternative-asm.h
+@@ -16,7 +16,7 @@
+ #endif
+ 
+ .macro altinstruction_entry orig alt feature orig_len alt_len
+-	.align 8
++	_ASM_ALIGN
+ 	.long \orig - .
+ 	.long \alt - .
+ 	.word \feature
+-- 
+1.7.5.4
+

Modified: dists/trunk/linux-2.6/debian/patches/series/base
==============================================================================
--- dists/trunk/linux-2.6/debian/patches/series/base	Tue Sep 20 22:53:38 2011	(r18107)
+++ dists/trunk/linux-2.6/debian/patches/series/base	Wed Sep 21 04:39:25 2011	(r18108)
@@ -44,3 +44,4 @@
 + bugfix/ia64/ia64-gpio-GENERIC_GPIO-default-must-be-n.patch
 + features/x86/libertas-prioritize-usb8388_olpc.bin-firmware-on-OLPC-machines.patch
 + bugfix/arm/ARM-ixp4xx-gpiolib-support.patch
++ bugfix/x86/x86-32-Fix-alignment-of-alternative-instruction-entr.patch



More information about the Kernel-svn-changes mailing list