summaryrefslogtreecommitdiff
path: root/0009-x86-mce-Fix-possibly-incorrect-severity-calculation-on-AMD.patch
diff options
context:
space:
mode:
authorjc_gargma <jc_gargma@iserlohn-fortress.net>2019-12-25 12:49:33 -0800
committerjc_gargma <jc_gargma@iserlohn-fortress.net>2019-12-25 12:49:33 -0800
commitcbcd97695580fd7fcb5467b7d37881c301b8783c (patch)
tree967fe370acda3a0d31f15a978720c1dc2a811436 /0009-x86-mce-Fix-possibly-incorrect-severity-calculation-on-AMD.patch
parentChecksums (diff)
downloadlinux-ck-cbcd97695580fd7fcb5467b7d37881c301b8783c.tar.xz
Rebuild with hotfixes
Diffstat (limited to '0009-x86-mce-Fix-possibly-incorrect-severity-calculation-on-AMD.patch')
-rw-r--r--0009-x86-mce-Fix-possibly-incorrect-severity-calculation-on-AMD.patch46
1 files changed, 46 insertions, 0 deletions
diff --git a/0009-x86-mce-Fix-possibly-incorrect-severity-calculation-on-AMD.patch b/0009-x86-mce-Fix-possibly-incorrect-severity-calculation-on-AMD.patch
new file mode 100644
index 0000000..0904cdd
--- /dev/null
+++ b/0009-x86-mce-Fix-possibly-incorrect-severity-calculation-on-AMD.patch
@@ -0,0 +1,46 @@
+From 583bb4015fc2279dc8e482dacb9ba30bcb738be1 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Jan=20H=2E=20Sch=C3=B6nherr?= <jschoenh@amazon.de>
+Date: Tue, 10 Dec 2019 01:07:30 +0100
+Subject: x86/mce: Fix possibly incorrect severity calculation on AMD
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+The function mce_severity_amd_smca() requires m->bank to be initialized
+for correct operation. Fix the one case, where mce_severity() is called
+without doing so.
+
+Fixes: 6bda529ec42e ("x86/mce: Grade uncorrected errors for SMCA-enabled systems")
+Fixes: d28af26faa0b ("x86/MCE: Initialize mce.bank in the case of a fatal error in mce_no_way_out()")
+Signed-off-by: Jan H. Schönherr <jschoenh@amazon.de>
+Signed-off-by: Borislav Petkov <bp@suse.de>
+Reviewed-by: Tony Luck <tony.luck@intel.com>
+Cc: "H. Peter Anvin" <hpa@zytor.com>
+Cc: Ingo Molnar <mingo@kernel.org>
+Cc: linux-edac <linux-edac@vger.kernel.org>
+Cc: <stable@vger.kernel.org>
+Cc: Thomas Gleixner <tglx@linutronix.de>
+Cc: x86-ml <x86@kernel.org>
+Cc: Yazen Ghannam <Yazen.Ghannam@amd.com>
+Link: https://lkml.kernel.org/r/20191210000733.17979-4-jschoenh@amazon.de
+---
+ arch/x86/kernel/cpu/mce/core.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/arch/x86/kernel/cpu/mce/core.c b/arch/x86/kernel/cpu/mce/core.c
+index 743370ee4983..aecb15ba66cd 100644
+--- a/arch/x86/kernel/cpu/mce/core.c
++++ b/arch/x86/kernel/cpu/mce/core.c
+@@ -814,8 +814,8 @@ static int mce_no_way_out(struct mce *m, char **msg, unsigned long *validp,
+ if (quirk_no_way_out)
+ quirk_no_way_out(i, m, regs);
+
++ m->bank = i;
+ if (mce_severity(m, mca_cfg.tolerant, &tmp, true) >= MCE_PANIC_SEVERITY) {
+- m->bank = i;
+ mce_read_aux(m, i);
+ *msg = tmp;
+ return 1;
+--
+cgit v1.2.1-1-g437b
+