summaryrefslogtreecommitdiff
path: root/tools/tracing/rtla/tests/scripts/lib/git@git.tavy.me:linux.git
diff options
context:
space:
mode:
authorChristian Brauner <brauner@kernel.org>2026-07-30 15:34:08 +0200
committerChristian Brauner <brauner@kernel.org>2026-08-03 19:15:44 +0200
commita7b880449ab1b2389b31ed9da703691dcac54655 (patch)
treeec358b9ac298322afa1ca14b0cac29468ca7ba99 /tools/tracing/rtla/tests/scripts/lib/git@git.tavy.me:linux.git
parent145e675de6ca0b3865000876414b8a5f93246c6b (diff)
binfmt_misc: carry pre-opened interpreters in struct binfmt_misc_interp
An 'F' entry opens its interpreter at registration and every exec runs a clone of that file. The file lives in a bare struct file pointer next to the path it came from and put_binfmt_handler() closes it as a special case. Give the pre-opened interpreter a type of its own instead. struct binfmt_misc_interp carries the file, the path it was opened from and a selection name in a single allocation and is linked on a list that the entry owns and tears down in put_binfmt_handler(). An 'F' entry binds a single interpreter under the empty name and hands out clones of it as before. The open moves into open_interp_file() and works exactly as the open-coded block in bm_register_write() did. It is opened for execution at registration time, in the writer's context and with the credentials the register file was opened with. The entry can now own objects before it is published, so make put_binfmt_handler() the single teardown. create_entry() returns the entry with its reference held and every failure path in bm_register_write() simply puts it. That also replaces the open-coded bpf_ops release. No functional changes. A later patch lets a 'B' entry bind multiple interpreters selected by name per exec and reuses all of this. Link: https://patch.msgid.link/20260730-work-binfmt_misc-preopen-v1-6-4a0b0da71f16@kernel.org Signed-off-by: Christian Brauner (Amutable) <brauner@kernel.org>
Diffstat (limited to 'tools/tracing/rtla/tests/scripts/lib/git@git.tavy.me:linux.git')
0 files changed, 0 insertions, 0 deletions