From: Cong Wang <xiyou.wangcong@gmail.com>
To: Andy Lutomirski <luto@amacapital.net>
Cc: Kees Cook <kees@kernel.org>,
linux-kernel@vger.kernel.org, Will Drewry <wad@chromium.org>,
Christian Brauner <brauner@kernel.org>
Subject: [PATCH 0/2] seccomp: support O_PATH descriptors in addfd
Date: Thu, 24 Sep 2026 15:30:15 -0700 [thread overview]
Message-ID: <20260924223018.564548-1-xiyou.wangcong@gmail.com> (raw)
From: Cong Wang <cwang@multikernel.io>
The Sandlock project uses seccomp user notification to broker opens. To
maintain user-space application compatibility, it needs to return a
genuine O_PATH descriptor when an application requests one. Currently,
SECCOMP_IOCTL_NOTIF_ADDFD rejects the supervisor's O_PATH descriptor
with EBADF.
Allow addfd to transfer O_PATH descriptors and add a regression test for
their flags and read behavior. All 112 seccomp functional tests and all
7 benchmark checks passed.
Cong Wang (2):
seccomp: allow addfd to transfer O_PATH descriptors
selftests/seccomp: test addfd with an O_PATH descriptor
kernel/seccomp.c | 2 +-
tools/testing/selftests/seccomp/seccomp_bpf.c | 59 +++++++++++++++++++
2 files changed, 60 insertions(+), 1 deletion(-)
--
2.43.0
next reply other threads:[~2026-09-24 22:30 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-24 22:30 Cong Wang [this message]
2026-09-24 22:30 ` [PATCH 1/2] seccomp: allow addfd to transfer O_PATH descriptors Cong Wang
2026-09-24 22:30 ` [PATCH 2/2] selftests/seccomp: test addfd with an O_PATH descriptor Cong Wang
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=20260924223018.564548-1-xiyou.wangcong@gmail.com \
--to=xiyou.wangcong@gmail.com \
--cc=brauner@kernel.org \
--cc=kees@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=luto@amacapital.net \
--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®