summaryrefslogtreecommitdiff
path: root/init
diff options
context:
space:
mode:
authorAlexei Starovoitov <ast@kernel.org>2020-08-18 21:27:57 -0700
committerDaniel Borkmann <daniel@iogearbox.net>2020-08-20 16:02:36 +0200
commitf0fdfefb2d4da5b76c3f810be0edb2ab90360224 (patch)
tree453bb56dfa2c9e377bf1086ddf76670f5a4a56e2 /init
parent005142b8a1f0f32d33fbe04b728464c1b7acfa0e (diff)
bpf: Add BPF program and map iterators as built-in BPF programs.
The program and map iterators work similar to seq_file-s. Once the program is pinned in bpffs it can be read with "cat" tool to print human readable output. In this case about BPF programs and maps. For example: $ cat /sys/fs/bpf/progs.debug id name attached 5 dump_bpf_map bpf_iter_bpf_map 6 dump_bpf_prog bpf_iter_bpf_prog $ cat /sys/fs/bpf/maps.debug id name max_entries 3 iterator.rodata 1 To avoid kernel build dependency on clang 10 separate bpf skeleton generation into manual "make" step and instead check-in generated .skel.h into git. Unlike 'bpftool prog show' in-kernel BTF name is used (when available) to print full name of BPF program instead of 16-byte truncated name. Signed-off-by: Alexei Starovoitov <ast@kernel.org> Signed-off-by: Daniel Borkmann <daniel@iogearbox.net> Acked-by: Andrii Nakryiko <andriin@fb.com> Link: https://lore.kernel.org/bpf/20200819042759.51280-3-alexei.starovoitov@gmail.com
Diffstat (limited to 'init')
0 files changed, 0 insertions, 0 deletions