summaryrefslogtreecommitdiffstats
path: root/kernel/bpf/stackmap.c
diff options
context:
space:
mode:
authorAlexei Starovoitov <ast@kernel.org>2020-07-23 22:05:46 -0700
committerAlexei Starovoitov <ast@kernel.org>2020-07-25 20:16:34 -0700
commit909e446b3204642bdb54ab2f225652be89d91268 (patch)
treead893338be4daaf48000287dc6eb57a00e76ff8c /kernel/bpf/stackmap.c
parenta228a64fc1e4428e2b96dc68e9ad3c447095c9e7 (diff)
parent9efcc4ad7a15ea50550c53fbf62457c309216051 (diff)
downloadlinux-stable-909e446b3204642bdb54ab2f225652be89d91268.tar.gz
linux-stable-909e446b3204642bdb54ab2f225652be89d91268.tar.bz2
linux-stable-909e446b3204642bdb54ab2f225652be89d91268.zip
Merge branch 'bpf_iter-for-map-elems'
Yonghong Song says: ==================== Bpf iterator has been implemented for task, task_file, bpf_map, ipv6_route, netlink, tcp and udp so far. For map elements, there are two ways to traverse all elements from user space: 1. using BPF_MAP_GET_NEXT_KEY bpf subcommand to get elements one by one. 2. using BPF_MAP_LOOKUP_BATCH bpf subcommand to get a batch of elements. Both these approaches need to copy data from kernel to user space in order to do inspection. This patch implements bpf iterator for map elements. User can have a bpf program in kernel to run with each map element, do checking, filtering, aggregation, modifying values etc. without copying data to user space. Patch #1 and #2 are refactoring. Patch #3 implements readonly/readwrite buffer support in verifier. Patches #4 - #7 implements map element support for hash, percpu hash, lru hash lru percpu hash, array, percpu array and sock local storage maps. Patches #8 - #9 are libbpf and bpftool support. Patches #10 - #13 are selftests for implemented map element iterators. Changelogs: v3 -> v4: . fix a kasan failure triggered by a failed bpf_iter link_create, not just free_link but need cleanup_link. (Alexei) v2 -> v3: . rebase on top of latest bpf-next v1 -> v2: . support to modify map element values. (Alexei) . map key/values can be used with helper arguments for those arguments with ARG_PTR_TO_MEM or ARG_PTR_TO_INIT_MEM register type. (Alexei) . remove usused variable. (kernel test robot) ==================== Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Diffstat (limited to 'kernel/bpf/stackmap.c')
0 files changed, 0 insertions, 0 deletions