lkml.org 
[lkml]   [2020]   [May]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [patch V4 part 1 35/36] x86: Replace ist_enter() with nmi_enter()
----- On May 7, 2020, at 2:04 PM, Andy Lutomirski luto@kernel.org wrote:

> On Tue, May 5, 2020 at 7:14 AM Thomas Gleixner <tglx@linutronix.de> wrote:
>>
>> From: Peter Zijlstra <peterz@infradead.org>
>>
>> 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. The interrupted context could be holding locks with interrupts
>> disabled for instance.
>>
>> Similarly, #MC is an actual NMI-like exception.
>
> Is it permissible to send a signal from inside nmi_enter()? I imagine
> so, but I just want to make sure.

If you mean sending a proper signal, I would guess not.

I suspect you'll rather want to use "irq_work()" from NMI context to ensure
the rest of the work (e.g. sending a signal or a wakeup) is performed from
IRQ context very soon after the NMI, rather than from NMI context.

AFAIK this is how this is done today by perf, ftrace, ebpf, and lttng.

Thanks,

Mathieu


--
Mathieu Desnoyers
EfficiOS Inc.
http://www.efficios.com

\
 
 \ /
  Last update: 2020-05-07 20:18    [W:0.152 / U:1.160 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site