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>] [day] [month] [year] [list]
Message-Id: <4E835FE30200007800058464@nat28.tlf.novell.com>
Date:	Wed, 28 Sep 2011 16:56:51 +0100
From:	"Jan Beulich" <JBeulich@...e.com>
To:	<mingo@...e.hu>, <tglx@...utronix.de>, <hpa@...or.com>
Cc:	<linux-kernel@...r.kernel.org>
Subject: [PATCH, resend] x86-64: don't apply destructive erratum
	 workaround on unaffected CPUs

Erratum 93 applies to AMD K8 CPUs only, and its workaround (forcing
the upper 32 bits of %rip to all get set under certain conditions) is
actually getting in the way of analyzing page faults occurring during
EFI physical mode runtime calls (in particular the page table walk
shown is completely unrelated to the actual fault). This is because
typically EFI runtime code lives in the space between 2G and 4G, which
- modulo the above manipulation - is likely to overlap with the kernel
or modules area.

While even for the other errata workarounds their taking effect could
be limited to just the affected CPUs, none of them appears to be
destructive, and they're generally getting called only outside of
performance critical paths, so they're being left untouched.

Signed-off-by: Jan Beulich <jbeulich@...e.com>

---
 arch/x86/mm/fault.c |    8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

--- 3.1-rc8/arch/x86/mm/fault.c
+++ 3.1-rc8-x86_64-amd-erratum93/arch/x86/mm/fault.c
@@ -420,12 +420,14 @@ static noinline __kprobes int vmalloc_fa
 	return 0;
 }
 
+#ifdef CONFIG_CPU_SUP_AMD
 static const char errata93_warning[] =
 KERN_ERR 
 "******* Your BIOS seems to not contain a fix for K8 errata #93\n"
 "******* Working around it, but it may cause SEGVs or burn power.\n"
 "******* Please consider a BIOS update.\n"
 "******* Disabling USB legacy in the BIOS may also help.\n";
+#endif
 
 /*
  * No vm86 mode in 64-bit mode:
@@ -505,7 +507,11 @@ bad:
  */
 static int is_errata93(struct pt_regs *regs, unsigned long address)
 {
-#ifdef CONFIG_X86_64
+#if defined(CONFIG_X86_64) && defined(CONFIG_CPU_SUP_AMD)
+	if (boot_cpu_data.x86_vendor != X86_VENDOR_AMD
+	    || boot_cpu_data.x86 != 0xf)
+		return 0;
+
 	if (address != regs->ip)
 		return 0;
 



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