misc/134586: Incorrect machine check exception handler test

Andi Kleen andi-fbsd at firstfloor.org
Sat May 16 19:00:10 UTC 2009

>Number:         134586
>Category:       misc
>Synopsis:       Incorrect machine check exception handler test
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          open
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sat May 16 19:00:09 UTC 2009
>Originator:     Andi Kleen
>Release:        code review of HEAD 090516
Intel OTC
Obvious bug found during code reading of the x86 machine check handler.

Machine check exceptions don't check for UC and PCC because the OVER
check always overwrites the check mask.  Obviously the OVER assignment
should be a or.

See the attached patch for a fix.

I think there are more problems, but that seems to be the most serious

Trigger a uncorrected memory error (e.g. hair dryer on DIMMs on a system with ECC memory) See if the system panics.

Apply patch.

Patch attached with submission follows:

Index: i386/i386/mca.c
--- i386/i386/mca.c	(revision 192202)
+++ i386/i386/mca.c	(working copy)
@@ -346,7 +346,7 @@
 	/* When handling a MCE#, treat the OVER flag as non-restartable. */
 	if (mcip)
-		ucmask = MC_STATUS_OVER;
+		ucmask |= MC_STATUS_OVER;
 	mcg_cap = rdmsr(MSR_MCG_CAP);
 	for (i = 0; i < (mcg_cap & MCG_CAP_COUNT); i++) {
 		rec = mca_record_entry(i);


More information about the freebsd-bugs mailing list