mirror-linux/init
Ihor Solodrai 90e5b38a26 kbuild: Sync kconfig when PAHOLE_VERSION changes
This patch implements kconfig re-sync when the pahole version changes
between builds, similar to how it happens for compiler version change
via CC_VERSION_TEXT.

Define PAHOLE_VERSION in the top-level Makefile and export it for
config builds. Set CONFIG_PAHOLE_VERSION default to the exported
variable.

Kconfig records the PAHOLE_VERSION value in
include/config/auto.conf.cmd [1].

The Makefile includes auto.conf.cmd, so if PAHOLE_VERSION changes
between builds, make detects a dependency change and triggers
syncconfig to update the kconfig [2].

For external module builds, add a warning message in the prepare
target, similar to the existing compiler version mismatch warning.

Note that if pahole is not installed or available, PAHOLE_VERSION is
set to 0 by pahole-version.sh, so the (un)installation of pahole is
treated as a version change.

See previous discussions for context [3].

[1] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/scripts/kconfig/preprocess.c?h=v6.18#n91
[2] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Makefile?h=v6.18#n815
[3] https://lore.kernel.org/bpf/8f946abf-dd88-4fac-8bb4-84fcd8d81cf0@oracle.com/

Signed-off-by: Ihor Solodrai <ihor.solodrai@linux.dev>
Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
Tested-by: Nicolas Schier <nsc@kernel.org>
Tested-by: Alan Maguire <alan.maguire@oracle.com>
Reviewed-by: Nicolas Schier <nsc@kernel.org>
Link: https://lore.kernel.org/bpf/20251219181321.1283664-6-ihor.solodrai@linux.dev
2025-12-19 10:55:40 -08:00
..
.gitignore
.kunitconfig initramfs_test: kunit tests for initramfs unpacking 2025-03-08 12:13:04 +01:00
Kconfig kbuild: Sync kconfig when PAHOLE_VERSION changes 2025-12-19 10:55:40 -08:00
Makefile initramfs_test: kunit tests for initramfs unpacking 2025-03-08 12:13:04 +01:00
calibrate.c calibrate: update header inclusion 2025-11-27 14:24:45 -08:00
do_mounts.c Some filesystems use a kinda-sorta controlled dentry refcount leak to pin 2025-12-05 14:36:21 -08:00
do_mounts.h init: flush async file closing 2024-02-08 18:41:03 +01:00
do_mounts_initrd.c treewide: const qualify ctl_tables where applicable 2025-01-28 13:48:37 +01:00
do_mounts_rd.c initrd: Replace simple_strtol with kstrtoint to improve ramdisk_start_setup 2025-10-31 10:12:32 +01:00
init_task.c A large overhaul of the restartable sequences and CID management: 2025-12-02 08:48:53 -08:00
initramfs.c initramfs: Replace strcpy() with strscpy() in find_link() 2025-09-15 14:52:02 +02:00
initramfs_internal.h init: add initramfs_internal.h 2025-03-04 09:52:36 +01:00
initramfs_test.c initramfs_test: add filename padding test case 2025-08-21 12:00:10 -07:00
main.c init/main.c: wrap long kernel cmdline when printing to logs 2025-11-12 10:00:16 -08:00
noinitramfs.c
version-timestamp.c ns: drop custom reference count initialization for initial namespaces 2025-11-11 10:01:32 +01:00
version.c