kernel: add support for TIF_NOTIFY_SIGNAL
authorJens Axboe <axboe@kernel.dk>
Sat, 3 Oct 2020 13:18:19 +0000 (07:18 -0600)
committerJens Axboe <axboe@kernel.dk>
Mon, 5 Oct 2020 14:43:24 +0000 (08:43 -0600)
commitb72041146de9cb952e82a8426e76eb60a3288c74
tree511d233ffac0566bd0387b616b2137774485df96
parent5d9886d112f9ad3406b1d30051c1df968bce4694
kernel: add support for TIF_NOTIFY_SIGNAL

This adds TIF_NOTIFY_SIGNAL handling in the generic code, which if set,
will return true if signal_pending() is used in a wait loop. That causes
an exit of the loop so that notify_signal tracehooks can be run. If the
wait loop is currently inside a system call, the system call is restarted
once task_work has been processed.

Signed-off-by: Jens Axboe <axboe@kernel.dk>
include/linux/entry-common.h
include/linux/entry-kvm.h
include/linux/sched/signal.h
include/linux/tracehook.h
kernel/entry/common.c
kernel/entry/kvm.c