Skip to content

Add prog_kfunc feature probe

Tao Chen bpf lkml 9 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v7 Latest posting 2/24 patches 8 repliesIn review
  2. v7 posting 1/24 patches 0 repliesSuperseded
  3. v64 patches 4 repliesSuperseded
Earlier versions · 6
VersionPostedPatchesRepliesStatus
v54 patches4 repliesSuperseded
v44 patches3 repliesSuperseded
v33 patches11 repliesSuperseded
v2 posting 2/22 patches4 repliesSuperseded
v2 posting 1/20 of 2 patches0 repliesSuperseded
v1 RFC2 patches2 repliesSuperseded

Patches in v7 posting 2/2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/4libbpf: Extract prog load type check from libbpf_probe_bpf_helpertools/lib/bpf/libbpf_probes.c+19 -120 replies
2/4libbpf: Init fd_array when prog probe loadtools/lib/bpf/libbpf_probes.c+4 -30 replies
3/4libbpf: Add libbpf_probe_bpf_kfunc APItools/lib/bpf/libbpf.h tools/lib/bpf/libbpf.map tools/lib/bpf/libbpf_probes.c+67 -10 replies
4/4selftests/bpf: Add libbpf_probe_bpf_kfunc API selfteststools/testing/selftests/bpf/prog_tests/libbpf_probes.c+111 -00 replies

Reviews trailers per patch

All 4 patches have a Reviewed-by or Acked-by of their own; the series has one for all of them.

PatchJiri OlsaEduard Zingerman
SeriesR-b
1/4R-b
2/4R-b
3/4R-b
4/4R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v7 thread

Cover letter [PATCH RESEND bpf-next v7 0/4] Add prog_kfunc feature probe

More and more kfunc functions are being added to the kernel. Different prog types have different restrictions when using kfunc. Therefore, prog_kfunc probe is added to check whether it is supported, and the use of this api will be added to bpftool later.

Change list:
- v6 -> v7:
- wrap err with libbpf_err
- comments fix
- handle btf_fd < 0 as vmlinux
- patchset Reviewed-by: Jiri Olsa <[email protected]>
- v6
https://lore.kernel.org/bpf/[email protected]

- v5 -> v6:
- remove fd_array_cnt
- test case clean code
- v5
https://lore.kernel.org/bpf/[email protected]

- v4 -> v5:
- use fd_array on stack
- declare the scope of use of btf_fd
- v4
https://lore.kernel.org/bpf/[email protected]/

- v3 -> v4:
- add fd_array init for kfunc in mod btf
- add test case for kfunc in mod btf
- refactor common part as prog load type check for

    libbpf_probe_bpf_{helper,kfunc}

- v3
https://lore.kernel.org/bpf/[email protected]

- v2 -> v3:
- rename parameter off with btf_fd
- extract the common part for libbpf_probe_bpf_{helper,kfunc}
- v2
https://lore.kernel.org/bpf/[email protected]

- v1 -> v2:
- check unsupported prog type like probe_bpf_helper
- add off parameter for module btf
- check verifier info when kfunc id invalid
- v1
https://lore.kernel.org/bpf/[email protected]

Tao Chen (4):
libbpf: Extract prog load type check from libbpf_probe_bpf_helper
libbpf: Init fd_array when prog probe load
libbpf: Add libbpf_probe_bpf_kfunc API
selftests/bpf: Add libbpf_probe_bpf_kfunc API selftests

 tools/lib/bpf/libbpf.h                        |  19 ++-
 tools/lib/bpf/libbpf.map                      |   1 +
 tools/lib/bpf/libbpf_probes.c                 |  86 +++++++++++---
 .../selftests/bpf/prog_tests/libbpf_probes.c  | 111 ++++++++++++++++++
 4 files changed, 201 insertions(+), 16 deletions(-)
Signature · 1 line
2.43.0