]> git.baikalelectronics.ru Git - kernel.git/commit
task_work: Call tracehook_notify_signal from get_signal on all architectures
authorEric W. Biederman <ebiederm@xmission.com>
Wed, 9 Feb 2022 15:51:14 +0000 (09:51 -0600)
committerEric W. Biederman <ebiederm@xmission.com>
Thu, 10 Mar 2022 22:51:36 +0000 (16:51 -0600)
commit7cac6ae2a3736a1adfe67c69c6c6f3437f40f557
tree1faa152e80c54f5bcb1f740ec43d8537c3d42f17
parent84cecd9d9a27f8c1a307e2e9aecc53e6372fd0db
task_work: Call tracehook_notify_signal from get_signal on all architectures

Always handle TIF_NOTIFY_SIGNAL in get_signal.  With commit abb48fcb2a6f
("task_work: unconditionally run task_work from get_signal()") always
calling task_work_run all of the work of tracehook_notify_signal is
already happening except clearing TIF_NOTIFY_SIGNAL.

Factor clear_notify_signal out of tracehook_notify_signal and use it in
get_signal so that get_signal only needs one call of task_work_run.

To keep the semantics in sync update xfer_to_guest_mode_work (which
does not call get_signal) to call tracehook_notify_signal if either
_TIF_SIGPENDING or _TIF_NOTIFY_SIGNAL.

Reviewed-by: Kees Cook <keescook@chromium.org>
Link: https://lkml.kernel.org/r/20220309162454.123006-8-ebiederm@xmission.com
Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
arch/s390/kernel/signal.c
arch/x86/kernel/signal.c
include/linux/entry-common.h
include/linux/tracehook.h
kernel/entry/common.c
kernel/entry/kvm.c
kernel/signal.c