Linux-EDAC Archive on lore.kernel.org
 help / color / Atom feed
* FAILED: patch "[PATCH] x86/mce: Fix possibly incorrect severity calculation on AMD" failed to apply to 4.19-stable tree
@ 2019-12-29 15:55 gregkh
  2019-12-30 15:56 ` Borislav Petkov
  0 siblings, 1 reply; 6+ messages in thread
From: gregkh @ 2019-12-29 15:55 UTC (permalink / raw)
  To: jschoenh, Yazen.Ghannam, bp, hpa, linux-edac, mingo, stable,
	tglx, tony.luck, x86
  Cc: stable


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 <stable@vger.kernel.org>.

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?= <jschoenh@amazon.de>
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()")
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

diff --git a/arch/x86/kernel/cpu/mce/core.c b/arch/x86/kernel/cpu/mce/core.c
index 5f42f25bac8f..2e2a421c8528 100644
--- a/arch/x86/kernel/cpu/mce/core.c
+++ b/arch/x86/kernel/cpu/mce/core.c
@@ -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;


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: FAILED: patch "[PATCH] x86/mce: Fix possibly incorrect severity calculation on AMD" failed to apply to 4.19-stable tree
  2019-12-29 15:55 FAILED: patch "[PATCH] x86/mce: Fix possibly incorrect severity calculation on AMD" failed to apply to 4.19-stable tree gregkh
@ 2019-12-30 15:56 ` Borislav Petkov
  2020-01-02  1:14   ` Sasha Levin
  0 siblings, 1 reply; 6+ messages in thread
From: Borislav Petkov @ 2019-12-30 15:56 UTC (permalink / raw)
  To: gregkh
  Cc: jschoenh, Yazen.Ghannam, hpa, linux-edac, mingo, stable, tglx,
	tony.luck, x86

On Sun, Dec 29, 2019 at 04:55:16PM +0100, gregkh@linuxfoundation.org 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 <stable@vger.kernel.org>.

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?= <jschoenh@amazon.de>
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()")
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/mcheck/mce.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/x86/kernel/cpu/mcheck/mce.c b/arch/x86/kernel/cpu/mcheck/mce.c
index 5f42f25bac8f..2e2a421c8528 100644
--- a/arch/x86/kernel/cpu/mcheck/mce.c
+++ b/arch/x86/kernel/cpu/mcheck/mce.c
@@ -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;
-- 
2.21.0


-- 
Regards/Gruss,
    Boris.

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

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: FAILED: patch "[PATCH] x86/mce: Fix possibly incorrect severity calculation on AMD" failed to apply to 4.19-stable tree
  2019-12-30 15:56 ` Borislav Petkov
@ 2020-01-02  1:14   ` Sasha Levin
  2020-01-02  9:11     ` Borislav Petkov
  0 siblings, 1 reply; 6+ messages in thread
From: Sasha Levin @ 2020-01-02  1:14 UTC (permalink / raw)
  To: Borislav Petkov
  Cc: gregkh, jschoenh, Yazen.Ghannam, hpa, linux-edac, mingo, stable,
	tglx, tony.luck, x86

On Mon, Dec 30, 2019 at 04:56:21PM +0100, Borislav Petkov wrote:
>On Sun, Dec 29, 2019 at 04:55:16PM +0100, gregkh@linuxfoundation.org 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 <stable@vger.kernel.org>.
>
>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 :)

-- 
Thanks,
Sasha

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: FAILED: patch "[PATCH] x86/mce: Fix possibly incorrect severity calculation on AMD" failed to apply to 4.19-stable tree
  2020-01-02  1:14   ` Sasha Levin
@ 2020-01-02  9:11     ` Borislav Petkov
  2020-01-02 12:29       ` Sasha Levin
  0 siblings, 1 reply; 6+ messages in thread
From: Borislav Petkov @ 2020-01-02  9:11 UTC (permalink / raw)
  To: Sasha Levin
  Cc: gregkh, jschoenh, Yazen.Ghannam, hpa, linux-edac, mingo, stable,
	tglx, tony.luck, x86

On Wed, Jan 01, 2020 at 08:14:11PM -0500, Sasha Levin wrote:
> On Mon, Dec 30, 2019 at 04:56:21PM +0100, Borislav Petkov wrote:
> > On Sun, Dec 29, 2019 at 04:55:16PM +0100, gregkh@linuxfoundation.org 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 <stable@vger.kernel.org>.
> > 
> > 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?

:-)

-- 
Regards/Gruss,
    Boris.

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

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: FAILED: patch "[PATCH] x86/mce: Fix possibly incorrect severity calculation on AMD" failed to apply to 4.19-stable tree
  2020-01-02  9:11     ` Borislav Petkov
@ 2020-01-02 12:29       ` Sasha Levin
  2020-01-02 15:33         ` Borislav Petkov
  0 siblings, 1 reply; 6+ messages in thread
From: Sasha Levin @ 2020-01-02 12:29 UTC (permalink / raw)
  To: Borislav Petkov
  Cc: gregkh, jschoenh, Yazen.Ghannam, hpa, linux-edac, mingo, stable,
	tglx, tony.luck, x86

On Thu, Jan 02, 2020 at 10:11:34AM +0100, Borislav Petkov wrote:
>On Wed, Jan 01, 2020 at 08:14:11PM -0500, Sasha Levin wrote:
>> On Mon, Dec 30, 2019 at 04:56:21PM +0100, Borislav Petkov wrote:
>> > On Sun, Dec 29, 2019 at 04:55:16PM +0100, gregkh@linuxfoundation.org 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 <stable@vger.kernel.org>.
>> >
>> > 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?

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.

-- 
Thanks,
Sasha

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: FAILED: patch "[PATCH] x86/mce: Fix possibly incorrect severity calculation on AMD" failed to apply to 4.19-stable tree
  2020-01-02 12:29       ` Sasha Levin
@ 2020-01-02 15:33         ` Borislav Petkov
  0 siblings, 0 replies; 6+ messages in thread
From: Borislav Petkov @ 2020-01-02 15:33 UTC (permalink / raw)
  To: Sasha Levin
  Cc: gregkh, jschoenh, Yazen.Ghannam, hpa, linux-edac, mingo, stable,
	tglx, tony.luck, x86

On Thu, Jan 02, 2020 at 07:29:23AM -0500, Sasha Levin wrote:
> 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. :-)

-- 
Regards/Gruss,
    Boris.

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

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, back to index

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-12-29 15:55 FAILED: patch "[PATCH] x86/mce: Fix possibly incorrect severity calculation on AMD" failed to apply to 4.19-stable tree gregkh
2019-12-30 15:56 ` Borislav Petkov
2020-01-02  1:14   ` Sasha Levin
2020-01-02  9:11     ` Borislav Petkov
2020-01-02 12:29       ` Sasha Levin
2020-01-02 15:33         ` Borislav Petkov

Linux-EDAC Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-edac/0 linux-edac/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-edac linux-edac/ https://lore.kernel.org/linux-edac \
		linux-edac@vger.kernel.org
	public-inbox-index linux-edac

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.linux-edac


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git