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-prev] [day] [month] [year] [list]
Message-ID: <tip-4a1a8e1b8f9f37bdbba416eb0a5ff3f47d31cb28@git.kernel.org>
Date:	Wed, 27 Jul 2016 10:10:00 -0700
From:	tip-bot for Borislav Petkov <tipbot@...or.com>
To:	linux-tip-commits@...r.kernel.org
Cc:	hpa@...or.com, linux-kernel@...r.kernel.org, tglx@...utronix.de,
	torvalds@...ux-foundation.org, peterz@...radead.org,
	keescook@...omium.org, bp@...e.de, thgarnie@...gle.com,
	mingo@...nel.org, nicstange@...il.com
Subject: [tip:x86/microcode] x86/asm, x86/microcode: Add __PAGE_OFFSET_BASE
 define on 32-bit

Commit-ID:  4a1a8e1b8f9f37bdbba416eb0a5ff3f47d31cb28
Gitweb:     http://git.kernel.org/tip/4a1a8e1b8f9f37bdbba416eb0a5ff3f47d31cb28
Author:     Borislav Petkov <bp@...e.de>
AuthorDate: Wed, 27 Jul 2016 14:09:39 +0200
Committer:  Ingo Molnar <mingo@...nel.org>
CommitDate: Wed, 27 Jul 2016 14:59:59 +0200

x86/asm, x86/microcode: Add __PAGE_OFFSET_BASE define on 32-bit

... in order to avoid #ifdeffery in code computing the ASLR randomization
offset. Remove that #ifdeffery in the microcode loader.

Suggested-by: Kees Cook <keescook@...omium.org>
Signed-off-by: Borislav Petkov <bp@...e.de>
Cc: Linus Torvalds <torvalds@...ux-foundation.org>
Cc: Nicolai Stange <nicstange@...il.com>
Cc: Peter Zijlstra <peterz@...radead.org>
Cc: Thomas Garnier <thgarnie@...gle.com>
Cc: Thomas Gleixner <tglx@...utronix.de>
Link: http://lkml.kernel.org/r/20160727120939.GA18911@nazgul.tnic
Signed-off-by: Ingo Molnar <mingo@...nel.org>
---
 arch/x86/include/asm/page_32_types.h  | 3 ++-
 arch/x86/kernel/cpu/microcode/intel.c | 2 --
 2 files changed, 2 insertions(+), 3 deletions(-)

diff --git a/arch/x86/include/asm/page_32_types.h b/arch/x86/include/asm/page_32_types.h
index 3a52ee0..3bae496 100644
--- a/arch/x86/include/asm/page_32_types.h
+++ b/arch/x86/include/asm/page_32_types.h
@@ -13,7 +13,8 @@
  * If you want more physical memory than this then see the CONFIG_HIGHMEM4G
  * and CONFIG_HIGHMEM64G options in the kernel configuration.
  */
-#define __PAGE_OFFSET		_AC(CONFIG_PAGE_OFFSET, UL)
+#define __PAGE_OFFSET_BASE	_AC(CONFIG_PAGE_OFFSET, UL)
+#define __PAGE_OFFSET		__PAGE_OFFSET_BASE
 
 #define __START_KERNEL_map	__PAGE_OFFSET
 
diff --git a/arch/x86/kernel/cpu/microcode/intel.c b/arch/x86/kernel/cpu/microcode/intel.c
index 0f97ae9..cdc0dea 100644
--- a/arch/x86/kernel/cpu/microcode/intel.c
+++ b/arch/x86/kernel/cpu/microcode/intel.c
@@ -818,13 +818,11 @@ void load_ucode_intel_ap(void)
 	if (blobs_p->valid) {
 		start = blobs_p->start;
 
-#ifdef CONFIG_RANDOMIZE_MEMORY
 		/*
 		 * Pay attention to CONFIG_RANDOMIZE_MEMORY=y as it shuffles
 		 * physmem mapping too and there we have the initrd.
 		 */
 		start += PAGE_OFFSET - __PAGE_OFFSET_BASE;
-#endif
 	}
 
 	collect_cpu_info_early(&uci);

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ