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] [thread-next>] [day] [month] [year] [list]
Message-Id: <1433436928-31903-20-git-send-email-bp@alien8.de>
Date:	Thu,  4 Jun 2015 18:55:27 +0200
From:	Borislav Petkov <bp@...en8.de>
To:	Ingo Molnar <mingo@...nel.org>
Cc:	LKML <linux-kernel@...r.kernel.org>
Subject: [PATCH 19/20] x86/microcode: Disable builtin microcode loading on 32-bit for now

From: Borislav Petkov <bp@...e.de>

Andy Shevchenko reported machine freezes when booting latest tip on
x32 setups. Problem is, the builtin microcode handling cannot really
work that early, when we haven't even enabled paging. A proper fix
would involve handling that case specially as every other early 32-bit
boot case in the microcode loader and would require much more involved
changes for which it is too late now, more than a week before the
upcoming merge window.

So, disable the builtin microcode loading only on 32-bit for now.

Reported-and-tested-by: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
Cc: Mika Westerberg <mika.westerberg@...ux.intel.com>
Cc: <x86@...nel.org>
Link: http://lkml.kernel.org/r/1433257003-159485-1-git-send-email-andriy.shevchenko@linux.intel.com
Signed-off-by: Borislav Petkov <bp@...e.de>
---
 arch/x86/kernel/cpu/microcode/amd_early.c   | 4 ++++
 arch/x86/kernel/cpu/microcode/intel_early.c | 4 ++++
 2 files changed, 8 insertions(+)

diff --git a/arch/x86/kernel/cpu/microcode/amd_early.c b/arch/x86/kernel/cpu/microcode/amd_early.c
index 9208a36d0f03..9243cd839829 100644
--- a/arch/x86/kernel/cpu/microcode/amd_early.c
+++ b/arch/x86/kernel/cpu/microcode/amd_early.c
@@ -230,6 +230,7 @@ static void apply_ucode_in_initrd(void *ucode, size_t size, bool save_patch)
 
 static bool __init load_builtin_amd_microcode(struct cpio_data *cp, int family)
 {
+#ifdef CONFIG_X86_64
 	char fw_name[36] = "amd-ucode/microcode_amd.bin";
 
 	if (family >= 0x15)
@@ -237,6 +238,9 @@ static bool __init load_builtin_amd_microcode(struct cpio_data *cp, int family)
 			 "amd-ucode/microcode_amd_fam%.2xh.bin", family);
 
 	return get_builtin_firmware(cp, fw_name);
+#else
+	return false;
+#endif
 }
 
 void __init load_ucode_amd_bsp(int family)
diff --git a/arch/x86/kernel/cpu/microcode/intel_early.c b/arch/x86/kernel/cpu/microcode/intel_early.c
index 10dff3f3f686..b4858d892592 100644
--- a/arch/x86/kernel/cpu/microcode/intel_early.c
+++ b/arch/x86/kernel/cpu/microcode/intel_early.c
@@ -523,6 +523,7 @@ EXPORT_SYMBOL_GPL(save_mc_for_early);
 
 static bool __init load_builtin_intel_microcode(struct cpio_data *cp)
 {
+#ifdef CONFIG_X86_64
 	u32 eax = 0x00000001, ebx, ecx = 0, edx;
 	int family, model, stepping;
 	char name[30];
@@ -536,6 +537,9 @@ static bool __init load_builtin_intel_microcode(struct cpio_data *cp)
 	sprintf(name, "intel-ucode/%02x-%02x-%02x", family, model, stepping);
 
 	return get_builtin_firmware(cp, name);
+#else
+	return false;
+#endif
 }
 
 static __initdata char ucode_name[] = "kernel/x86/microcode/GenuineIntel.bin";
-- 
2.3.5

--
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

Powered by Openwall GNU/*/Linux Powered by OpenVZ