Re: [RFC PATCH] ptrace: don't report syscall-exit if the tracee was killed by seccomp

Oleg Nesterov
2026-04-04T14:34:12Z

On 04/03, Kusaram Devineni wrote:
>
> On 03-04-2026 21:18, Oleg Nesterov wrote:
>
> > seccomp does force_sig_seccomp() sends the signal to current, current
> can't
> > return to usermode and call signalfd_dequeue(), get_signal() must dequeue
> > SIGSYS and notice SA_IMMUTABLE.
>
> > And since this signal is private, signalfd_dequeue() from another thread
> can't
> > dequeue it either.
>
> > No?
>
> Right Oleg, not by returning to userspace and calling signalfd_dequeue()
> afterward,
> and not from another thread.
>
> We identified a case when working on a syzbot bug
> https://syzbot.org/bug?extid=0a4c46806941297fecb9 where the forced SIGSYS
> was
> consumed through the signalfd path from task_work on the same task before
> get_signal()
> handled normal fatal delivery. The setup there had an outstanding
> io_uring-driven signalfd

Aaah... Thanks again.

OK, this is another (although related) issue, lets discuss it separately.

> For that specific path, one approach that seems to work is making signalfd
> exclude
> SA_IMMUTABLE signals from the mask it passes to

Perhaps... But this is nasty.

May be something like "brute force" hack I sent to syzbot can work...

Oleg.