]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
lib/Kconfig.debug: Set the minimum required pahole version to v1.22
authorIhor Solodrai <ihor.solodrai@linux.dev>
Fri, 19 Dec 2025 18:18:23 +0000 (10:18 -0800)
committerAndrii Nakryiko <andrii@kernel.org>
Fri, 19 Dec 2025 18:55:40 +0000 (10:55 -0800)
Subsequent patches in the series change vmlinux linking scripts to
unconditionally pass --btf_encode_detached to pahole, which was
introduced in v1.22 [1][2].

This change allows to remove PAHOLE_HAS_SPLIT_BTF Kconfig option and
other checks of older pahole versions.

[1] https://github.com/acmel/dwarves/releases/tag/v1.22
[2] https://lore.kernel.org/bpf/cbafbf4e-9073-4383-8ee6-1353f9e5869c@oracle.com/

Signed-off-by: Ihor Solodrai <ihor.solodrai@linux.dev>
Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
Tested-by: Alan Maguire <alan.maguire@oracle.com>
Acked-by: Eduard Zingerman <eddyz87@gmail.com>
Acked-by: Nicolas Schier <nsc@kernel.org>
Link: https://lore.kernel.org/bpf/20251219181825.1289460-1-ihor.solodrai@linux.dev
Documentation/process/changes.rst
Documentation/scheduler/sched-ext.rst
lib/Kconfig.debug
scripts/Makefile.btf
tools/sched_ext/README.md

index 62951cdb13add057e680cb3b0229ff1a93e88b7c..b7e329159d00e596379b044803ae4e520625fc47 100644 (file)
@@ -38,7 +38,7 @@ bash                   4.2              bash --version
 binutils               2.30             ld -v
 flex                   2.5.35           flex --version
 bison                  2.0              bison --version
-pahole                 1.16             pahole --version
+pahole                 1.22             pahole --version
 util-linux             2.10o            mount --version
 kmod                   13               depmod -V
 e2fsprogs              1.41.4           e2fsck -V
@@ -143,7 +143,7 @@ pahole
 
 Since Linux 5.2, if CONFIG_DEBUG_INFO_BTF is selected, the build system
 generates BTF (BPF Type Format) from DWARF in vmlinux, a bit later from kernel
-modules as well.  This requires pahole v1.16 or later.
+modules as well.  This requires pahole v1.22 or later.
 
 It is found in the 'dwarves' or 'pahole' distro packages or from
 https://fedorapeople.org/~acme/dwarves/.
index 404fe6126a7694bcc1486679418e4aa3d55c5abe..9e2882d937b43027b489bc76cee73bc5a38d7cda 100644 (file)
@@ -43,7 +43,6 @@ options should be enabled to use sched_ext:
     CONFIG_DEBUG_INFO_BTF=y
     CONFIG_BPF_JIT_ALWAYS_ON=y
     CONFIG_BPF_JIT_DEFAULT_ON=y
-    CONFIG_PAHOLE_HAS_SPLIT_BTF=y
     CONFIG_PAHOLE_HAS_BTF_TAG=y
 
 sched_ext is used only when the BPF scheduler is loaded and running.
index ba36939fda79bf890834b586c366a28acd434ef9..60281c4f9e99145a8c2842d4c928d5f986d76803 100644 (file)
@@ -388,18 +388,13 @@ config DEBUG_INFO_BTF
        depends on !DEBUG_INFO_SPLIT && !DEBUG_INFO_REDUCED
        depends on !GCC_PLUGIN_RANDSTRUCT || COMPILE_TEST
        depends on BPF_SYSCALL
-       depends on PAHOLE_VERSION >= 116
-       depends on DEBUG_INFO_DWARF4 || PAHOLE_VERSION >= 121
+       depends on PAHOLE_VERSION >= 122
        # pahole uses elfutils, which does not have support for Hexagon relocations
        depends on !HEXAGON
        help
          Generate deduplicated BTF type information from DWARF debug info.
-         Turning this on requires pahole v1.16 or later (v1.21 or later to
-         support DWARF 5), which will convert DWARF type info into equivalent
-         deduplicated BTF type info.
-
-config PAHOLE_HAS_SPLIT_BTF
-       def_bool PAHOLE_VERSION >= 119
+         Turning this on requires pahole v1.22 or later, which will convert
+         DWARF type info into equivalent deduplicated BTF type info.
 
 config PAHOLE_HAS_BTF_TAG
        def_bool PAHOLE_VERSION >= 123
@@ -421,7 +416,7 @@ config PAHOLE_HAS_LANG_EXCLUDE
 config DEBUG_INFO_BTF_MODULES
        bool "Generate BTF type information for kernel modules"
        default y
-       depends on DEBUG_INFO_BTF && MODULES && PAHOLE_HAS_SPLIT_BTF
+       depends on DEBUG_INFO_BTF && MODULES
        help
          Generate compact split BTF type information for kernel modules.
 
index db76335dd9176a895d2fa368a9b4636106ce805a..840a55de42daa3b4316565be8df573263f948fee 100644 (file)
@@ -7,14 +7,7 @@ JOBS := $(patsubst -j%,%,$(filter -j%,$(MAKEFLAGS)))
 
 ifeq ($(call test-le, $(pahole-ver), 125),y)
 
-# pahole 1.18 through 1.21 can't handle zero-sized per-CPU vars
-ifeq ($(call test-le, $(pahole-ver), 121),y)
-pahole-flags-$(call test-ge, $(pahole-ver), 118)       += --skip_encoding_btf_vars
-endif
-
-pahole-flags-$(call test-ge, $(pahole-ver), 121)       += --btf_gen_floats
-
-pahole-flags-$(call test-ge, $(pahole-ver), 122)       += -j$(JOBS)
+pahole-flags-y                                         += --btf_gen_floats -j$(JOBS)
 
 pahole-flags-$(call test-ge, $(pahole-ver), 125)       += --skip_encoding_btf_inconsistent_proto --btf_gen_optimized
 
index 16a42e4060f64c9e0366b6fbdba8921b58cef7af..56a9d1557ac45f75d65c6c3551bb8607f1be9f38 100644 (file)
@@ -65,7 +65,6 @@ It's also recommended that you also include the following Kconfig options:
 ```
 CONFIG_BPF_JIT_ALWAYS_ON=y
 CONFIG_BPF_JIT_DEFAULT_ON=y
-CONFIG_PAHOLE_HAS_SPLIT_BTF=y
 CONFIG_PAHOLE_HAS_BTF_TAG=y
 ```