Support passing BPF iterator to kfuncs
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
Patches in v1 All 3 applied
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/3 | bpf: extract iterator argument type and name validation logicinclude/ kernel/ | +41 | 1 reply | Applied |
| 2/3 | bpf: allow passing struct bpf_iter_<type> as kfunc argumentskernel/ | +24 | 4 replies | Applied |
| 3/3 | selftests/bpf: test passing iterator to a kfunctools/ tools/ | +62 | 0 replies | Applied |
Reviews trailers per patch
1 of 3 patches has a Reviewed-by or Acked-by.
| Patch | Eduard Zingerman |
|---|---|
| 1/3 | A-b |
| 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 bpf-next 0/3] Support passing BPF iterator to kfuncs
Add support for passing BPF iterator state to any kfunc. Such kfunc has to declare such argument with valid struct bpf_iter_<type> * type and should use "__iter" suffix in argument name, following the established suffix-based convention. We add a simple test/demo iterator getter in bpf_testmod.
Andrii Nakryiko (3):
bpf: extract iterator argument type and name validation logic
bpf: allow passing struct bpf_iter_<type> as kfunc arguments selftests/bpf: test passing iterator to a kfunc
include/linux/btf.h | 5 ++ kernel/bpf/btf.c | 50 +++++++++++++------ kernel/bpf/verifier.c | 35 +++++++++---- .../selftests/bpf/bpf_testmod/bpf_testmod.c | 16 ++++-- .../selftests/bpf/progs/iters_testmod_seq.c | 50 +++++++++++++++++++ 5 files changed, 127 insertions(+), 29 deletions(-)
Signature · 1 line
2.43.5