* [PATCH v2 0/5] uapi: fix remaining kconfig leaks in UAPI headers
@ 2026-01-12 7:58 Thomas Weißschuh
2026-01-12 7:58 ` [PATCH v2 1/5] ARC: Always use SWAPE instructions and enable ARCH_USE_BUILTIN_BSWAP Thomas Weißschuh
` (6 more replies)
0 siblings, 7 replies; 12+ messages in thread
From: Thomas Weißschuh @ 2026-01-12 7:58 UTC (permalink / raw)
To: Vineet Gupta, Russell King, Dinh Nguyen, Thomas Gleixner,
Ingo Molnar, Borislav Petkov, Dave Hansen, x86, H. Peter Anvin
Cc: linux-snps-arc, linux-kernel, linux-arm-kernel, Arnd Bergmann,
Thomas Weißschuh
A few UAPI headers still contained references to kconfig symbols.
Clean them all up and afterwards remove the now useless exception
machinery in headers_install.sh.
Intended to be routed through the kbuild tree.
Signed-off-by: Thomas Weißschuh <thomas.weissschuh@linutronix.de>
---
Changes in v2:
- Drop ARC_HAS_SWAPE kconfig option, use ARCH_USE_BUILTIN_BSWAP
- Drop PSR_ENDSTATE from the ARM ptrace.h header.
- Drop nios2 uapi asm/swab.h.
- Link to v1: https://lore.kernel.org/r/20251230-headers_install-config-leak-v1-0-efba5c58073d@linutronix.de
---
Thomas Weißschuh (5):
ARC: Always use SWAPE instructions and enable ARCH_USE_BUILTIN_BSWAP
ARM: uapi: Drop PSR_ENDSTATE
nios2: uapi: Remove custom asm/swab.h from UAPI
x86/uapi: Stop leaking kconfig references to userspace
scripts: headers_install.sh: Remove config leak ignore machinery
arch/arc/Kconfig | 6 +-
arch/arc/Makefile | 3 +-
arch/arc/include/uapi/asm/swab.h | 99 --------------------------------
arch/arm/include/asm/processor.h | 3 +-
arch/arm/include/uapi/asm/ptrace.h | 9 ---
arch/arm/kernel/signal.c | 3 +-
arch/nios2/include/{uapi => }/asm/swab.h | 0
arch/x86/include/uapi/asm/auxvec.h | 2 +-
scripts/headers_install.sh | 30 +---------
9 files changed, 9 insertions(+), 146 deletions(-)
---
base-commit: 8f0b4cce4481fb22653697cced8d0d04027cb1e8
change-id: 20251229-headers_install-config-leak-b8a9219d8b3c
Best regards,
--
Thomas Weißschuh <thomas.weissschuh@linutronix.de>
^ permalink raw reply [flat|nested] 12+ messages in thread
* [PATCH v2 1/5] ARC: Always use SWAPE instructions and enable ARCH_USE_BUILTIN_BSWAP
2026-01-12 7:58 [PATCH v2 0/5] uapi: fix remaining kconfig leaks in UAPI headers Thomas Weißschuh
@ 2026-01-12 7:58 ` Thomas Weißschuh
2026-01-21 11:10 ` Nicolas Schier
2026-01-12 7:58 ` [PATCH v2 2/5] ARM: uapi: Drop PSR_ENDSTATE Thomas Weißschuh
` (5 subsequent siblings)
6 siblings, 1 reply; 12+ messages in thread
From: Thomas Weißschuh @ 2026-01-12 7:58 UTC (permalink / raw)
To: Vineet Gupta, Russell King, Dinh Nguyen, Thomas Gleixner,
Ingo Molnar, Borislav Petkov, Dave Hansen, x86, H. Peter Anvin
Cc: linux-snps-arc, linux-kernel, linux-arm-kernel, Arnd Bergmann,
Thomas Weißschuh
Since commit 67a697e7576 ("ARC: retire ARC750 support") all supported
CPUs have the 'swape' instruction.
Replace the custom logic with ARCH_USE_BUILTIN_BSWAP which makes
use of 'swape'.
As as side-effect, remove a leak of an internal kconfig symbol through
the UAPI headers.
Suggested-by: Arnd Bergmann <arnd@arndb.de>
Link: https://lore.kernel.org/lkml/0ae2688a-5a22-405b-adaf-9b5ad712b245@app.fastmail.com/
Suggested-by: Vineet Gupta <vgupta@kernel.org>
Link: https://lore.kernel.org/lkml/a033a402-e3c5-4982-9fff-b6a4c55817ae@kernel.org/
Signed-off-by: Thomas Weißschuh <thomas.weissschuh@linutronix.de>
---
| 6 +--
| 3 +-
| 99 ----------------------------------------
| 1 -
4 files changed, 2 insertions(+), 107 deletions(-)
--git a/arch/arc/Kconfig b/arch/arc/Kconfig
index f27e6b90428e..390a14360689 100644
--- a/arch/arc/Kconfig
+++ b/arch/arc/Kconfig
@@ -16,6 +16,7 @@ config ARC
select ARCH_HAS_SYNC_DMA_FOR_DEVICE
select ARCH_NEED_CMPXCHG_1_EMU
select ARCH_SUPPORTS_ATOMIC_RMW if ARC_HAS_LLSC
+ select ARCH_USE_BUILTIN_BSWAP
select ARCH_32BIT_OFF_T
select BUILDTIME_TABLE_SORT
select GENERIC_BUILTIN_DTB
@@ -121,7 +122,6 @@ choice
config ARC_CPU_770
bool "ARC770"
depends on ISA_ARCOMPACT
- select ARC_HAS_SWAPE
help
Support for ARC770 core introduced with Rel 4.10 (Summer 2011)
This core has a bunch of cool new features:
@@ -340,10 +340,6 @@ config ARC_HAS_LLSC
default y
depends on !ARC_CANT_LLSC
-config ARC_HAS_SWAPE
- bool "Insn: SWAPE (endian-swap)"
- default y
-
if ISA_ARCV2
config ARC_USE_UNALIGNED_MEM_ACCESS
--git a/arch/arc/Makefile b/arch/arc/Makefile
index 0c5e6e6314f2..868805ffcfea 100644
--- a/arch/arc/Makefile
+++ b/arch/arc/Makefile
@@ -9,7 +9,7 @@ ifeq ($(CROSS_COMPILE),)
CROSS_COMPILE := $(call cc-cross-prefix, arc-linux- arceb-linux- arc-linux-gnu-)
endif
-cflags-y += -fno-common -pipe -fno-builtin -mmedium-calls -D__linux__
+cflags-y += -fno-common -pipe -fno-builtin -mmedium-calls -mswape -D__linux__
tune-mcpu-def-$(CONFIG_ISA_ARCOMPACT) := -mcpu=arc700
tune-mcpu-def-$(CONFIG_ISA_ARCV2) := -mcpu=hs38
@@ -41,7 +41,6 @@ endif
cflags-y += -fsection-anchors
cflags-$(CONFIG_ARC_HAS_LLSC) += -mlock
-cflags-$(CONFIG_ARC_HAS_SWAPE) += -mswape
ifdef CONFIG_ISA_ARCV2
diff --git a/arch/arc/include/uapi/asm/swab.h b/arch/arc/include/uapi/asm/swab.h
deleted file mode 100644
index 8d1f1ef44ba7..000000000000
--- a/arch/arc/include/uapi/asm/swab.h
+++ /dev/null
@@ -1,99 +0,0 @@
-/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
-/*
- * Copyright (C) 2004, 2007-2010, 2011-2012 Synopsys, Inc. (www.synopsys.com)
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License version 2 as
- * published by the Free Software Foundation.
- *
- * vineetg: May 2011
- * -Support single cycle endian-swap insn in ARC700 4.10
- *
- * vineetg: June 2009
- * -Better htonl implementation (5 instead of 9 ALU instructions)
- * -Hardware assisted single cycle bswap (Use Case of ARC custom instrn)
- */
-
-#ifndef __ASM_ARC_SWAB_H
-#define __ASM_ARC_SWAB_H
-
-#include <linux/types.h>
-
-/* Native single cycle endian swap insn */
-#ifdef CONFIG_ARC_HAS_SWAPE
-
-#define __arch_swab32(x) \
-({ \
- unsigned int tmp = x; \
- __asm__( \
- " swape %0, %1 \n" \
- : "=r" (tmp) \
- : "r" (tmp)); \
- tmp; \
-})
-
-#else
-
-/* Several ways of Endian-Swap Emulation for ARC
- * 0: kernel generic
- * 1: ARC optimised "C"
- * 2: ARC Custom instruction
- */
-#define ARC_BSWAP_TYPE 1
-
-#if (ARC_BSWAP_TYPE == 1) /******* Software only ********/
-
-/* The kernel default implementation of htonl is
- * return x<<24 | x>>24 |
- * (x & (__u32)0x0000ff00UL)<<8 | (x & (__u32)0x00ff0000UL)>>8;
- *
- * This generates 9 instructions on ARC (excluding the ld/st)
- *
- * 8051fd8c: ld r3,[r7,20] ; Mem op : Get the value to be swapped
- * 8051fd98: asl r5,r3,24 ; get 3rd Byte
- * 8051fd9c: lsr r2,r3,24 ; get 0th Byte
- * 8051fda0: and r4,r3,0xff00
- * 8051fda8: asl r4,r4,8 ; get 1st Byte
- * 8051fdac: and r3,r3,0x00ff0000
- * 8051fdb4: or r2,r2,r5 ; combine 0th and 3rd Bytes
- * 8051fdb8: lsr r3,r3,8 ; 2nd Byte at correct place in Dst Reg
- * 8051fdbc: or r2,r2,r4 ; combine 0,3 Bytes with 1st Byte
- * 8051fdc0: or r2,r2,r3 ; combine 0,3,1 Bytes with 2nd Byte
- * 8051fdc4: st r2,[r1,20] ; Mem op : save result back to mem
- *
- * Joern suggested a better "C" algorithm which is great since
- * (1) It is portable to any architecture
- * (2) At the same time it takes advantage of ARC ISA (rotate intrns)
- */
-
-#define __arch_swab32(x) \
-({ unsigned long __in = (x), __tmp; \
- __tmp = __in << 8 | __in >> 24; /* ror tmp,in,24 */ \
- __in = __in << 24 | __in >> 8; /* ror in,in,8 */ \
- __tmp ^= __in; \
- __tmp &= 0xff00ff; \
- __tmp ^ __in; \
-})
-
-#elif (ARC_BSWAP_TYPE == 2) /* Custom single cycle bswap instruction */
-
-#define __arch_swab32(x) \
-({ \
- unsigned int tmp = x; \
- __asm__( \
- " .extInstruction bswap, 7, 0x00, SUFFIX_NONE, SYNTAX_2OP \n"\
- " bswap %0, %1 \n"\
- : "=r" (tmp) \
- : "r" (tmp)); \
- tmp; \
-})
-
-#endif /* ARC_BSWAP_TYPE=zzz */
-
-#endif /* CONFIG_ARC_HAS_SWAPE */
-
-#if !defined(__STRICT_ANSI__) || defined(__KERNEL__)
-#define __SWAB_64_THRU_32__
-#endif
-
-#endif
--git a/scripts/headers_install.sh b/scripts/headers_install.sh
index 0e4e939efc94..727f7f82c2c7 100755
--- a/scripts/headers_install.sh
+++ b/scripts/headers_install.sh
@@ -70,7 +70,6 @@ configs=$(sed -e '
#
# The format is <file-name>:<CONFIG-option> in each line.
config_leak_ignores="
-arch/arc/include/uapi/asm/swab.h:CONFIG_ARC_HAS_SWAPE
arch/arm/include/uapi/asm/ptrace.h:CONFIG_CPU_ENDIAN_BE8
arch/nios2/include/uapi/asm/swab.h:CONFIG_NIOS2_CI_SWAB_NO
arch/nios2/include/uapi/asm/swab.h:CONFIG_NIOS2_CI_SWAB_SUPPORT
--
2.52.0
^ permalink raw reply related [flat|nested] 12+ messages in thread
* [PATCH v2 2/5] ARM: uapi: Drop PSR_ENDSTATE
2026-01-12 7:58 [PATCH v2 0/5] uapi: fix remaining kconfig leaks in UAPI headers Thomas Weißschuh
2026-01-12 7:58 ` [PATCH v2 1/5] ARC: Always use SWAPE instructions and enable ARCH_USE_BUILTIN_BSWAP Thomas Weißschuh
@ 2026-01-12 7:58 ` Thomas Weißschuh
2026-01-12 7:58 ` [PATCH v2 3/5] nios2: uapi: Remove custom asm/swab.h from UAPI Thomas Weißschuh
` (4 subsequent siblings)
6 siblings, 0 replies; 12+ messages in thread
From: Thomas Weißschuh @ 2026-01-12 7:58 UTC (permalink / raw)
To: Vineet Gupta, Russell King, Dinh Nguyen, Thomas Gleixner,
Ingo Molnar, Borislav Petkov, Dave Hansen, x86, H. Peter Anvin
Cc: linux-snps-arc, linux-kernel, linux-arm-kernel, Arnd Bergmann,
Thomas Weißschuh
The symbol PSR_ENDSTATE is pointless for userspace. Drop it from the
UAPI headers and instead inline it into the only two callers.
As as side-effect, remove a leak of an internal kconfig symbol through
the UAPI headers.
Suggested-by: Arnd Bergmann <arnd@arndb.de>
Link: https://lore.kernel.org/lkml/d2ad12f2-3d65-4bef-890c-65d78a33d790@app.fastmail.com/
Signed-off-by: Thomas Weißschuh <thomas.weissschuh@linutronix.de>
---
| 3 ++-
| 9 ---------
| 3 ++-
| 1 -
4 files changed, 4 insertions(+), 12 deletions(-)
--git a/arch/arm/include/asm/processor.h b/arch/arm/include/asm/processor.h
index 326864f79d18..bba83228bc22 100644
--- a/arch/arm/include/asm/processor.h
+++ b/arch/arm/include/asm/processor.h
@@ -73,7 +73,8 @@ static inline void arch_thread_struct_whitelist(unsigned long *offset,
regs->ARM_cpsr = USR26_MODE; \
if (elf_hwcap & HWCAP_THUMB && pc & 1) \
regs->ARM_cpsr |= PSR_T_BIT; \
- regs->ARM_cpsr |= PSR_ENDSTATE; \
+ if (IS_ENABLED(CONFIG_CPU_ENDIAN_BE8)) \
+ regs->ARM_cpsr |= PSR_E_BIT; \
regs->ARM_pc = pc & ~1; /* pc */ \
regs->ARM_sp = sp; /* sp */ \
})
--git a/arch/arm/include/uapi/asm/ptrace.h b/arch/arm/include/uapi/asm/ptrace.h
index 8896c23ccba7..2ef917957005 100644
--- a/arch/arm/include/uapi/asm/ptrace.h
+++ b/arch/arm/include/uapi/asm/ptrace.h
@@ -102,15 +102,6 @@
#define PSR_IT_MASK 0x0600fc00 /* If-Then execution state mask */
#define PSR_ENDIAN_MASK 0x00000200 /* Endianness state mask */
-/*
- * Default endianness state
- */
-#ifdef CONFIG_CPU_ENDIAN_BE8
-#define PSR_ENDSTATE PSR_E_BIT
-#else
-#define PSR_ENDSTATE 0
-#endif
-
/*
* These are 'magic' values for PTRACE_PEEKUSR that return info about where a
* process is located in memory.
--git a/arch/arm/kernel/signal.c b/arch/arm/kernel/signal.c
index 79a6730fa0eb..7be9188d83d9 100644
--- a/arch/arm/kernel/signal.c
+++ b/arch/arm/kernel/signal.c
@@ -337,7 +337,8 @@ setup_return(struct pt_regs *regs, struct ksignal *ksig,
return 1;
}
- cpsr |= PSR_ENDSTATE;
+ if (IS_ENABLED(CONFIG_CPU_ENDIAN_BE8))
+ cpsr |= PSR_E_BIT;
/*
* Maybe we need to deliver a 32-bit signal to a 26-bit task.
--git a/scripts/headers_install.sh b/scripts/headers_install.sh
index 727f7f82c2c7..4f03521f4026 100755
--- a/scripts/headers_install.sh
+++ b/scripts/headers_install.sh
@@ -70,7 +70,6 @@ configs=$(sed -e '
#
# The format is <file-name>:<CONFIG-option> in each line.
config_leak_ignores="
-arch/arm/include/uapi/asm/ptrace.h:CONFIG_CPU_ENDIAN_BE8
arch/nios2/include/uapi/asm/swab.h:CONFIG_NIOS2_CI_SWAB_NO
arch/nios2/include/uapi/asm/swab.h:CONFIG_NIOS2_CI_SWAB_SUPPORT
arch/x86/include/uapi/asm/auxvec.h:CONFIG_IA32_EMULATION
--
2.52.0
^ permalink raw reply related [flat|nested] 12+ messages in thread
* [PATCH v2 3/5] nios2: uapi: Remove custom asm/swab.h from UAPI
2026-01-12 7:58 [PATCH v2 0/5] uapi: fix remaining kconfig leaks in UAPI headers Thomas Weißschuh
2026-01-12 7:58 ` [PATCH v2 1/5] ARC: Always use SWAPE instructions and enable ARCH_USE_BUILTIN_BSWAP Thomas Weißschuh
2026-01-12 7:58 ` [PATCH v2 2/5] ARM: uapi: Drop PSR_ENDSTATE Thomas Weißschuh
@ 2026-01-12 7:58 ` Thomas Weißschuh
2026-01-12 7:58 ` [PATCH v2 4/5] x86/uapi: Stop leaking kconfig references to userspace Thomas Weißschuh
` (3 subsequent siblings)
6 siblings, 0 replies; 12+ messages in thread
From: Thomas Weißschuh @ 2026-01-12 7:58 UTC (permalink / raw)
To: Vineet Gupta, Russell King, Dinh Nguyen, Thomas Gleixner,
Ingo Molnar, Borislav Petkov, Dave Hansen, x86, H. Peter Anvin
Cc: linux-snps-arc, linux-kernel, linux-arm-kernel, Arnd Bergmann,
Thomas Weißschuh
UAPI headers are not supposed to leak references to kconfig symbols.
They are undefined there in any case. As all actual definitions of this
header are guarded behind a kconfig symbol, for userspace the header is
always identical to its asm-generic variant.
Make the custom UAPI header a kernel-internal one, so the leaks of
kconfig symbols are fixed and userspace will instead use
asm-generic/swab.h directly.
Suggested-by: Arnd Bergmann <arnd@arndb.de>
Link: https://lore.kernel.org/lkml/93c55086-931a-4282-a94c-de4954047fa9@app.fastmail.com/
Signed-off-by: Thomas Weißschuh <thomas.weissschuh@linutronix.de>
---
| 0
| 2 --
2 files changed, 2 deletions(-)
--git a/arch/nios2/include/uapi/asm/swab.h b/arch/nios2/include/asm/swab.h
similarity index 100%
rename from arch/nios2/include/uapi/asm/swab.h
rename to arch/nios2/include/asm/swab.h
diff --git a/scripts/headers_install.sh b/scripts/headers_install.sh
index 4f03521f4026..613f400a67d1 100755
--- a/scripts/headers_install.sh
+++ b/scripts/headers_install.sh
@@ -70,8 +70,6 @@ configs=$(sed -e '
#
# The format is <file-name>:<CONFIG-option> in each line.
config_leak_ignores="
-arch/nios2/include/uapi/asm/swab.h:CONFIG_NIOS2_CI_SWAB_NO
-arch/nios2/include/uapi/asm/swab.h:CONFIG_NIOS2_CI_SWAB_SUPPORT
arch/x86/include/uapi/asm/auxvec.h:CONFIG_IA32_EMULATION
arch/x86/include/uapi/asm/auxvec.h:CONFIG_X86_64
"
--
2.52.0
^ permalink raw reply related [flat|nested] 12+ messages in thread
* [PATCH v2 4/5] x86/uapi: Stop leaking kconfig references to userspace
2026-01-12 7:58 [PATCH v2 0/5] uapi: fix remaining kconfig leaks in UAPI headers Thomas Weißschuh
` (2 preceding siblings ...)
2026-01-12 7:58 ` [PATCH v2 3/5] nios2: uapi: Remove custom asm/swab.h from UAPI Thomas Weißschuh
@ 2026-01-12 7:58 ` Thomas Weißschuh
2026-01-12 7:58 ` [PATCH v2 5/5] scripts: headers_install.sh: Remove config leak ignore machinery Thomas Weißschuh
` (2 subsequent siblings)
6 siblings, 0 replies; 12+ messages in thread
From: Thomas Weißschuh @ 2026-01-12 7:58 UTC (permalink / raw)
To: Vineet Gupta, Russell King, Dinh Nguyen, Thomas Gleixner,
Ingo Molnar, Borislav Petkov, Dave Hansen, x86, H. Peter Anvin
Cc: linux-snps-arc, linux-kernel, linux-arm-kernel, Arnd Bergmann,
Thomas Weißschuh
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>
---
There is no point in exposing AT_VECTOR_SIZE_ARCH in the UAPI in any
case and I have another series in the works to get rid of it completely.
---
| 2 +-
| 2 --
2 files changed, 1 insertion(+), 3 deletions(-)
--git a/arch/x86/include/uapi/asm/auxvec.h b/arch/x86/include/uapi/asm/auxvec.h
index 6beb55bbefa4..bdde9e18f94e 100644
--- a/arch/x86/include/uapi/asm/auxvec.h
+++ b/arch/x86/include/uapi/asm/auxvec.h
@@ -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
--git a/scripts/headers_install.sh b/scripts/headers_install.sh
index 613f400a67d1..1301ba68d772 100755
--- a/scripts/headers_install.sh
+++ b/scripts/headers_install.sh
@@ -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
--
2.52.0
^ permalink raw reply related [flat|nested] 12+ messages in thread
* [PATCH v2 5/5] scripts: headers_install.sh: Remove config leak ignore machinery
2026-01-12 7:58 [PATCH v2 0/5] uapi: fix remaining kconfig leaks in UAPI headers Thomas Weißschuh
` (3 preceding siblings ...)
2026-01-12 7:58 ` [PATCH v2 4/5] x86/uapi: Stop leaking kconfig references to userspace Thomas Weißschuh
@ 2026-01-12 7:58 ` Thomas Weißschuh
2026-01-12 10:42 ` [PATCH v2 0/5] uapi: fix remaining kconfig leaks in UAPI headers Arnd Bergmann
2026-01-21 11:17 ` Nicolas Schier
6 siblings, 0 replies; 12+ messages in thread
From: Thomas Weißschuh @ 2026-01-12 7:58 UTC (permalink / raw)
To: Vineet Gupta, Russell King, Dinh Nguyen, Thomas Gleixner,
Ingo Molnar, Borislav Petkov, Dave Hansen, x86, H. Peter Anvin
Cc: linux-snps-arc, linux-kernel, linux-arm-kernel, Arnd Bergmann,
Thomas Weißschuh
There are no entries left to ignore and none should be added again.
Remove the now unused logic.
Signed-off-by: Thomas Weißschuh <thomas.weissschuh@linutronix.de>
---
| 24 ++----------------------
1 file changed, 2 insertions(+), 22 deletions(-)
--git a/scripts/headers_install.sh b/scripts/headers_install.sh
index 1301ba68d772..9c15e748761c 100755
--- a/scripts/headers_install.sh
+++ b/scripts/headers_install.sh
@@ -64,30 +64,10 @@ configs=$(sed -e '
d
' $OUTFILE)
-# The entries in the following list do not result in an error.
-# Please do not add a new entry. This list is only for existing ones.
-# The list will be reduced gradually, and deleted eventually. (hopefully)
-#
-# The format is <file-name>:<CONFIG-option> in each line.
-config_leak_ignores="
-"
-
for c in $configs
do
- leak_error=1
-
- for ignore in $config_leak_ignores
- do
- if echo "$INFILE:$c" | grep -q "$ignore$"; then
- leak_error=
- break
- fi
- done
-
- if [ "$leak_error" = 1 ]; then
- echo "error: $INFILE: leak $c to user-space" >&2
- exit 1
- fi
+ echo "error: $INFILE: leak $c to user-space" >&2
+ exit 1
done
rm -f $TMPFILE
--
2.52.0
^ permalink raw reply related [flat|nested] 12+ messages in thread
* Re: [PATCH v2 0/5] uapi: fix remaining kconfig leaks in UAPI headers
2026-01-12 7:58 [PATCH v2 0/5] uapi: fix remaining kconfig leaks in UAPI headers Thomas Weißschuh
` (4 preceding siblings ...)
2026-01-12 7:58 ` [PATCH v2 5/5] scripts: headers_install.sh: Remove config leak ignore machinery Thomas Weißschuh
@ 2026-01-12 10:42 ` Arnd Bergmann
2026-01-12 10:49 ` Thomas Weißschuh
2026-01-21 11:17 ` Nicolas Schier
6 siblings, 1 reply; 12+ messages in thread
From: Arnd Bergmann @ 2026-01-12 10:42 UTC (permalink / raw)
To: Thomas Weißschuh, Vineet Gupta, Russell King, Dinh Nguyen,
Thomas Gleixner, Ingo Molnar, Borislav Petkov, Dave Hansen, x86,
H. Peter Anvin
Cc: linux-snps-arc, linux-kernel, linux-arm-kernel
On Mon, Jan 12, 2026, at 08:58, Thomas Weißschuh wrote:
> A few UAPI headers still contained references to kconfig symbols.
> Clean them all up and afterwards remove the now useless exception
> machinery in headers_install.sh.
>
> Intended to be routed through the kbuild tree.
>
> Signed-off-by: Thomas Weißschuh <thomas.weissschuh@linutronix.de>
> ---
Whole series
Reviewed-by: Arnd Bergmann <arnd@arndb.de>
I would have preferred cleaning up the x86 auxvec.h header
more, but we can always do that later and your patch not
a regression.
Should I take the series through the asm-generic tree if there
are no other concerns, or do you have other plans for merging it?
Arnd
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH v2 0/5] uapi: fix remaining kconfig leaks in UAPI headers
2026-01-12 10:42 ` [PATCH v2 0/5] uapi: fix remaining kconfig leaks in UAPI headers Arnd Bergmann
@ 2026-01-12 10:49 ` Thomas Weißschuh
0 siblings, 0 replies; 12+ messages in thread
From: Thomas Weißschuh @ 2026-01-12 10:49 UTC (permalink / raw)
To: Arnd Bergmann
Cc: Vineet Gupta, Russell King, Dinh Nguyen, Thomas Gleixner,
Ingo Molnar, Borislav Petkov, Dave Hansen, x86, H. Peter Anvin,
linux-snps-arc, linux-kernel, linux-arm-kernel
On Mon, Jan 12, 2026 at 11:42:55AM +0100, Arnd Bergmann wrote:
> On Mon, Jan 12, 2026, at 08:58, Thomas Weißschuh wrote:
> > A few UAPI headers still contained references to kconfig symbols.
> > Clean them all up and afterwards remove the now useless exception
> > machinery in headers_install.sh.
> >
> > Intended to be routed through the kbuild tree.
> >
> > Signed-off-by: Thomas Weißschuh <thomas.weissschuh@linutronix.de>
> > ---
>
> Whole series
>
> Reviewed-by: Arnd Bergmann <arnd@arndb.de>
Thanks!
(...)
> Should I take the series through the asm-generic tree if there
> are no other concerns, or do you have other plans for merging it?
I had the kbuild tree in mind, but asm-generic sounds equally good.
The asm-generic tree will also be a better fit for my follow-up auxvec.h
series. So let's use that.
Thomas
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH v2 1/5] ARC: Always use SWAPE instructions and enable ARCH_USE_BUILTIN_BSWAP
2026-01-12 7:58 ` [PATCH v2 1/5] ARC: Always use SWAPE instructions and enable ARCH_USE_BUILTIN_BSWAP Thomas Weißschuh
@ 2026-01-21 11:10 ` Nicolas Schier
2026-01-21 12:06 ` Thomas Weißschuh
0 siblings, 1 reply; 12+ messages in thread
From: Nicolas Schier @ 2026-01-21 11:10 UTC (permalink / raw)
To: Thomas Weißschuh
Cc: Vineet Gupta, Russell King, Dinh Nguyen, Thomas Gleixner,
Ingo Molnar, Borislav Petkov, Dave Hansen, x86, H. Peter Anvin,
linux-snps-arc, linux-kernel, linux-arm-kernel, Arnd Bergmann,
Nathan Chancellor, linux-kbuild
[Cc+=linux-kbuild,nathan]
On Mon, Jan 12, 2026 at 08:58:29AM +0100, Thomas Weißschuh wrote:
> Since commit 67a697e7576 ("ARC: retire ARC750 support") all supported
> CPUs have the 'swape' instruction.
I can't find commit 67a697e7576. Did you mead
commit 767a697e7576 instead?
Kind regards,
Nicolas
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH v2 0/5] uapi: fix remaining kconfig leaks in UAPI headers
2026-01-12 7:58 [PATCH v2 0/5] uapi: fix remaining kconfig leaks in UAPI headers Thomas Weißschuh
` (5 preceding siblings ...)
2026-01-12 10:42 ` [PATCH v2 0/5] uapi: fix remaining kconfig leaks in UAPI headers Arnd Bergmann
@ 2026-01-21 11:17 ` Nicolas Schier
2026-01-21 23:21 ` Nathan Chancellor
6 siblings, 1 reply; 12+ messages in thread
From: Nicolas Schier @ 2026-01-21 11:17 UTC (permalink / raw)
To: Thomas Weißschuh
Cc: Vineet Gupta, Russell King, Dinh Nguyen, Thomas Gleixner,
Ingo Molnar, Borislav Petkov, Dave Hansen, x86, H. Peter Anvin,
linux-snps-arc, linux-kernel, linux-arm-kernel, Arnd Bergmann,
Nathan Chancellor, linux-kbuild
[Cc+=linux-kbuild, nathan]
On Mon, Jan 12, 2026 at 08:58:28AM +0100, Thomas Weißschuh wrote:
> A few UAPI headers still contained references to kconfig symbols.
> Clean them all up and afterwards remove the now useless exception
> machinery in headers_install.sh.
>
> Intended to be routed through the kbuild tree.
>
> Signed-off-by: Thomas Weißschuh <thomas.weissschuh@linutronix.de>
> ---
> Changes in v2:
> - Drop ARC_HAS_SWAPE kconfig option, use ARCH_USE_BUILTIN_BSWAP
> - Drop PSR_ENDSTATE from the ARM ptrace.h header.
> - Drop nios2 uapi asm/swab.h.
> - Link to v1: https://lore.kernel.org/r/20251230-headers_install-config-leak-v1-0-efba5c58073d@linutronix.de
>
> ---
> Thomas Weißschuh (5):
> ARC: Always use SWAPE instructions and enable ARCH_USE_BUILTIN_BSWAP
> ARM: uapi: Drop PSR_ENDSTATE
> nios2: uapi: Remove custom asm/swab.h from UAPI
> x86/uapi: Stop leaking kconfig references to userspace
> scripts: headers_install.sh: Remove config leak ignore machinery
>
> arch/arc/Kconfig | 6 +-
> arch/arc/Makefile | 3 +-
> arch/arc/include/uapi/asm/swab.h | 99 --------------------------------
> arch/arm/include/asm/processor.h | 3 +-
> arch/arm/include/uapi/asm/ptrace.h | 9 ---
> arch/arm/kernel/signal.c | 3 +-
> arch/nios2/include/{uapi => }/asm/swab.h | 0
> arch/x86/include/uapi/asm/auxvec.h | 2 +-
> scripts/headers_install.sh | 30 +---------
> 9 files changed, 9 insertions(+), 146 deletions(-)
> ---
> base-commit: 8f0b4cce4481fb22653697cced8d0d04027cb1e8
> change-id: 20251229-headers_install-config-leak-b8a9219d8b3c
>
> Best regards,
> --
> Thomas Weißschuh <thomas.weissschuh@linutronix.de>
Thanks a lot for the cleanup, much appreciated!
Reviewed-by: Nicolas Schier <nsc@kernel.org> # kbuild
Kind regards,
Nicolas
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH v2 1/5] ARC: Always use SWAPE instructions and enable ARCH_USE_BUILTIN_BSWAP
2026-01-21 11:10 ` Nicolas Schier
@ 2026-01-21 12:06 ` Thomas Weißschuh
0 siblings, 0 replies; 12+ messages in thread
From: Thomas Weißschuh @ 2026-01-21 12:06 UTC (permalink / raw)
To: Nicolas Schier
Cc: Vineet Gupta, Russell King, Dinh Nguyen, Thomas Gleixner,
Ingo Molnar, Borislav Petkov, Dave Hansen, x86, H. Peter Anvin,
linux-snps-arc, linux-kernel, linux-arm-kernel, Arnd Bergmann,
Nathan Chancellor, linux-kbuild
On Wed, Jan 21, 2026 at 12:10:18PM +0100, Nicolas Schier wrote:
> [Cc+=linux-kbuild,nathan]
>
> On Mon, Jan 12, 2026 at 08:58:29AM +0100, Thomas Weißschuh wrote:
> > Since commit 67a697e7576 ("ARC: retire ARC750 support") all supported
> > CPUs have the 'swape' instruction.
>
> I can't find commit 67a697e7576. Did you mead
> commit 767a697e7576 instead?
Yes, indeed.
Thanks for the review!
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH v2 0/5] uapi: fix remaining kconfig leaks in UAPI headers
2026-01-21 11:17 ` Nicolas Schier
@ 2026-01-21 23:21 ` Nathan Chancellor
0 siblings, 0 replies; 12+ messages in thread
From: Nathan Chancellor @ 2026-01-21 23:21 UTC (permalink / raw)
To: Nicolas Schier, Arnd Bergmann, Thomas Weißschuh
Cc: linux-kernel, linux-kbuild
On Wed, Jan 21, 2026 at 12:17:04PM +0100, Nicolas Schier wrote:
> On Mon, Jan 12, 2026 at 08:58:28AM +0100, Thomas Weißschuh wrote:
> > A few UAPI headers still contained references to kconfig symbols.
> > Clean them all up and afterwards remove the now useless exception
> > machinery in headers_install.sh.
> >
> > Intended to be routed through the kbuild tree.
Based on [1], I am going to assume that Arnd will be picking this up via
the asm-generic tree but if you want me to take it via kbuild-next, just
let me know.
[1]: https://lore.kernel.org/20260112114744-21ac730f-68b4-4f92-9ac0-f4dc6c5bb880@linutronix.de/
Cheers,
Nathan
^ permalink raw reply [flat|nested] 12+ messages in thread
end of thread, other threads:[~2026-01-21 23:21 UTC | newest]
Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-01-12 7:58 [PATCH v2 0/5] uapi: fix remaining kconfig leaks in UAPI headers Thomas Weißschuh
2026-01-12 7:58 ` [PATCH v2 1/5] ARC: Always use SWAPE instructions and enable ARCH_USE_BUILTIN_BSWAP Thomas Weißschuh
2026-01-21 11:10 ` Nicolas Schier
2026-01-21 12:06 ` Thomas Weißschuh
2026-01-12 7:58 ` [PATCH v2 2/5] ARM: uapi: Drop PSR_ENDSTATE Thomas Weißschuh
2026-01-12 7:58 ` [PATCH v2 3/5] nios2: uapi: Remove custom asm/swab.h from UAPI Thomas Weißschuh
2026-01-12 7:58 ` [PATCH v2 4/5] x86/uapi: Stop leaking kconfig references to userspace Thomas Weißschuh
2026-01-12 7:58 ` [PATCH v2 5/5] scripts: headers_install.sh: Remove config leak ignore machinery Thomas Weißschuh
2026-01-12 10:42 ` [PATCH v2 0/5] uapi: fix remaining kconfig leaks in UAPI headers Arnd Bergmann
2026-01-12 10:49 ` Thomas Weißschuh
2026-01-21 11:17 ` Nicolas Schier
2026-01-21 23:21 ` Nathan Chancellor
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox