Re: [PATCH 1/4] seccomp: wake poll waiters after failed addfd send

From: Andrea Parri

Date: Thu Nov 05 2026 - 10:49:38 EST


On Wed, Nov 04, 2026 at 09:19:10AM -0700, Tycho Andersen wrote:
> Hm, don't we return success or failure from
> ioctl(SECCOMP_IOCTL_NOTIF_ADDFD) via kaddfd.ret in
> seccomp_notify_addfd()?
>
> I don't really understand why this is necessary unless you're ignoring
> the return value from that call.

Right, the issuing thread gets the error and can recover directly. The
edge-triggered example demonstrates the missing wakeup, but does not
establish that a supervisor needs it to recover.

The wakeup matters for other waiters on the listener. A thread or
process waiting for EPOLLOUT while another one issues the request can
see no EPOLLOUT while the request is pending, and nothing wakes it when
the failure moves the notification back to SENT. seccomp_notify_recv()
wakes EPOLLOUT on its transition to SENT, so the two addfd paths are the
odd ones out.

I don't know of a supervisor that waits for EPOLLOUT from a thread other
than the one replying, so the motivation is to report EPOLLOUT
consistently when a notification becomes SENT again, not to fix a
reported hang. I'll revise the changelogs to make that distinction
clear, and drop the stable tags from patches 1 and 2.

Thanks,
Andrea