[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20211109220837.GZ174703@worktop.programming.kicks-ass.net>
Date: Tue, 9 Nov 2021 23:08:37 +0100
From: Peter Zijlstra <peterz@...radead.org>
To: Borislav Petkov <bp@...en8.de>
Cc: Tony Luck <tony.luck@...el.com>, X86 ML <x86@...nel.org>,
LKML <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH v0 00/12] x86/mce: Correct the noinstr annotation
On Thu, Nov 04, 2021 at 03:40:23PM +0100, Borislav Petkov wrote:
> From: Borislav Petkov <bp@...e.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 :-)
Powered by blists - more mailing lists