Skip to content

Commit e356da6

Browse files
t-8charndb
authored andcommitted
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>
1 parent 9b21aa9 commit e356da6

File tree

2 files changed

+1
-3
lines changed

2 files changed

+1
-3
lines changed

arch/x86/include/uapi/asm/auxvec.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
#define AT_SYSINFO_EHDR 33
1212

1313
/* 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))
1515
# define AT_VECTOR_SIZE_ARCH 3
1616
#else /* else it's non-compat x86-64 */
1717
# define AT_VECTOR_SIZE_ARCH 2

scripts/headers_install.sh

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,8 +70,6 @@ configs=$(sed -e '
7070
#
7171
# The format is <file-name>:<CONFIG-option> in each line.
7272
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
7573
"
7674

7775
for c in $configs

0 commit comments

Comments
 (0)