Fix BPF verifier global subprog context argument logic
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 3 repliesApplied 3/3
- v13 patches 2 repliesSuperseded
Changes in v2 from the cover letter
- fix compilation warning on arm64 and s390x by force-casting ctx to void *, to discard const from const struct user_pt_regs *, when passing it to bpf_get_stack().
Patches in v2 All 3 applied
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/3 | bpf: fix global subprog context argument resolution logickernel/ | +11 | 0 replies | Applied |
| 2/3 | selftests/bpf: convert test_global_funcs test to test_loader frameworktools/ tools/ tools/ +15 more | +174 | 0 replies | Applied |
| 3/3 | selftests/bpf: add global subprog context passing teststools/ tools/ | +107 | 1 reply | Applied |
Reviews trailers per patch
None of the 3 patches has a Reviewed-by or Acked-by of their own; the series has one for all of them.
| Patch | Stanislav Fomichev |
|---|---|
| Series | A-b |
| 1/3 | |
| 2/3 | |
| 3/3 |
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] Fix BPF verifier global subprog context argument logic
Fix kernel bug in determining whether global subprog's argument is PTR_TO_CTX, which is done based on type names. Currently KPROBE programs are broken.
Add few tests validating that KPROBE context can be passed to global subprog. For that also refactor test_global_funcs test to use test_loader framework.
v1->v2:
- fix compilation warning on arm64 and s390x by force-casting ctx to void *, to discard const from const struct user_pt_regs *, when passing it to bpf_get_stack().
Andrii Nakryiko (3):
bpf: fix global subprog context argument resolution logic selftests/bpf: convert test_global_funcs test to test_loader framework selftests/bpf: add global subprog context passing tests
kernel/bpf/btf.c | 13 +- .../bpf/prog_tests/test_global_funcs.c | 133 +++++------------- .../selftests/bpf/progs/test_global_func1.c | 6 +- .../selftests/bpf/progs/test_global_func10.c | 4 +- .../selftests/bpf/progs/test_global_func11.c | 4 +- .../selftests/bpf/progs/test_global_func12.c | 4 +- .../selftests/bpf/progs/test_global_func13.c | 4 +- .../selftests/bpf/progs/test_global_func14.c | 4 +- .../selftests/bpf/progs/test_global_func15.c | 4 +- .../selftests/bpf/progs/test_global_func16.c | 4 +- .../selftests/bpf/progs/test_global_func17.c | 4 +- .../selftests/bpf/progs/test_global_func2.c | 43 +++++- .../selftests/bpf/progs/test_global_func3.c | 10 +- .../selftests/bpf/progs/test_global_func4.c | 55 +++++++- .../selftests/bpf/progs/test_global_func5.c | 4 +- .../selftests/bpf/progs/test_global_func6.c | 4 +- .../selftests/bpf/progs/test_global_func7.c | 4 +- .../selftests/bpf/progs/test_global_func8.c | 4 +- .../selftests/bpf/progs/test_global_func9.c | 4 +- .../bpf/progs/test_global_func_ctx_args.c | 105 ++++++++++++++ 20 files changed, 292 insertions(+), 125 deletions(-) create mode 100644 tools/testing/selftests/bpf/progs/test_global_func_ctx_args.c
Signature · 1 line
2.30.2