aboutsummaryrefslogtreecommitdiff
path: root/include/uapi/linux/bpf.h
diff options
context:
space:
mode:
authorGravatar Raman Shukhau <ramasha@fb.com> 2022-01-19 02:02:55 -0800
committerGravatar Andrii Nakryiko <andrii@kernel.org> 2022-01-19 10:04:41 -0800
commitb662000aff84f2ca9660db15e5f8ac926681df27 (patch)
tree9abb535a224c7dc4899b8a0c734772f4549a8764 /include/uapi/linux/bpf.h
parentlibbpf: Define BTF_KIND_* constants in btf.h to avoid compilation errors (diff)
downloadlinux-b662000aff84f2ca9660db15e5f8ac926681df27.tar.gz
linux-b662000aff84f2ca9660db15e5f8ac926681df27.tar.bz2
linux-b662000aff84f2ca9660db15e5f8ac926681df27.zip
bpftool: Adding support for BTF program names
`bpftool prog list` and other bpftool subcommands that show BPF program names currently get them from bpf_prog_info.name. That field is limited to 16 (BPF_OBJ_NAME_LEN) chars which leads to truncated names since many progs have much longer names. The idea of this change is to improve all bpftool commands that output prog name so that bpftool uses info from BTF to print program names if available. It tries bpf_prog_info.name first and fall back to btf only if the name is suspected to be truncated (has 15 chars length). Right now `bpftool p show id <id>` returns capped prog name <id>: kprobe name example_cap_cap tag 712e... ... With this change it would return <id>: kprobe name example_cap_capable tag 712e... ... Note, other commands that print prog names (e.g. "bpftool cgroup tree") are also addressed in this change. Signed-off-by: Raman Shukhau <ramasha@fb.com> Signed-off-by: Andrii Nakryiko <andrii@kernel.org> Link: https://lore.kernel.org/bpf/20220119100255.1068997-1-ramasha@fb.com
Diffstat (limited to 'include/uapi/linux/bpf.h')
0 files changed, 0 insertions, 0 deletions