From: "Ghannam, Yazen" <Yazen.Ghannam@amd.com>
To: "Borislav Petkov" <bp@alien8.de>,
"Jan H. Schönherr" <jschoenh@amazon.de>
Cc: Tony Luck <tony.luck@intel.com>,
"linux-edac@vger.kernel.org" <linux-edac@vger.kernel.org>,
Thomas Gleixner <tglx@linutronix.de>,
Ingo Molnar <mingo@redhat.com>, "H. Peter Anvin" <hpa@zytor.com>,
"x86@kernel.org" <x86@kernel.org>
Subject: RE: [PATCH 3/6] x86/mce: Fix possibly incorrect severity calculation on AMD
Date: Mon, 16 Dec 2019 17:35:19 +0000 [thread overview]
Message-ID: <SN6PR12MB2639C17566A1654561E24484F8510@SN6PR12MB2639.namprd12.prod.outlook.com> (raw)
In-Reply-To: <20191216172609.GE17380@zn.tnic>
> -----Original Message-----
> From: Borislav Petkov <bp@alien8.de>
> Sent: Monday, December 16, 2019 12:26 PM
> To: Jan H. Schönherr <jschoenh@amazon.de>; Ghannam, Yazen <Yazen.Ghannam@amd.com>
> Cc: Tony Luck <tony.luck@intel.com>; linux-edac@vger.kernel.org; Thomas Gleixner <tglx@linutronix.de>; Ingo Molnar
> <mingo@redhat.com>; H. Peter Anvin <hpa@zytor.com>; x86@kernel.org
> Subject: Re: [PATCH 3/6] x86/mce: Fix possibly incorrect severity calculation on AMD
>
> On Tue, Dec 10, 2019 at 01:07:30AM +0100, Jan H. Schönherr wrote:
> > 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>
> > ---
> > 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 81ab25d5357a..6afb9de251f2 100644
> > --- a/arch/x86/kernel/cpu/mce/core.c
> > +++ b/arch/x86/kernel/cpu/mce/core.c
> > @@ -809,8 +809,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;
> > --
>
> Good catch. This should go to Linus now.
>
> Yazen, any objections?
>
No objections.
Thanks,
Yazen
next prev parent reply other threads:[~2019-12-16 17:35 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-12-10 0:07 [PATCH 0/6] x86/mce: Various fixes and cleanups for MCE handling Jan H. Schönherr
2019-12-10 0:07 ` [PATCH 1/6] x86/mce: Take action on UCNA/Deferred errors again Jan H. Schönherr
2019-12-10 0:07 ` [PATCH 2/6] x86/mce: Make mce=nobootlog work again Jan H. Schönherr
2019-12-16 17:15 ` Borislav Petkov
2019-12-10 0:07 ` [PATCH 3/6] x86/mce: Fix possibly incorrect severity calculation on AMD Jan H. Schönherr
2019-12-16 17:26 ` Borislav Petkov
2019-12-16 17:35 ` Ghannam, Yazen [this message]
2019-12-10 0:07 ` [PATCH 4/6] x86/mce: Fix handling of optional message string Jan H. Schönherr
2019-12-16 17:37 ` Borislav Petkov
2019-12-19 17:49 ` Jan H. Schönherr
2019-12-20 10:01 ` Borislav Petkov
2019-12-10 0:07 ` [PATCH 5/6] x86/mce: Pass MCE message to mce_panic() on failed kernel recovery Jan H. Schönherr
2019-12-10 0:07 ` [PATCH 6/6] x86/mce: Remove mce_inject_log() in favor of mce_log() Jan H. Schönherr
2019-12-11 0:25 ` [PATCH 0/6] x86/mce: Various fixes and cleanups for MCE handling Luck, Tony
2019-12-12 12:25 ` Jan H. Schönherr
2019-12-16 16:52 ` Borislav Petkov
2019-12-16 21:59 ` Luck, Tony
2019-12-17 1:19 ` Ghannam, Yazen
2019-12-17 7:34 ` Borislav Petkov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=SN6PR12MB2639C17566A1654561E24484F8510@SN6PR12MB2639.namprd12.prod.outlook.com \
--to=yazen.ghannam@amd.com \
--cc=bp@alien8.de \
--cc=hpa@zytor.com \
--cc=jschoenh@amazon.de \
--cc=linux-edac@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=tglx@linutronix.de \
--cc=tony.luck@intel.com \
--cc=x86@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).