Thread (16 messages) read the whole thread 16 messages, 3 authors, 2026-01-02

Re: [PATCH 1/5] ARC: uapi: Stop leaking CONFIG_ARC_HAS_SWAPE reference to userspace

From: Thomas Weißschuh <hidden>
Date: 2026-01-02 07:55:12
Also in: lkml

On Tue, Dec 30, 2025 at 10:23:08PM +0100, Arnd Bergmann wrote:
On Tue, Dec 30, 2025, at 08:10, Thomas Weißschuh wrote:
quoted
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
exception in headers_install.sh can also be removed.

Signed-off-by: Thomas Weißschuh <redacted>
Acked-by: Arnd Bergmann <arnd@arndb.de>

Same as for the nios2 version, I think the nicer solution would
be to use the asm-generic header for uapi and move this one
to arch/arc/include/asm/swab.h for kernel-internal use.
Ack. Also to your other feedback on the series.
In theory, using 'select ARCH_USE_BUILTIN_BSWAP' in Kconfig should
let the compiler pick the best swap instruction, which would
be even less code, but I'm not sure if there was a reason that
nios2 and arc don't already do this.
I'd like to keep the current logic to avoid potential issues.
But maybe the arch maintainers will chime in.


Thomas
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help