diff options
author | Sebastian Andrzej Siewior <[email protected]> | 2024-07-04 19:03:37 +0200 |
---|---|---|
committer | Peter Zijlstra <[email protected]> | 2024-07-09 13:26:35 +0200 |
commit | c5d93d23a26012a98b77f9e354ab9b3afd420059 (patch) | |
tree | 5912914d793690caa734d5f64e6ad8d3e0c85d42 /tools/testing/selftests/bpf/progs/test_autoload.c | |
parent | 466e4d801cd438a1ab2c8a2cce1bef6b65c31bbb (diff) |
perf: Enqueue SIGTRAP always via task_work.
A signal is delivered by raising irq_work() which works from any context
including NMI. irq_work() can be delayed if the architecture does not
provide an interrupt vector. In order not to lose a signal, the signal
is injected via task_work during event_sched_out().
Instead going via irq_work, the signal could be added directly via
task_work. The signal is sent to current and can be enqueued on its
return path to userland.
Queue signal via task_work and consider possible NMI context. Remove
perf_event::pending_sigtrap and and use perf_event::pending_work
instead.
Reported-by: Arnaldo Carvalho de Melo <[email protected]>
Signed-off-by: Sebastian Andrzej Siewior <[email protected]>
Signed-off-by: Peter Zijlstra (Intel) <[email protected]>
Tested-by: Marco Elver <[email protected]>
Tested-by: Arnaldo Carvalho de Melo <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Diffstat (limited to 'tools/testing/selftests/bpf/progs/test_autoload.c')
0 files changed, 0 insertions, 0 deletions