bpf: Add uprobe session support
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
- v9 Latest13 patches 1 replyApplied 13/13
- v8 posting 2/213 patches 0 repliesSuperseded
- v8 posting 1/22 patches 0 repliesApplied
Earlier versions · 7
| Version | Posted | Patches | Replies | Status |
|---|---|---|---|---|
| v7 | 15 patches | 0 replies | Superseded | |
| v6 | 16 patches | 17 replies | Superseded | |
| v5 | 13 patches | 15 replies | Superseded | |
| v4 | 14 patches | 8 replies | Superseded 1 of 14 applied | |
| v3 | 7 patches | 22 replies | Superseded | |
| v2 | 9 patches | 34 replies | Superseded | |
| v1 RFC | 10 patches | 17 replies | Superseded |
Changes in v9 from the cover letter
- rebased on bpf-next/master with perf/core tag merged (thanks Peter!)
Patches in v9 All 13 applied
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/13 | bpf: Allow return values 0 and 1 for kprobe sessionkernel/ | +9 | 0 replies | Applied |
| 2/13 | bpf: Force uprobe bpf program to always return 0kernel/ | +2 | 0 replies | Applied |
| 3/13 | bpf: Add support for uprobe multi session attachinclude/ kernel/ kernel/ +3 more | +38 | 0 replies | Applied |
| 4/13 | bpf: Add support for uprobe multi session contextkernel/ | +18 | 0 replies | Applied |
| 5/13 | libbpf: Add support for uprobe multi session attachtools/ tools/ tools/ | +20 | 1 reply | Applied |
| 6/13 | selftests/bpf: Add uprobe session testtools/ tools/ | +118 | 0 replies | Applied |
| 7/13 | selftests/bpf: Add uprobe session cookie testtools/ tools/ | +79 | 0 replies | Applied |
| 8/13 | selftests/bpf: Add uprobe session recursive testtools/ tools/ | +101 | 0 replies | Applied |
| 9/13 | selftests/bpf: Add uprobe session verifier test for return valuetools/ tools/ | +33 | 0 replies | Applied |
| 10/13 | selftests/bpf: Add kprobe session verifier test for return valuetools/ tools/ | +33 | 0 replies | Applied |
| 11/13 | selftests/bpf: Add uprobe session single consumer testtools/ tools/ | +77 | 0 replies | Applied |
| 12/13 | selftests/bpf: Add uprobe sessions to consumer testtools/ tools/ | +52 | 0 replies | Applied |
| 13/13 | selftests/bpf: Add threads to consumer testtools/ | +80 | 0 replies | Applied |
Reviews trailers per patch
12 of 13 patches have a Reviewed-by or Acked-by.
| Patch | Andrii Nakryiko |
|---|---|
| 1/13 | A-b |
| 2/13 | A-b |
| 3/13 | A-b |
| 4/13 | A-b |
| 5/13 | A-b |
| 6/13 | A-b |
| 7/13 | A-b |
| 8/13 | A-b |
| 9/13 | A-b |
| 10/13 | A-b |
| 11/13 | A-b |
| 12/13 | |
| 13/13 | A-b |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [PATCHv9 bpf-next 00/13] bpf: Add uprobe session support
hi,
this patchset is adding support for session uprobe attachment and using it through bpf link for bpf programs.
The session means that the uprobe consumer is executed on entry and return of probed function with additional control:
- entry callback can control execution of the return callback
- entry and return callbacks can share data/cookie
Uprobe changes (on top of perf/core [1] are posted in here [2]. This patchset is based on bpf-next/master and will be merged once we pull [2] in bpf-next/master.
v9 changes:
- rebased on bpf-next/master with perf/core tag merged (thanks Peter!)
thanks,
jirka
[1] git://git.kernel.org/pub/scm/linux/kernel/git/peterz/queue.git perf/core
[2] https://lore.kernel.org/bpf/[email protected]/T/#ma43c549c4bf684ca1b17fa638aa5e7cbb46893e9
---
Jiri Olsa (13):
bpf: Allow return values 0 and 1 for kprobe session
bpf: Force uprobe bpf program to always return 0
bpf: Add support for uprobe multi session attach
bpf: Add support for uprobe multi session context
libbpf: Add support for uprobe multi session attach
selftests/bpf: Add uprobe session test
selftests/bpf: Add uprobe session cookie test
selftests/bpf: Add uprobe session recursive test
selftests/bpf: Add uprobe session verifier test for return value
selftests/bpf: Add kprobe session verifier test for return value
selftests/bpf: Add uprobe session single consumer test
selftests/bpf: Add uprobe sessions to consumer test
selftests/bpf: Add threads to consumer test
include/uapi/linux/bpf.h | 1 + kernel/bpf/syscall.c | 9 ++- kernel/bpf/verifier.c | 10 +++ kernel/trace/bpf_trace.c | 57 +++++++++++---- tools/include/uapi/linux/bpf.h | 1 + tools/lib/bpf/bpf.c | 1 + tools/lib/bpf/libbpf.c | 19 ++++- tools/lib/bpf/libbpf.h | 4 +- tools/testing/selftests/bpf/prog_tests/kprobe_multi_test.c | 2 + tools/testing/selftests/bpf/prog_tests/uprobe_multi_test.c | 337 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++---------- tools/testing/selftests/bpf/progs/kprobe_multi_verifier.c | 31 ++++++++ tools/testing/selftests/bpf/progs/uprobe_multi_consumers.c | 6 +- tools/testing/selftests/bpf/progs/uprobe_multi_session.c | 71 ++++++++++++++++++ tools/testing/selftests/bpf/progs/uprobe_multi_session_cookie.c | 48 ++++++++++++ tools/testing/selftests/bpf/progs/uprobe_multi_session_recursive.c | 44 +++++++++++ tools/testing/selftests/bpf/progs/uprobe_multi_session_single.c | 44 +++++++++++ tools/testing/selftests/bpf/progs/uprobe_multi_verifier.c | 31 ++++++++ 17 files changed, 653 insertions(+), 63 deletions(-) create mode 100644 tools/testing/selftests/bpf/progs/kprobe_multi_verifier.c create mode 100644 tools/testing/selftests/bpf/progs/uprobe_multi_session.c create mode 100644 tools/testing/selftests/bpf/progs/uprobe_multi_session_cookie.c create mode 100644 tools/testing/selftests/bpf/progs/uprobe_multi_session_recursive.c create mode 100644 tools/testing/selftests/bpf/progs/uprobe_multi_session_single.c create mode 100644 tools/testing/selftests/bpf/progs/uprobe_multi_verifier.c