libbpf: support custom SEC() handlers
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
- v5 Latest3 patches 0 repliesApplied 3/3
- v43 patches 3 repliesSuperseded
- v33 patches 12 repliesSuperseded
Earlier versions · 2
| Version | Posted | Patches | Replies | Status |
|---|---|---|---|---|
| v2 | 3 patches | 0 replies | Superseded | |
| v1 | 3 patches | 6 replies | Superseded |
Changes in v5 from the cover letter
- API documentation improvements (Daniel);
Patches in v5 All 3 applied
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/3 | libbpf: allow BPF program auto-attach handlers to bail outtools/ | +85 | 0 replies | Applied |
| 2/3 | libbpf: support custom SEC() handlerstools/ tools/ tools/ +1 more | +268 | 0 replies | Applied |
| 3/3 | selftests/bpf: add custom SEC() handling selftesttools/ tools/ | +239 | 0 replies | Applied |
Reviews trailers per patch
All 3 patches have a Reviewed-by or Acked-by.
| Patch | Alan Maguire |
|---|---|
| 1/3 | R-b T-b |
| 2/3 | R-b T-b |
| 3/3 | R-b T-b |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [PATCH v5 bpf-next 0/3] libbpf: support custom SEC() handlers
Add ability for user applications and libraries to register custom BPF program SEC() handlers. See patch #2 for examples where this is useful.
Patch #1 does some preliminary refactoring to allow exponsing program init, preload, and attach callbacks as public API. It also establishes a protocol to allow optional auto-attach behavior. This will also help the case of sometimes auto-attachable uprobes.
v4->v5:
- API documentation improvements (Daniel);v3->v4:
- init_fn -> prog_setup_fn, preload_fn -> prog_prepare_load_fn (Alexei);v2->v3:
- moved callbacks and cookie into OPTS struct (Alan);
- added more test scenarios (Alan);
- address most of Alan's feedback, but kept API name;v1->v2:
- resubmitting due to git send-email screw up.
Andrii Nakryiko (3):
libbpf: allow BPF program auto-attach handlers to bail out
libbpf: support custom SEC() handlers selftests/bpf: add custom SEC() handling selftest
tools/lib/bpf/libbpf.c | 332 ++++++++++++------ tools/lib/bpf/libbpf.h | 109 ++++++ tools/lib/bpf/libbpf.map | 6 + tools/lib/bpf/libbpf_version.h | 2 +- .../bpf/prog_tests/custom_sec_handlers.c | 176 ++++++++++ .../bpf/progs/test_custom_sec_handlers.c | 63 ++++ 6 files changed, 586 insertions(+), 102 deletions(-) create mode 100644 tools/testing/selftests/bpf/prog_tests/custom_sec_handlers.c create mode 100644 tools/testing/selftests/bpf/progs/test_custom_sec_handlers.c
Signature · 1 line
2.30.2