From: Andrea Parri <parri.andrea@gmail.com>
To: Tycho Andersen <tycho@kernel.org>
Cc: Andrea Parri <parri.andrea@gmail.com>,
Kees Cook <kees@kernel.org>,
Andy Lutomirski <luto@amacapital.net>,
Will Drewry <wad@chromium.org>, Shuah Khan <shuah@kernel.org>,
Christian Brauner <brauner@kernel.org>,
Sargun Dhillon <sargun@sargun.me>, Hui Peng <benquike@gmail.com>,
Bradley Morgan <brads@mainlining.org>,
Cong Wang <cwang@multikernel.io>,
linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org,
bpf@vger.kernel.org
Subject: Re: [PATCH 1/4] seccomp: wake poll waiters after failed addfd send
Date: Thu, 5 Nov 2026 18:35:28 +0100 [thread overview]
Message-ID: <20261105173530.39081-1-parri.andrea@gmail.com> (raw)
In-Reply-To: <auysN9YTg8Ih8QLZ@tycho.pizza>
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
next prev parent reply other threads:[~2026-11-05 17:35 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-04 10:37 [PATCH 0/4] seccomp: fix user-notification state transitions Andrea Parri
2026-11-04 10:37 ` [PATCH 1/4] seccomp: wake poll waiters after failed addfd send Andrea Parri
2026-11-04 16:19 ` Tycho Andersen
2026-11-05 15:37 ` Andrea Parri
2026-11-05 16:25 ` Tycho Andersen
2026-11-05 17:35 ` Andrea Parri [this message]
2026-11-05 17:42 ` Tycho Andersen
2026-11-05 17:53 ` Andrea Parri
2026-11-04 10:37 ` [PATCH 2/4] seccomp: wake poll waiters after interrupted " Andrea Parri
2026-11-04 10:37 ` [PATCH 3/4] seccomp: add a helper to move a notification to SENT Andrea Parri
2026-11-04 10:37 ` [PATCH 4/4] seccomp: publish user notifications after copying them to userspace Andrea Parri
2026-11-06 11:32 ` [PATCH 0/4] seccomp: fix user-notification state transitions Andrea Parri
2026-11-06 11:36 ` Bradley Morgan
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20261105173530.39081-1-parri.andrea@gmail.com \
--to=parri.andrea@gmail.com \
--cc=benquike@gmail.com \
--cc=bpf@vger.kernel.org \
--cc=brads@mainlining.org \
--cc=brauner@kernel.org \
--cc=cwang@multikernel.io \
--cc=kees@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-kselftest@vger.kernel.org \
--cc=luto@amacapital.net \
--cc=sargun@sargun.me \
--cc=shuah@kernel.org \
--cc=tycho@kernel.org \
--cc=wad@chromium.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®