[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20200218150850.224d9b8e@gandalf.local.home>
Date: Tue, 18 Feb 2020 15:08:50 -0500
From: Steven Rostedt <rostedt@...dmis.org>
To: Borislav Petkov <bp@...en8.de>
Cc: Peter Zijlstra <peterz@...radead.org>,
Andy Lutomirski <luto@...nel.org>,
Tony Luck <tony.luck@...el.com>, x86-ml <x86@...nel.org>,
lkml <linux-kernel@...r.kernel.org>
Subject: Re: [RFC] #MC mess
On Tue, 18 Feb 2020 20:50:35 +0100
Borislav Petkov <bp@...en8.de> wrote:
> True story, thanks for that hint!
>
> static_key_disable()
> |-> cpus_read_lock()
> |-> percpu_down_read(&cpu_hotplug_lock)
> |->might_sleep()
>
> Yuck. Which means, the #MC handler must switch to __rdmsr()/__wrmsr()
> now.
>
> I wish I could travel back in time and NAK the hell of that MSR
> tracepoint crap.
Can we create a per_cpu variable that gets set when we enter the MC
handler, and not call the msr trace points when that is set?
Now, is jump labels bad in these cases (note, it is possible to trigger
a breakpoint in them, does an iret disable the MC as well, which means
we could get nested MC handlers corrupting the IST stack?).
You could have the msr_tracepoint_active() check this per cpu variable?
msr reading and writing is rather slow, and I'm sure reading a per_cpu
variable is going to be in the noise of it.
-- Steve
Powered by blists - more mailing lists