From: Christian Brauner <brauner@kernel.org>
To: Farid Zakaria <farid.m.zakaria@gmail.com>
Cc: Christian Brauner <brauner@kernel.org>,
david.laight.linux@gmail.com, jack@suse.cz, jannh@google.com,
kees@kernel.org, linux-fsdevel@vger.kernel.org,
linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org,
linux-mm@kvack.org, mail@johnericson.me, shuah@kernel.org,
viro@zeniv.linux.org.uk, Gemini <assistant@google.com>
Subject: Re: [RFC PATCH] fs: binfmt_misc: introduce eBPF-based matching and interpreter selection
Date: Tue, 07 Jul 2026 13:34:46 +0200 [thread overview]
Message-ID: <20260707-campieren-fingen-himbeeren-e4b682bd8e63@brauner> (raw)
In-Reply-To: <CACCo2jm5=xrQNfak=TdO=2oh0DC5pe+atj=UfuTa8Y9s8GVkqg@mail.gmail.com>
On 2026-07-06 09:47:53-07:00, Farid Zakaria wrote:
> On Mon, Jul 6, 2026 at 9:01 AM Christian Brauner <brauner@kernel.org> wrote:
>
> > Ignoring the blatant bpf abuse here I think this is quite workable. So
> > this can be turned into an actual design and patch imho...
>
> Glad to see you think this proposal is in the right direction.
> Just for my edification, when you say "balatant bpf abuse", you mean
> how it abuses the socket bpf type?
> If so, do you have any guidance on a new type or should I just take a
> stab at it.
>
> For the proper RFC patch unbastardized with tests, should I start a
> new thread or is
> the convention to keep attaching it to this same thread?
Always start a new thread and bump the version number. So we're at v3
now, if I'm counting correctly.
Fwiw, if you have access to an LLM you can try and setup b4 to manage
patch series. It's quite easy once you get the hang of it.
> > Note that binfmt_misc is namespaced and can be mounted inside of user
> > namespace + mount namespaces fwiw. So a container mounting binfmt_misc
> > (a fresh instance - few do) would escape that bpf program. On the other
> > hand it would allow to register a custom bpf program per container if
> > needed...
>
> That makes sense -- but you will need CAP_BPF etc.. to load the new
> programs though
> if inside a userns.
Right, bpf tokens exist to delegate bpf access to containers. Not always
ideal but it works for such cases. My main point was to communicate that
containers are able to disconnect themselves from being able to execute
binaries by mounting an empty binfmt_misc instance, iirc. I should
remember that as I did that work but I kinda don't exactly. :)
In any case, I think it wouldn't be crazy to allow registering "default"
handlers that appear in all binfmt_misc instances if needed so
containers with separate binfmt_misc always have the bpf program
available. Just thinking out loud...
next prev parent reply other threads:[~2026-07-07 11:34 UTC|newest]
Thread overview: 41+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-06-22 4:39 [PATCH 0/2] fs: support $ORIGIN in ELF interpreter paths Farid Zakaria
2026-06-22 4:39 ` [PATCH 1/2] " Farid Zakaria
2026-06-22 9:53 ` Jori Koolstra
2026-06-23 20:14 ` Kees Cook
2026-06-23 20:35 ` Farid Zakaria
2026-06-22 4:39 ` [PATCH 2/2] selftests/exec: add test suites for $ORIGIN interpreter resolution Farid Zakaria
2026-06-22 10:39 ` [PATCH 0/2] fs: support $ORIGIN in ELF interpreter paths Jan Kara
2026-06-22 17:15 ` Farid Zakaria
2026-06-22 21:08 ` John Ericson
2026-06-25 8:50 ` Christian Brauner
2026-06-25 19:34 ` John Ericson
2026-06-26 12:39 ` Jann Horn
2026-06-26 13:26 ` David Laight
2026-06-26 13:34 ` Jann Horn
2026-06-26 16:28 ` David Laight
2026-06-28 12:36 ` Christian Brauner
2026-06-28 13:20 ` Christian Brauner
2026-06-28 18:44 ` David Laight
2026-06-30 16:58 ` Farid Zakaria
2026-07-02 6:47 ` Christian Brauner
2026-06-30 17:59 ` David Laight
2026-07-02 21:42 ` [RFC PATCH] fs: introduce pluggable ELF interpreter loader registry Farid Zakaria
2026-07-03 9:22 ` Christian Brauner
2026-07-03 18:32 ` Farid Zakaria
2026-07-04 8:15 ` Christian Brauner
2026-07-04 21:14 ` [RFC PATCH] fs: binfmt_misc: introduce eBPF-based matching and interpreter selection Farid Zakaria
2026-07-06 16:01 ` Christian Brauner
2026-07-06 16:47 ` Farid Zakaria
2026-07-07 11:34 ` Christian Brauner [this message]
2026-07-07 19:45 ` Christian Brauner
2026-07-07 22:44 ` Farid Zakaria
2026-07-08 9:14 ` Christian Brauner
2026-07-08 16:47 ` Christian Brauner
2026-07-09 4:07 ` Farid Zakaria
2026-07-09 8:46 ` Christian Brauner
2026-07-21 23:18 ` Alessandro Di Federico
2026-07-22 13:33 ` Christian Brauner
2026-07-30 22:46 ` Alessandro Di Federico
2026-07-31 9:41 ` Christian Brauner
2026-08-02 22:54 ` Farid Zakaria
2026-08-05 7:56 ` Christian Brauner
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=20260707-campieren-fingen-himbeeren-e4b682bd8e63@brauner \
--to=brauner@kernel.org \
--cc=assistant@google.com \
--cc=david.laight.linux@gmail.com \
--cc=farid.m.zakaria@gmail.com \
--cc=jack@suse.cz \
--cc=jannh@google.com \
--cc=kees@kernel.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-kselftest@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=mail@johnericson.me \
--cc=shuah@kernel.org \
--cc=viro@zeniv.linux.org.uk \
/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®