summaryrefslogtreecommitdiff
path: root/kernel/bpf/arraymap.c
diff options
context:
space:
mode:
authorAndrii Nakryiko <andrii@kernel.org>2024-08-09 02:22:29 +0300
committerAlexei Starovoitov <ast@kernel.org>2024-08-21 20:37:52 +0300
commitbaebe9aaba1e59e34cd1fe6455bb4c3029ad3bc1 (patch)
tree4f82bb8495a612d772caea6ea667d99fcd94bf31 /kernel/bpf/arraymap.c
parent496ddd19a0fad22f250fc7a7b7a8000155418934 (diff)
downloadlinux-baebe9aaba1e59e34cd1fe6455bb4c3029ad3bc1.tar.xz
bpf: allow passing struct bpf_iter_<type> as kfunc arguments
There are potentially useful cases where a specific iterator type might need to be passed into some kfunc. So, in addition to existing bpf_iter_<type>_{new,next,destroy}() kfuncs, allow to pass iterator pointer to any kfunc. We employ "__iter" naming suffix for arguments that are meant to accept iterators. We also enforce that they accept PTR -> STRUCT btf_iter_<type> type chain and point to a valid initialized on-the-stack iterator state. Signed-off-by: Andrii Nakryiko <andrii@kernel.org> Link: https://lore.kernel.org/r/20240808232230.2848712-3-andrii@kernel.org Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Diffstat (limited to 'kernel/bpf/arraymap.c')
0 files changed, 0 insertions, 0 deletions