From: "Luck, Tony" <tony.luck@intel.com>
To: Borislav Petkov <bp@alien8.de>
Cc: Jue Wang <juew@google.com>,
x86@kernel.org, linux-kernel@vger.kernel.org,
patches@lists.linux.dev
Subject: Re: [PATCH] x86/mce: Add workaround for SKX/CLX/CPX spurious machine checks
Date: Tue, 15 Feb 2022 14:22:33 -0800 [thread overview]
Message-ID: <YgwnqTc8FGG3orcE@agluck-desk3.sc.intel.com> (raw)
In-Reply-To: <Ygwka++3eipjQzB2@zn.tnic>
On Tue, Feb 15, 2022 at 11:08:43PM +0100, Borislav Petkov wrote:
> > This is still better than the OS crashes on MCEs raised on an
> > irrelevant process due to 'rep movs*' accesses in a kernel context,
> > e.g., copy_page.
>
> Wait a minute: so the MCE will happen for a piece of buffer that REP;
> MOVS *wasn't* supposed to copy.
Yes. That's why this is a "spurious" MCE. The "REP; MOVS" does
a fetch beyond the source range. If there is poison there, BOOM,
MCE :-(
> So why are we even disabling fast strings operations? Why aren't we
> simply ignoring this MCE with a warn in dmesg since, reportedly, we can
> recover safely?
This early in do_machine check we don't know whether this was from
a over enthusistic REP;MOVS fetch, or a "normal" machine check.
I don't think there is an easy way to tell the difference.
Since that "extra fetch" is part of the fast string mode, the workaround
is to disable fast strings and return. Now that will mean that fast
strings gets disabled for machine checks that had nothing to do with
this quirk. But this does provide a good-enough workaround.
> What about the MCE broadcasting synchronization? This is bypassing
> everything. There's mce_exception_count which counts stuff too.
The first check:
if ((mcgstatus & MCG_STATUS_LMCES)
is for "is this a local machine check"? So no broadcast sync
needed. But that needs a comment.
-Tony
next prev parent reply other threads:[~2022-02-15 22:22 UTC|newest]
Thread overview: 42+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-02-07 4:36 [RFC] " Jue Wang
2022-02-07 18:23 ` Luck, Tony
2022-02-07 18:52 ` Borislav Petkov
2022-02-07 19:24 ` Luck, Tony
2022-02-07 20:27 ` Borislav Petkov
2022-02-07 21:07 ` Luck, Tony
2022-02-07 21:20 ` Borislav Petkov
2022-02-07 21:51 ` Luck, Tony
2022-02-08 15:04 ` Jue Wang
2022-02-08 15:09 ` [PATCH] " Jue Wang
2022-02-11 20:08 ` Jue Wang
2022-02-11 20:18 ` Borislav Petkov
2022-02-11 20:23 ` Jue Wang
2022-02-15 18:42 ` Luck, Tony
2022-02-15 22:08 ` Borislav Petkov
2022-02-15 22:22 ` Luck, Tony [this message]
2022-02-16 10:28 ` Borislav Petkov
2022-02-16 15:50 ` Jue Wang
2022-02-16 18:02 ` Borislav Petkov
2022-02-16 18:41 ` Luck, Tony
2022-02-16 18:52 ` Borislav Petkov
2022-02-16 18:58 ` Luck, Tony
2022-02-16 18:59 ` Jue Wang
2022-02-16 21:53 ` [PATCH] x86/mce: work around an erratum on fast string copy instructions Jue Wang
2022-02-17 16:30 ` Borislav Petkov
2022-02-17 16:32 ` Borislav Petkov
2022-02-18 1:32 ` [PATCH v2] " Jue Wang
2022-02-18 15:07 ` Borislav Petkov
2022-02-18 16:03 ` Jue Wang
2022-02-18 16:14 ` Borislav Petkov
2022-02-18 16:21 ` Jue Wang
2022-02-18 17:16 ` Borislav Petkov
2022-02-18 17:39 ` Jue Wang
[not found] ` <CAPcxDJ7=hCz6KRih4OBVv-k8WLcBL4n+VSpeP_zky7Uunq89zg@mail.gmail.com>
2022-02-18 22:05 ` Borislav Petkov
2022-02-18 22:38 ` Luck, Tony
2022-02-18 22:58 ` Borislav Petkov
2022-02-18 17:58 ` Luck, Tony
2022-02-19 18:09 ` [tip: ras/core] x86/mce: Work " tip-bot2 for Jue Wang
2022-02-16 5:40 ` [PATCH] x86/mce: Add workaround for SKX/CLX/CPX spurious machine checks Jue Wang
2022-02-16 5:56 ` [PATCH] x86/mce: work around an erratum on fast string copy instructions Jue Wang
2022-02-16 9:04 ` David Laight
2022-02-16 15:33 ` Jue Wang
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=YgwnqTc8FGG3orcE@agluck-desk3.sc.intel.com \
--to=tony.luck@intel.com \
--cc=bp@alien8.de \
--cc=juew@google.com \
--cc=linux-kernel@vger.kernel.org \
--cc=patches@lists.linux.dev \
--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
Powered by JetHome