bpf: Count the number of times recursion was prevented
authorAlexei Starovoitov <ast@kernel.org>
Wed, 10 Feb 2021 03:36:31 +0000 (19:36 -0800)
committerDaniel Borkmann <daniel@iogearbox.net>
Thu, 11 Feb 2021 15:19:20 +0000 (16:19 +0100)
commit9ed9e9ba2337205311398a312796c213737bac35
tree361082a8f4e91f8d2891a77168843bdce88a9958
parent406c557edc5bb903db9f6cdd543cfc282c663ad8
bpf: Count the number of times recursion was prevented

Add per-program counter for number of times recursion prevention mechanism
was triggered and expose it via show_fdinfo and bpf_prog_info.
Teach bpftool to print it.

Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Acked-by: Andrii Nakryiko <andrii@kernel.org>
Link: https://lore.kernel.org/bpf/20210210033634.62081-7-alexei.starovoitov@gmail.com
include/linux/filter.h
include/uapi/linux/bpf.h
kernel/bpf/syscall.c
kernel/bpf/trampoline.c
tools/bpf/bpftool/prog.c
tools/include/uapi/linux/bpf.h