bpf: Allow uprobe_multi binary specified by file descriptor
Status from this message: This series was applied to bpf/bpf-next.git (master)
Get series with b4
b4 am [email protected]Versions newest first · linked by author and title
- v3 Latest7 patches 1 replyApplied 7/7
- v26 patches 5 repliesSuperseded
- v16 patches 5 repliesSuperseded
Changes in v3 from the cover letter
- guard t_user acesss with access_ok [sashiko]
Patches in v3 All 7 applied
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/7 | bpf: Guard __get_user acesss with access_ok for uprobe_multi datakernel/ | +11 | 1 reply | Applied |
| 2/7 | bpf: Use user_path_at for path resolution in uprobe_multikernel/ | +1 | 0 replies | Applied |
| 3/7 | bpf: Add support to specify uprobe_multi target via file descriptorinclude/ kernel/ kernel/ +1 more | +51 | 0 replies | Applied |
| 4/7 | libbpf: Add path_fd to struct bpf_link_create_optstools/ tools/ | +3 | 0 replies | Applied |
| 5/7 | selftests/bpf: Add uprobe_multi path_fd testtools/ | +62 | 0 replies | Applied |
| 6/7 | selftests/bpf: Add uprobe_multi path_fd fail teststools/ | +31 | 0 replies | Applied |
| 7/7 | selftests/bpf: Fix typo in verify_umulti_link_infotools/ | +1 | 0 replies | Applied |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v3 yet.
Cover letter [PATCHv3 bpf-next 0/7] bpf: Allow uprobe_multi binary specified by file descriptor
hi,
we'd like to be able 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/[email protected]/T/#m0275d5f39805c57dc8fd3308c640237dc7aec4db
v2: https://lore.kernel.org/bpf/[email protected]/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]
thanks,
jirka
---
Jiri Olsa (7):
bpf: Guard __get_user acesss with access_ok for uprobe_multi data
bpf: Use user_path_at for path resolution in uprobe_multi
bpf: Add support to specify uprobe_multi target via file descriptor
libbpf: Add path_fd to struct bpf_link_create_opts selftests/bpf: Add uprobe_multi path_fd test selftests/bpf: Add uprobe_multi path_fd fail tests selftests/bpf: Fix typo in verify_umulti_link_info
include/uapi/linux/bpf.h | 7 +++++- kernel/bpf/syscall.c | 4 +-- kernel/trace/bpf_trace.c | 60 +++++++++++++++++++++++++++++++++++---------- tools/include/uapi/linux/bpf.h | 7 +++++- tools/lib/bpf/bpf.c | 1 + tools/lib/bpf/bpf.h | 3 ++- tools/testing/selftests/bpf/prog_tests/fill_link_info.c | 2 +- tools/testing/selftests/bpf/prog_tests/uprobe_multi_test.c | 94 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++- 8 files changed, 158 insertions(+), 20 deletions(-)