public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Peter Zijlstra <peterz@infradead.org>
To: Borislav Petkov <bp@alien8.de>
Cc: Tony Luck <tony.luck@intel.com>, X86 ML <x86@kernel.org>,
	LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v0 00/12] x86/mce: Correct the noinstr annotation
Date: Tue, 9 Nov 2021 23:08:37 +0100	[thread overview]
Message-ID: <20211109220837.GZ174703@worktop.programming.kicks-ass.net> (raw)
In-Reply-To: <20211104144035.20107-1-bp@alien8.de>

On Thu, Nov 04, 2021 at 03:40:23PM +0100, Borislav Petkov wrote:
> From: Borislav Petkov <bp@suse.de>
> 
> Hi,
> 
> here's a first preliminary (it is based on some random 5.16-rc0 commit
> and is tested only in qemu) of the series which correct all the noinstr
> annotation of the #MC handler.
> 
> Since it calls a bunch of external facilities, the strategy is to mark
> mce-specific functions called by the #MC handler as noinstr and when
> they "call out" so to speak, to do a begin/end sandwich around that
> call.

Some things are obviously fine, like annotating away mce_panic(), I mean
we're going to panic, so who cares if instrumentation is going to make
it explode earlier.

But other things are non-obvious to me; in principle I'm thinking much
of #MC really doesn't want instrumentation because things are fragile
and the more 'crap' runs the more chance we'll trigger a second fail and
blow up the system, right?

Now, MCE code hasn't been 'architected' much, and as such seems to call
out to lots of code, so perhaps put in an explicit comment with
instrumentation_begin()'s you *know* are wrong, but are the best we can
do to shut things up -- for now.

That way we don't forget things are broken and need more work :-)

      parent reply	other threads:[~2021-11-09 22:08 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-04 14:40 [PATCH v0 00/12] x86/mce: Correct the noinstr annotation Borislav Petkov
2021-11-04 14:40 ` [PATCH v0 01/12] x86/mce: Do not use memset to clear the banks bitmaps Borislav Petkov
2021-11-04 14:40 ` [PATCH v0 02/12] x86/mce: Remove function-local cpus variables Borislav Petkov
2021-11-04 14:40 ` [PATCH v0 03/12] x86/mce: Use mce_rdmsrl() in severity checking code Borislav Petkov
2021-11-04 14:40 ` [PATCH v0 04/12] x86/mce: Remove noinstr annotation from mce_setup() Borislav Petkov
2021-11-04 14:40 ` [PATCH v0 05/12] x86/mce: Allow instrumentation during task work queueing Borislav Petkov
2021-11-09 22:05   ` Borislav Petkov
2021-11-04 14:40 ` [PATCH v0 06/12] x86/mce: Prevent severity computation from being instrumented Borislav Petkov
2021-11-04 14:40 ` [PATCH v0 07/12] x86/mce: Mark mce_panic() noinstr Borislav Petkov
2021-11-04 14:40 ` [PATCH v0 08/12] x86/mce: Mark mce_end() noinstr Borislav Petkov
2021-11-04 14:40 ` [PATCH v0 09/12] x86/mce: Mark mce_read_aux() noinstr Borislav Petkov
2021-11-04 14:40 ` [PATCH v0 10/12] x86/mce: Move the tainting outside of the noinstr region Borislav Petkov
2021-11-04 14:40 ` [PATCH v0 11/12] x86/mce: Mark mce_timed_out() noinstr Borislav Petkov
2021-11-04 14:40 ` [PATCH v0 12/12] x86/mce: Mark mce_start() noinstr Borislav Petkov
2021-11-09 22:08 ` Peter Zijlstra [this message]

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=20211109220837.GZ174703@worktop.programming.kicks-ass.net \
    --to=peterz@infradead.org \
    --cc=bp@alien8.de \
    --cc=linux-kernel@vger.kernel.org \
    --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