Add the necessary and somewhat "special" hooks into sig_ignored() and recalc_sigpending(). Basically this restores _force_sigpending() and _consider_ignored_signal() tracehook logic. Signed-off-by: Oleg Nesterov <oleg@xxxxxxxxxx> --- include/linux/utrace.h | 2 ++ kernel/signal.c | 7 ++++++- 2 files changed, 8 insertions(+), 1 deletions(-) diff --git a/include/linux/utrace.h b/include/linux/utrace.h index f251efe..1b8da1c 100644 --- a/include/linux/utrace.h +++ b/include/linux/utrace.h @@ -107,6 +107,8 @@ bool utrace_report_syscall_entry(struct pt_regs *); void utrace_report_syscall_exit(struct pt_regs *); void utrace_signal_handler(struct task_struct *, int); +#define UTRACE_FLAG(task, ev) (task_utrace_flags(task) & UTRACE_EVENT(ev)) + #ifndef CONFIG_UTRACE /* diff --git a/kernel/signal.c b/kernel/signal.c index d7b90cd..8594cb2 100644 --- a/kernel/signal.c +++ b/kernel/signal.c @@ -87,7 +87,7 @@ static int sig_ignored(struct task_struct *t, int sig, int from_ancestor_ns) /* * Tracers may want to know about even ignored signals. */ - return !t->ptrace; + return !t->ptrace && !UTRACE_FLAG(t, SIGNAL_IGN); } /* @@ -150,6 +150,11 @@ void recalc_sigpending_and_wake(struct task_struct *t) void recalc_sigpending(void) { + if (task_utrace_flags(current) && utrace_interrupt_pending()) { + set_thread_flag(TIF_SIGPENDING); + return; + } + if (!recalc_sigpending_tsk(current) && !freezing(current)) clear_thread_flag(TIF_SIGPENDING); -- 1.5.5.1 _______________________________________________ kernel mailing list kernel@xxxxxxxxxxxxxxxxxxxxxxx https://admin.fedoraproject.org/mailman/listinfo/kernel