entry: Add support for TIF_NOTIFY_SIGNAL
Add TIF_NOTIFY_SIGNAL handling in the generic entry 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. In preparation for only having arch_do_signal() handle syscall restarts if _TIF_SIGPENDING isn't set, rename it to arch_do_signal_or_restart(). Pass in a boolean that tells the architecture specific signal handler if it should attempt to get a signal, or just process a potential syscall restart. For !CONFIG_GENERIC_ENTRY archs, add the TIF_NOTIFY_SIGNAL handling to get_signal(). This is done to minimize the needed architecture changes to support this feature. Signed-off-by:Jens Axboe <axboe@kernel.dk> Signed-off-by:
Thomas Gleixner <tglx@linutronix.de> Reviewed-by:
Oleg Nesterov <oleg@redhat.com> Link: https://lore.kernel.org/r/20201026203230.386348-3-axboe@kernel.dk
-
mentioned in commit 9d60ee91
-
mentioned in commit f4cd4af6
-
mentioned in commit a263e56e
-
mentioned in commit 50cd31fb
-
mentioned in commit c7989db8
-
mentioned in commit 19355a6a
-
mentioned in commit a50cc185
-
mentioned in commit c9f2ba91
-
mentioned in commit 6958ebee
-
mentioned in commit b2203f85
-
mentioned in commit 2743fa9e
-
mentioned in commit 5d860f26
-
mentioned in commit a1e57b86
-
mentioned in commit f6af8632
-
mentioned in commit f5a197c0
-
mentioned in commit b25b8c55
-
mentioned in commit 7113feee
-
mentioned in commit 892e3ee3
-
mentioned in commit 08730ddf
-
mentioned in commit 315c4d18
-
mentioned in commit a429610d
-
mentioned in commit 276bd69b
-
mentioned in commit dc6fb13f
-
mentioned in commit 80afa1d3
-
mentioned in commit fe411c6c
-
mentioned in commit 1e59011e
-
mentioned in commit 06af8679