libbpf: clarify raw-address single kprobe attach behavior
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
- v7 Latest3 patches 0 repliesApplied 3/3
- v63 patches 3 repliesSuperseded
- v52 patches 0 repliesSuperseded
Earlier versions · 2
| Version | Posted | Patches | Replies | Status |
|---|---|---|---|---|
| v4 | 2 patches | 4 replies | Superseded | |
| v3 | 2 patches | 0 replies | Superseded |
Changes in v7 from the cover letter
- Change selftest line wrapping and assertions
Patches in v7 All 3 applied
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/3 | libbpf: use direct error codes for kprobe/uprobe attachtools/ | +2 | 0 replies | Applied |
| 2/3 | libbpf: clarify raw-address single kprobe attach behaviortools/ tools/ | +34 | 0 replies | Applied |
| 3/3 | selftests/bpf: add test for raw-address single kprobe attachtools/ | +80 | 0 replies | Applied |
Reviews trailers per patch
All 3 patches have a Reviewed-by or Acked-by.
| Patch | Jiri Olsa |
|---|---|
| 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 bpf-next v7 0/3] libbpf: clarify raw-address single kprobe attach behavior
Today libbpf documents single-kprobe attach through func_name, with an optional offset. For the PMU-based path, func_name = NULL with an absolute address in offset already works as well, but that is not described in the API.
This patchset clarifies this behavior. First commit fixes kprobe and uprobe attach error handling to use direct error codes. Next adds kprobe API comments for the raw-address form and rejects it explicitly for legacy tracefs/debugfs kprobes. Last adds PERF and LINK selftests for the raw-address form, and checks that LEGACY rejects it.
---
Changes in v7:
- Change selftest line wrapping and assertions
Changes in v6:
- Split the kprobe/uprobe direct error-code fix into a separate patch
Changes in v5:
- Add kprobe API docs, use -EOPNOTSUPP, and switch selftests to LIBBPF_OPTS
Changes in v4:
- Inline raw-address error formatting and remove the probe_target buffer
Changes in v3:
- Drop bpf_kprobe_opts.addr and reuse offset when func_name is NULL
- Make legacy tracefs/debugfs kprobes reject the raw-address form
- Update selftests to cover PERF/LINK raw-address attach and LEGACY reject
Changes in v2:
- Fix line wrapping and indentation
Hoyeon Lee (3):
libbpf: use direct error codes for kprobe/uprobe attach
libbpf: clarify raw-address single kprobe attach behavior selftests/bpf: add test for raw-address single kprobe attach
tools/lib/bpf/libbpf.c | 18 +++-- tools/lib/bpf/libbpf.h | 27 ++++++- .../selftests/bpf/prog_tests/attach_probe.c | 80 +++++++++++++++++++ 3 files changed, 116 insertions(+), 9 deletions(-)
Signature · 1 line
2.52.0