Skip to contentSkip to conversation

FAILED: patch "[PATCH] x86/mce: Fix possibly incorrect severity calculation on AMD" failed to apply to 4.19-stable tree

PATCH [email protected] 3 participants 6 messages Dec 29, 2019 – Jan 2, 2020

Subsystems (4)
lore
Share & tools
lore

[email protected]

author maintainer
#0 lore raw

The patch below does not apply to the 4.19-stable tree.
If someone wants it applied there, or to any other stable or longterm tree, then please email the backport, including the original git commit id to <[email protected]>.

thanks,

greg k-h

------------------ original commit in Linus's tree ------------------

From a3a57ddad061acc90bef39635caf2b2330ce8f21 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Jan=20H=2E=20Sch=C3=B6nherr?= <[email protected]>
Date: Tue, 10 Dec 2019 01:07:30 +0100
Subject: [PATCH] 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()")
Cc "H. Peter Anvin" <[email protected]>
Cc Ingo Molnar <[email protected]>
Cc linux-edac <[email protected]>
Cc Thomas Gleixner <[email protected]>
Cc x86-ml <[email protected]>
Cc Yazen Ghannam <[email protected]>
arch/x86/kernel/cpu/mce/core.c +1 -1
index 5f42f25bac8f..2e2a421c8528 100644
@@ -819,8 +819,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;
Reviewed-by Tony Luck
#1 lore raw
Quoted 4 lines · On Sun, Dec 29, 2019 at 04:55:16PM +0100, [email protected] wrote:

The patch below does not apply to the 4.19-stable tree.
If someone wants it applied there, or to any other stable or longterm tree, then please email the backport, including the original git commit id to <[email protected]>.

Here's a backport for all 4.x stable series. It only needed a file-rename.

---
From a3a57ddad061acc90bef39635caf2b2330ce8f21 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Jan=20H=2E=20Sch=C3=B6nherr?= <[email protected]>
Date: Tue, 10 Dec 2019 01:07:30 +0100
Subject: [PATCH] x86/mce: Fix possibly incorrect severity calculation on AMD
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

commit a3a57ddad061acc90bef39635caf2b2330ce8f21 upstream.

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()")
Cc "H. Peter Anvin" <[email protected]>
Cc Ingo Molnar <[email protected]>
Cc linux-edac <[email protected]>
Cc Thomas Gleixner <[email protected]>
Cc x86-ml <[email protected]>
Cc Yazen Ghannam <[email protected]>
---
 arch/x86/kernel/cpu/mcheck/mce.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/x86/kernel/cpu/mcheck/mce.c +1 -1
index 5f42f25bac8f..2e2a421c8528 100644
@@ -819,8 +819,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;
Signature · 8 lines
2.21.0


-- 
Regards/Gruss,
    Boris.

SUSE Software Solutions Germany GmbH, GF: Felix Imendörffer, HRB 36809, AG Nürnberg
maintainer
#2 lore raw
Quoted 8 lines · Borislav Petkov
Quoted 4 lines · On Sun, Dec 29, 2019 at 04:55:16PM +0100, [email protected] wrote:

The patch below does not apply to the 4.19-stable tree.
If someone wants it applied there, or to any other stable or longterm tree, then please email the backport, including the original git commit id to <[email protected]>.

Here's a backport for all 4.x stable series. It only needed a file-rename.

This ended up getting picked up by AUTOSEL which did the right thing with regards to filename changes as confirmed with the provided backport, thank you :)

Signature · 2 lines
Thanks,
Sasha
#3 lore raw
Quoted 7 lines · Sasha Levin
Quoted 6 lines · Borislav Petkov
Quoted 4 lines · On Sun, Dec 29, 2019 at 04:55:16PM +0100, [email protected] wrote:

The patch below does not apply to the 4.19-stable tree.
If someone wants it applied there, or to any other stable or longterm tree, then please email the backport, including the original git commit id to <[email protected]>.

Quoted 6 lines
Quoted 2 lines

Here's a backport for all 4.x stable series. It only needed a file-rename.

This ended up getting picked up by AUTOSEL which did the right thing with regards to filename changes as confirmed with the provided backport, thank you :)

Can Greg find out whether AUTOSEL did the right thing and then if so, not send those mails?

:-)

Signature · 4 lines
Regards/Gruss,
    Boris.

SUSE Software Solutions Germany GmbH, GF: Felix Imendörffer, HRB 36809, AG Nürnberg
maintainer
#4 lore raw
Quoted 11 lines · Borislav Petkov
Quoted 10 lines · Sasha Levin
Quoted 8 lines · Borislav Petkov
Quoted 4 lines · On Sun, Dec 29, 2019 at 04:55:16PM +0100, [email protected] wrote:

The patch below does not apply to the 4.19-stable tree.
If someone wants it applied there, or to any other stable or longterm tree, then please email the backport, including the original git commit id to <[email protected]>.

Here's a backport for all 4.x stable series. It only needed a file-rename.

Quoted 6 lines
Quoted 3 lines

This ended up getting picked up by AUTOSEL which did the right thing with regards to filename changes as confirmed with the provided backport, thank you :)

Can Greg find out whether AUTOSEL did the right thing and then if so, not send those mails?

Not really as he usually picks up stable tagged patches way before AUTOSEL even looks at them, I think it just happened like this this time because of crazy holiday schedules.

Signature · 2 lines
Thanks,
Sasha
#5 lore raw
Quoted 2 lines · Sasha Levin

Not really as he usually picks up stable tagged patches way before AUTOSEL even looks at them,

Ok, then next time I'll simply wait. It will pick it up eventually. :-)

Signature · 4 lines
Regards/Gruss,
    Boris.

SUSE Software Solutions Germany GmbH, GF: Felix Imendörffer, HRB 36809, AG Nürnberg