2
0
mirror of https://github.com/edk2-porting/linux-next.git synced 2024-12-15 16:53:54 +08:00

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
This commit is contained in:
Grant Seltzer 2021-02-22 19:58:46 +00:00 committed by Daniel Borkmann
parent d310ec03a3
commit b9fc8b4a59

View File

@ -336,6 +336,10 @@ static void probe_kernel_image_config(const char *define_prefix)
{ "CONFIG_BPF_JIT", }, { "CONFIG_BPF_JIT", },
/* Avoid compiling eBPF interpreter (use JIT only) */ /* Avoid compiling eBPF interpreter (use JIT only) */
{ "CONFIG_BPF_JIT_ALWAYS_ON", }, { "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 */ /* cgroups */
{ "CONFIG_CGROUPS", }, { "CONFIG_CGROUPS", },