]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
Merge branch 'bpf-allow-uprobe_multi-binary-specified-by-file-descriptor'
authorAlexei Starovoitov <ast@kernel.org>
Mon, 15 Jun 2026 00:24:26 +0000 (17:24 -0700)
committerAlexei Starovoitov <ast@kernel.org>
Mon, 15 Jun 2026 00:24:33 +0000 (17:24 -0700)
Jiri Olsa says:

====================
bpf: Allow uprobe_multi binary specified by file descriptor

Add ability to open uprobe_multi link on top of binary identified
by file descriptor. This allows us to avoid the race where the binary is
replaced between path resolution and attachment, ensuring we monitor the
intended binary.

v1: https://lore.kernel.org/bpf/20260609104244.588321-1-jolsa@kernel.org/T/#m0275d5f39805c57dc8fd3308c640237dc7aec4db
v2: https://lore.kernel.org/bpf/20260610143627.804790-1-jolsa@kernel.org/T/#m153e18fa426140fdcc773cc97b10e006531656c0

v3 changes:
- guard t_user acesss with access_ok [sashiko]

v2 changes:
- move path retrieval in separate function so CLASS(..) is not used in function
  with goto-based cleanup [sashiko]
- force zero path_fd in case BPF_F_UPROBE_MULTI_PATH_FD is not set [sashiko]
- add space around | in bpf_uprobe_multi_link_attach [Alexei]
====================

Link: https://patch.msgid.link/20260611114230.950379-1-jolsa@kernel.org
Signed-off-by: Alexei Starovoitov <ast@kernel.org>

Trivial merge