lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date:	Wed, 21 Sep 2011 05:45:13 +0100
From:	Ben Hutchings <ben@...adent.org.uk>
To:	Thomas Gleixner <tglx@...utronix.de>,
	Ingo Molnar <mingo@...hat.com>,
	"H. Peter Anvin" <hpa@...or.com>
Cc:	LKML <linux-kernel@...r.kernel.org>,
	Andres Salomon <dilinger@...ued.net>,
	Andy Lutomirski <luto@....edu>,
	Arnaud Lacombe <lacombar@...il.com>
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@...ued.net>
References: http://bugs.debian.org/640964
Signed-off-by: Ben Hutchings <ben@...adent.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


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists