Re: [PATCH 1/4] seccomp: wake poll waiters after failed addfd send
From: Andrea Parri
Date: Thu Nov 05 2026 - 12:41:44 EST
On Thu, Nov 05, 2026 at 09:25:17AM -0700, Tycho Andersen wrote:
> Seems like a solution in search of a problem to me.
>
> Is there a sane action a supervisor can take on failure here besides
> killing the thread that made the syscall? If so, perhaps it's
> worthwhile. Or maybe it's worth it "for completeness" and I'm just
> being grumpy :)
There is: seccomp_handle_addfd() puts the notification back in SENT on
failure, so the supervisor can still reply.
For example, if injecting a descriptor for an emulated open() fails with
EMFILE, the supervisor can reply with error = -EMFILE, and the target
sees an ordinary syscall failure. After an interrupted request, it can
simply retry.
But the issuing thread does that from the ioctl result, without an
additional poll wakeup, so patches 1-3 would only add completeness.
I'll drop them and send v2 with just the RECV fix (patch 4 here), unless
Kees would rather keep them.
Thanks,
Andrea