Skip to content

Commit

Permalink
bpf: Add kernel/modules BTF presence checks to bpftool feature command
Browse files Browse the repository at this point in the history
This adds both the CONFIG_DEBUG_INFO_BTF and CONFIG_DEBUG_INFO_BTF_MODULES
kernel compile option to output of the bpftool feature command.

This is relevant for developers that want to account for data structure
definition differences between kernels.

Signed-off-by: Grant Seltzer <grantseltzer@gmail.com>
Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Acked-by: Martin KaFai Lau <kafai@fb.com>
Link: https://lore.kernel.org/bpf/20210222195846.155483-1-grantseltzer@gmail.com
  • Loading branch information
Grant Seltzer authored and Daniel Borkmann committed Feb 24, 2021
1 parent d310ec0 commit b9fc8b4
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions tools/bpf/bpftool/feature.c
Original file line number Diff line number Diff line change
Expand Up @@ -336,6 +336,10 @@ static void probe_kernel_image_config(const char *define_prefix)
{ "CONFIG_BPF_JIT", },
/* Avoid compiling eBPF interpreter (use JIT only) */
{ "CONFIG_BPF_JIT_ALWAYS_ON", },
/* Kernel BTF debug information available */
{ "CONFIG_DEBUG_INFO_BTF", },
/* Kernel module BTF debug information available */
{ "CONFIG_DEBUG_INFO_BTF_MODULES", },

/* cgroups */
{ "CONFIG_CGROUPS", },
Expand Down

0 comments on commit b9fc8b4

Please sign in to comment.