bpf: Add d_path helper
Get series with b4
b4 am [email protected]Versions newest first · linked by author and title
- v12 Latest14 patches 4 repliesIn review
- v11 RFC14 patches 2 repliesSuperseded
- v1014 patches 6 repliesSuperseded
Earlier versions · 9
| Version | Posted | Patches | Replies | Status |
|---|---|---|---|---|
| v9 | 14 patches | 23 replies | Superseded | |
| v8 | 13 patches | 26 replies | Superseded | |
| v7 | 9 patches | 1 reply | Applied | |
| v6 | 9 patches | 2 replies | Superseded | |
| v5 | 9 patches | 12 replies | Superseded | |
| v4 | 14 patches | 44 replies | Superseded | |
| v3 | 0 of 9 patches | 2 replies | Superseded | |
| v2 RFC | 9 patches | 18 replies | Superseded | |
| v1 RFC | 3 patches | 16 replies | Superseded |
Changes in v12 from the cover letter
- added acks
- rebased on latest bpf-next
- reposted without RFC tag
Patches in v12 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/14 | tools resolve_btfids: Add size check to get_id functiontools/ | +8 | 0 replies | |
| 2/14 | tools resolve_btfids: Add support for set symbolstools/ | +19 | 0 replies | |
| 3/14 | bpf: Move btf_resolve_size into __btf_resolve_sizeinclude/ kernel/ kernel/ | +17 | 0 replies | |
| 4/14 | bpf: Add elem_id pointer as argument to __btf_resolve_sizekernel/ | +7 | 0 replies | |
| 5/14 | bpf: Add type_id pointer as argument to __btf_resolve_sizekernel/ | +9 | 0 replies | |
| 6/14 | bpf: Remove recursion call in btf_struct_accesskernel/ | +5 | 0 replies | |
| 7/14 | bpf: Factor btf_struct_access functionkernel/ | +65 | 0 replies | |
| 8/14 | bpf: Add btf_struct_ids_match functioninclude/ kernel/ kernel/ | +44 | 0 replies | |
| 9/14 | bpf: Add BTF_SET_START/END macrosinclude/ include/ kernel/ +2 more | +123 | 0 replies | |
| 10/14 | bpf: Add d_path helperinclude/ kernel/ scripts/ +1 more | +80 | 2 replies | |
| 11/14 | bpf: Update .BTF_ids section in btf.rst with sets infoDocumentation/ | +25 | 0 replies | |
| 12/14 | selftests/bpf: Add verifier test for d_path helpertools/ tools/ | +55 | 0 replies | |
| 13/14 | selftests/bpf: Add test for d_path helpertools/ tools/ | +205 | 2 replies | |
| 14/14 | selftests/bpf: Add set test to resolve_btfidstools/ | +38 | 0 replies |
Reviews trailers per patch
All 14 patches have a Reviewed-by or Acked-by.
| Patch | Andrii Nakryiko | KP Singh | Wenbo Zhang |
|---|---|---|---|
| 1/14 | A-b | ||
| 2/14 | A-b | ||
| 3/14 | A-b | ||
| 4/14 | A-b | ||
| 5/14 | A-b | ||
| 6/14 | A-b | ||
| 7/14 | A-b | ||
| 8/14 | A-b | ||
| 9/14 | A-b | ||
| 10/14 | A-b | A-b | |
| 11/14 | A-b | ||
| 12/14 | A-b | ||
| 13/14 | A-b | Original-patch-by | |
| 14/14 | A-b |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 3 reviewers.
Cover letter [PATCH v12 bpf-next 00/14] bpf: Add d_path helper
hi,
adding d_path helper function that returns full path for given 'struct path' object, which needs to be the kernel BTF 'path' object. The path is returned in buffer provided 'buf' of size 'sz' and is zero terminated.
long bpf_d_path(struct path *path, char *buf, u32 sz);
The helper calls directly d_path function, so there's only limited set of function it can be called from.
The patchset also adds support to add set of BTF IDs for a helper to define functions that the helper is allowed to be called from.
Also available at:
https://git.kernel.org/pub/scm/linux/kernel/git/jolsa/perf.git
bpf/d_path
v12 changes:
- added acks
- rebased on latest bpf-next
- reposted without RFC tag
thanks,
jirka
---
Jiri Olsa (14):
tools resolve_btfids: Add size check to get_id function tools resolve_btfids: Add support for set symbols
bpf: Move btf_resolve_size into __btf_resolve_size
bpf: Add elem_id pointer as argument to __btf_resolve_size
bpf: Add type_id pointer as argument to __btf_resolve_size
bpf: Remove recursion call in btf_struct_access
bpf: Factor btf_struct_access function
bpf: Add btf_struct_ids_match function
bpf: Add BTF_SET_START/END macros
bpf: Add d_path helper
bpf: Update .BTF_ids section in btf.rst with sets info selftests/bpf: Add verifier test for d_path helper selftests/bpf: Add test for d_path helper selftests/bpf: Add set test to resolve_btfids
Documentation/bpf/btf.rst | 25 +++++++++++++++ include/linux/bpf.h | 6 ++++ include/linux/btf.h | 3 +- include/linux/btf_ids.h | 51 +++++++++++++++++++++++++++++- include/uapi/linux/bpf.h | 16 +++++++++- kernel/bpf/bpf_struct_ops.c | 6 ++-- kernel/bpf/btf.c | 163 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++-------------- kernel/bpf/verifier.c | 22 +++++++++---- kernel/trace/bpf_trace.c | 48 ++++++++++++++++++++++++++++ scripts/bpf_helpers_doc.py | 2 ++ tools/bpf/resolve_btfids/main.c | 29 +++++++++++++++-- tools/include/linux/btf_ids.h | 51 +++++++++++++++++++++++++++++- tools/include/uapi/linux/bpf.h | 16 +++++++++- tools/testing/selftests/bpf/prog_tests/d_path.c | 147 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ tools/testing/selftests/bpf/prog_tests/resolve_btfids.c | 39 ++++++++++++++++++++++- tools/testing/selftests/bpf/progs/test_d_path.c | 58 ++++++++++++++++++++++++++++++++++ tools/testing/selftests/bpf/test_verifier.c | 19 ++++++++++- tools/testing/selftests/bpf/verifier/d_path.c | 37 ++++++++++++++++++++++ 18 files changed, 694 insertions(+), 44 deletions(-) create mode 100644 tools/testing/selftests/bpf/prog_tests/d_path.c create mode 100644 tools/testing/selftests/bpf/progs/test_d_path.c create mode 100644 tools/testing/selftests/bpf/verifier/d_path.c