Add support of pointer to struct in global functions
Get series with b4
b4 am [email protected]Versions newest first · linked by author and title
- v3 Latest4 patches 7 repliesIn review
- v24 patches 5 repliesSuperseded
- v13 patches 9 repliesSuperseded
Changes in v3 from the cover letter
- Fix reg ID generation
- Fix commit description
- Fix typo
- Fix tests
Patches in v3 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/4 | bpf: Rename bpf_reg_state variableskernel/ | +12 | 1 reply | |
| 2/4 | bpf: Extract nullable reg type conversion into a helper functionkernel/ | +52 | 1 reply | |
| 3/4 | bpf: Support pointers in global func argsinclude/ kernel/ kernel/ | +77 | 3 replies | |
| 4/4 | selftests/bpf: Add unit tests for pointers in global functionstools/ tools/ tools/ +8 more | +449 | 3 replies |
Reviews trailers per patch
All 4 patches have a Reviewed-by or Acked-by.
| Patch | Andrii Nakryiko |
|---|---|
| 1/4 | A-b |
| 2/4 | A-b |
| 3/4 | A-b |
| 4/4 | A-b |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [PATCH v3 bpf-next 0/4] Add support of pointer to struct in global functions
This patchset adds support of pointers to type with known size among global function arguments.
The motivation is to overcome the limit on the maximum number of allowed arguments and avoid tricky and unoptimal ways of passing arguments.
A referenced type may contain pointers but access via such pointers cannot be veirified currently.
v2 -> v3
- Fix reg ID generation
- Fix commit description
- Fix typo
- Fix tests
v1 -> v2:
- Allow pointer to any type with known size rather than struct only
- Allow pointer in global functions only
- Add more tests
- Fix wrapping and v1 comments
Dmitrii Banshchikov (4):
bpf: Rename bpf_reg_state variables
bpf: Extract nullable reg type conversion into a helper function
bpf: Support pointers in global func args selftests/bpf: Add unit tests for pointers in global functions
include/linux/bpf_verifier.h | 2 + kernel/bpf/btf.c | 71 +++++++--- kernel/bpf/verifier.c | 113 +++++++++++---- .../bpf/prog_tests/global_func_args.c | 60 ++++++++ .../bpf/prog_tests/test_global_funcs.c | 8 ++ .../selftests/bpf/progs/test_global_func10.c | 29 ++++ .../selftests/bpf/progs/test_global_func11.c | 19 +++ .../selftests/bpf/progs/test_global_func12.c | 21 +++ .../selftests/bpf/progs/test_global_func13.c | 24 ++++ .../selftests/bpf/progs/test_global_func14.c | 21 +++ .../selftests/bpf/progs/test_global_func15.c | 22 +++ .../selftests/bpf/progs/test_global_func16.c | 22 +++ .../selftests/bpf/progs/test_global_func9.c | 132 ++++++++++++++++++ .../bpf/progs/test_global_func_args.c | 91 ++++++++++++ 14 files changed, 588 insertions(+), 47 deletions(-) create mode 100644 tools/testing/selftests/bpf/prog_tests/global_func_args.c create mode 100644 tools/testing/selftests/bpf/progs/test_global_func10.c create mode 100644 tools/testing/selftests/bpf/progs/test_global_func11.c create mode 100644 tools/testing/selftests/bpf/progs/test_global_func12.c create mode 100644 tools/testing/selftests/bpf/progs/test_global_func13.c create mode 100644 tools/testing/selftests/bpf/progs/test_global_func14.c create mode 100644 tools/testing/selftests/bpf/progs/test_global_func15.c create mode 100644 tools/testing/selftests/bpf/progs/test_global_func16.c create mode 100644 tools/testing/selftests/bpf/progs/test_global_func9.c create mode 100644 tools/testing/selftests/bpf/progs/test_global_func_args.c
Signature · 1 line
2.25.1