summaryrefslogtreecommitdiffstats
path: root/tools/bpf
diff options
context:
space:
mode:
authorGrant Seltzer <grantseltzer@gmail.com>2021-02-22 20:58:46 +0100
committerDaniel Borkmann <daniel@iogearbox.net>2021-02-24 17:24:37 +0100
commitb9fc8b4a591811546fec2dbef7e9f809362100c9 (patch)
treeeaece48e6c6e55335c1af28dbf2747b91dcd1c72 /tools/bpf
parentMerge tag 'perf-core-2021-02-17' of git://git.kernel.org/pub/scm/linux/kernel... (diff)
downloadlinux-b9fc8b4a591811546fec2dbef7e9f809362100c9.tar.xz
linux-b9fc8b4a591811546fec2dbef7e9f809362100c9.zip
bpf: Add kernel/modules BTF presence checks to bpftool feature command
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
Diffstat (limited to 'tools/bpf')
-rw-r--r--tools/bpf/bpftool/feature.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/tools/bpf/bpftool/feature.c b/tools/bpf/bpftool/feature.c
index 359960a8f1de..40a88df275f9 100644
--- a/tools/bpf/bpftool/feature.c
+++ b/tools/bpf/bpftool/feature.c
@@ -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", },