Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

x86/uapi: Stop leaking kconfig references to userspace

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>

authored by

Thomas Weißschuh and committed by
Arnd Bergmann
e356da60 9b21aa9f

+1 -3
+1 -1
arch/x86/include/uapi/asm/auxvec.h
··· 11 11 #define AT_SYSINFO_EHDR 33 12 12 13 13 /* entries in ARCH_DLINFO: */ 14 - #if defined(CONFIG_IA32_EMULATION) || !defined(CONFIG_X86_64) 14 + #if defined(__KERNEL__) && (defined(CONFIG_IA32_EMULATION) || !defined(CONFIG_X86_64)) 15 15 # define AT_VECTOR_SIZE_ARCH 3 16 16 #else /* else it's non-compat x86-64 */ 17 17 # define AT_VECTOR_SIZE_ARCH 2
-2
scripts/headers_install.sh
··· 70 70 # 71 71 # The format is <file-name>:<CONFIG-option> in each line. 72 72 config_leak_ignores=" 73 - arch/x86/include/uapi/asm/auxvec.h:CONFIG_IA32_EMULATION 74 - arch/x86/include/uapi/asm/auxvec.h:CONFIG_X86_64 75 73 " 76 74 77 75 for c in $configs