Add target-less tracing SEC() definitions
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
- v2 Latest3 patches 0 repliesApplied 3/3
- v13 patches 5 repliesSuperseded
Changes in v2 from the cover letter
- rebased and added Song's acks.
Patches in v2 All 3 applied
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/3 | libbpf: allow "incomplete" basic tracing SEC() definitionstools/ | +51 | 0 replies | Applied |
| 2/3 | libbpf: support target-less SEC() definitions for BTF-backed programstools/ | +32 | 0 replies | Applied |
| 3/3 | selftests/bpf: use target-less SEC() definitions in various teststools/ tools/ tools/ +2 more | +52 | 0 replies | Applied |
Reviews trailers per patch
All 3 patches have a Reviewed-by or Acked-by.
| Patch | Song Liu |
|---|---|
| 1/3 | A-b |
| 2/3 | A-b |
| 3/3 | A-b |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [PATCH v2 bpf-next 0/3] Add target-less tracing SEC() definitions
Allow specifying "target-less" SEC() definitions for tracing BPF programs, both non-BTF-backed (kprobes, tracepoints, raw tracepoints) and BTF-backed (fentry/fexit, iter, lsm, etc).
There are various situations where attach target cannot be known at compilation time, so libbpf's insistence on specifying something leads to users having to add random test like SEC("kprobe/whatever") and then specifying correct target at runtime using APIs like bpf_program__attach_kprobe().
So this patch set improves ergonomics by allowing simple SEC() definitions that define BPF program type and nothing else. Such programs won't be auto-attachable, of course, but they also won't fail skeleton auto-attachment, just like we do this for uprobes.
v1->v2:
- rebased and added Song's acks.
Andrii Nakryiko (3):
libbpf: allow "incomplete" basic tracing SEC() definitions
libbpf: support target-less SEC() definitions for BTF-backed programs selftests/bpf: use target-less SEC() definitions in various tests
tools/lib/bpf/libbpf.c | 118 ++++++++++++------ .../selftests/bpf/prog_tests/attach_probe.c | 10 ++ .../bpf/prog_tests/kprobe_multi_test.c | 14 +-- .../selftests/bpf/progs/kprobe_multi.c | 14 +++ .../selftests/bpf/progs/test_attach_probe.c | 23 +++- .../selftests/bpf/progs/test_module_attach.c | 2 +- 6 files changed, 135 insertions(+), 46 deletions(-)
Signature · 1 line
2.30.2