Skip to content

Commit 229087f

Browse files
anakryikoborkmann
authored andcommitted
bpf, kconfig: Fix DEBUG_INFO_BTF_MODULES Kconfig definition
Turns out that due to CONFIG_DEBUG_INFO_BTF_MODULES not having an explicitly specified "menu item name" in Kconfig, it's basically impossible to turn it off (see [0]). This patch fixes the issue by defining menu name for CONFIG_DEBUG_INFO_BTF_MODULES, which makes it actually adjustable and independent of CONFIG_DEBUG_INFO_BTF, in the sense that one can have DEBUG_INFO_BTF=y and DEBUG_INFO_BTF_MODULES=n. We still keep it as defaulting to Y, of course. Fixes: 5f9ae91 ("kbuild: Build kernel module BTFs if BTF is enabled and pahole supports it") Reported-by: Vincent Li <[email protected]> Signed-off-by: Andrii Nakryiko <[email protected]> Signed-off-by: Daniel Borkmann <[email protected]> Link: https://lore.kernel.org/bpf/CAK3+h2xiFfzQ9UXf56nrRRP=p1+iUxGoEP5B+aq9MDT5jLXDSg@mail.gmail.com [0] Link: https://lore.kernel.org/bpf/[email protected]
1 parent c88b9b4 commit 229087f

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

lib/Kconfig.debug

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -375,7 +375,7 @@ config DEBUG_INFO_SPLIT
375375
Incompatible with older versions of ccache.
376376

377377
config DEBUG_INFO_BTF
378-
bool "Generate BTF typeinfo"
378+
bool "Generate BTF type information"
379379
depends on !DEBUG_INFO_SPLIT && !DEBUG_INFO_REDUCED
380380
depends on !GCC_PLUGIN_RANDSTRUCT || COMPILE_TEST
381381
depends on BPF_SYSCALL
@@ -408,7 +408,8 @@ config PAHOLE_HAS_LANG_EXCLUDE
408408
using DEBUG_INFO_BTF_MODULES.
409409

410410
config DEBUG_INFO_BTF_MODULES
411-
def_bool y
411+
bool "Generate BTF type information for kernel modules"
412+
default y
412413
depends on DEBUG_INFO_BTF && MODULES && PAHOLE_HAS_SPLIT_BTF
413414
help
414415
Generate compact split BTF type information for kernel modules.

0 commit comments

Comments
 (0)