]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
x86/uapi: Stop leaking kconfig references to userspace
authorThomas Weißschuh <thomas.weissschuh@linutronix.de>
Wed, 14 Jan 2026 07:28:16 +0000 (08:28 +0100)
committerArnd Bergmann <arnd@arndb.de>
Fri, 30 Jan 2026 15:46:17 +0000 (16:46 +0100)
UAPI headers are not supposed to leak references to kconfig symbols.
These won't be set when building userspace. Hide the kconfig reference
behind 'if defined(__KERNEL__)', so it will be stripped by
headers_install.sh. The result for userspace will be the same, but the
exceptions in headers_install.sh can also be removed.

Signed-off-by: Thomas Weißschuh <thomas.weissschuh@linutronix.de>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
arch/x86/include/uapi/asm/auxvec.h
scripts/headers_install.sh

index 6beb55bbefa40b475fea660075be2836b1771246..bdde9e18f94eebeb6a01342aadd34213f42cc950 100644 (file)
@@ -11,7 +11,7 @@
 #define AT_SYSINFO_EHDR                33
 
 /* entries in ARCH_DLINFO: */
-#if defined(CONFIG_IA32_EMULATION) || !defined(CONFIG_X86_64)
+#if defined(__KERNEL__) && (defined(CONFIG_IA32_EMULATION) || !defined(CONFIG_X86_64))
 # define AT_VECTOR_SIZE_ARCH 3
 #else /* else it's non-compat x86-64 */
 # define AT_VECTOR_SIZE_ARCH 2
index 613f400a67d19e241c028bcf759d019743fb7da7..1301ba68d7725b097b4c2bac2524238d51b586b6 100755 (executable)
@@ -70,8 +70,6 @@ configs=$(sed -e '
 #
 # The format is <file-name>:<CONFIG-option> in each line.
 config_leak_ignores="
-arch/x86/include/uapi/asm/auxvec.h:CONFIG_IA32_EMULATION
-arch/x86/include/uapi/asm/auxvec.h:CONFIG_X86_64
 "
 
 for c in $configs