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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <20090212124938.657A73E666E@basil.firstfloor.org>
Date:	Thu, 12 Feb 2009 13:49:38 +0100 (CET)
From:	Andi Kleen <andi@...stfloor.org>
To:	akpm@...ux-foundation.org, mingo@...e.hu, tglx@...utronix.de,
	hpa@...or.com, linux-kernel@...r.kernel.org
Subject: [PATCH] [9/9] x86: CMCI: Recheck CMCI banks after APIC has been enabled on CPU #0


One the first CPU the machine checks are enabled early before
the local APIC is enabled. This could in theory lead 
to some lost CMCI events very early during boot because
CMCIs cannot be delivered with disabled LAPIC. 

The poller also doesn't recover from this because it doesn't
check CMCI banks.

Add an explicit CMCI banks check after the LAPIC is enabled.
This is only done for CPU #0, the other CPUs only initialize
machine checks after the LAPIC is on.

Signed-off-by: Andi Kleen <ak@...ux.intel.com>

---
 arch/x86/kernel/apic.c |    7 +++++++
 1 file changed, 7 insertions(+)

Index: linux/arch/x86/kernel/apic.c
===================================================================
--- linux.orig/arch/x86/kernel/apic.c	2009-02-12 12:03:15.000000000 +0100
+++ linux/arch/x86/kernel/apic.c	2009-02-12 12:03:15.000000000 +0100
@@ -48,6 +48,7 @@
 #include <asm/apic.h>
 #include <asm/i8259.h>
 #include <asm/smp.h>
+#include <asm/mce.h>
 
 #include <mach_apic.h>
 #include <mach_apicdef.h>
@@ -1270,6 +1271,12 @@
 	apic_write(APIC_LVT1, value);
 
 	preempt_enable();
+
+#ifdef CONFIG_X86_MCE_INTEL
+	/* Recheck CMCI information after local APIC is up on CPU #0 */
+	if (smp_processor_id() == 0)
+		cmci_recheck();
+#endif
 }
 
 void __cpuinit end_local_APIC_setup(void)
--
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