Patch "x86/MCE/AMD: Always give panic severity for UC errors in kernel context" has been added to the 4.14-stable tree
Subsystems (3)
This is a note to let you know that I've just added the patch titled
x86/MCE/AMD: Always give panic severity for UC errors in kernel context
to the 4.14-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary
The filename of the patch is:
x86-mce-amd-always-give-panic-severity-for-uc-errors-in-kernel-context.patch
and it can be found in the queue-4.14 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree, please let <[email protected]> know about it.
From d65dfc81bb3894fdb68cbc74bbf5fb48d2354071 Mon Sep 17 00:00:00 2001
From: Yazen Ghannam <[email protected]>
Date: Mon, 6 Nov 2017 18:46:32 +0100
Subject: x86/MCE/AMD: Always give panic severity for UC errors in kernel context
From: Yazen Ghannam <[email protected]>
commit d65dfc81bb3894fdb68cbc74bbf5fb48d2354071 upstream.
The AMD severity grading function was introduced in kernel 4.1. The current logic can possibly give MCE_AR_SEVERITY for uncorrectable errors in kernel context. The system may then get stuck in a loop as memory_failure() will try to handle the bad kernel memory and find it busy.
Return MCE_PANIC_SEVERITY for all UC errors IN_KERNEL context on AMD systems.
After:
b2f9d678e28c ("x86/mce: Check for faults tagged in EXTABLE_CLASS_FAULT exception table entries")
was accepted in v4.6, this issue was masked because of the tail-end attempt at kernel mode recovery in the #MC handler.
However, uncorrectable errors IN_KERNEL context should always be considered unrecoverable and cause a panic.
--- arch/x86/kernel/cpu/mcheck/mce-severity.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-)
Patches currently in stable-queue which might be from [email protected] are
queue-4.14/x86-mce-amd-always-give-panic-severity-for-uc-errors-in-kernel-context.patch --
To unsubscribe from this list: send the line "unsubscribe linux-edac" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
arch/x86/kernel/cpu/mcheck/mce-severity.c +3 -4
@@ -245,6 +245,9 @@ static int mce_severity_amd(struct mce *if (m->status &MCI_STATUS_UC ) { +if (ctx ==IN_KERNEL ) +return MCE_PANIC_SEVERITY ; +/* * On older systems where overflow_recov flag is not present, we * should simply panic if an error overflow occurs. If
@@ -255,10 +258,6 @@ static int mce_severity_amd(struct mce *if (mce_flags.smca)return mce_severity_amd_smca (m, ctx); -/* software can try to contain */ -if (!(m->mcgstatus &MCG_STATUS_RIPV ) && (ctx ==IN_KERNEL )) -return MCE_PANIC_SEVERITY ; -/* kill current process */ return MCE_AR_SEVERITY ; }else {