[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CALCETrU7nezN7d3GEZ8h8HbRfvZ0+F9+Ahb7fLvZ9FVaHN9x2w@mail.gmail.com>
Date: Fri, 21 Feb 2020 11:05:36 -0800
From: Andy Lutomirski <luto@...nel.org>
To: Peter Zijlstra <peterz@...radead.org>
Cc: LKML <linux-kernel@...r.kernel.org>,
linux-arch <linux-arch@...r.kernel.org>,
Steven Rostedt <rostedt@...dmis.org>,
Ingo Molnar <mingo@...nel.org>,
Joel Fernandes <joel@...lfernandes.org>,
Greg KH <gregkh@...uxfoundation.org>, gustavo@...eddedor.com,
Thomas Gleixner <tglx@...utronix.de>, paulmck@...nel.org,
Josh Triplett <josh@...htriplett.org>,
Mathieu Desnoyers <mathieu.desnoyers@...icios.com>,
Lai Jiangshan <jiangshanlai@...il.com>,
Andrew Lutomirski <luto@...nel.org>,
Tony Luck <tony.luck@...el.com>,
Frederic Weisbecker <frederic@...nel.org>,
Dan Carpenter <dan.carpenter@...cle.com>,
Masami Hiramatsu <mhiramat@...nel.org>
Subject: Re: [PATCH v4 05/27] x86: Replace ist_enter() with nmi_enter()
On Fri, Feb 21, 2020 at 5:50 AM Peter Zijlstra <peterz@...radead.org> wrote:
>
> A few exceptions (like #DB and #BP) can happen at any location in the
> code, this then means that tracers should treat events from these
> exceptions as NMI-like. We could be holding locks with interrupts
> disabled for instance.
>
> Similarly, #MC is an actual NMI-like exception.
>
> -dotraplinkage void notrace do_int3(struct pt_regs *regs, long error_code)
> +dotraplinkage notrace void do_int3(struct pt_regs *regs, long error_code)
> {
> if (poke_int3_handler(regs))
> return;
>
> - /*
> - * Use ist_enter despite the fact that we don't use an IST stack.
> - * We can be called from a kprobe in non-CONTEXT_KERNEL kernel
> - * mode or even during context tracking state changes.
> - *
> - * This means that we can't schedule. That's okay.
> - */
> - ist_enter(regs);
> + nmi_enter();
I agree with the change, but some commentary might be nice. Maybe
copy from here:
https://git.kernel.org/pub/scm/linux/kernel/git/luto/linux.git/commit/?h=x86/idtentry&id=061eaa900b4f63601ab6381ab431fcef8dfd84be
Powered by blists - more mailing lists