[PATCH 1/5] ARC: uapi: Stop leaking CONFIG_ARC_HAS_SWAPE reference to userspace
Thomas Weißschuh
thomas.weissschuh at linutronix.de
Fri Jan 2 01:40:46 PST 2026
On Fri, Jan 02, 2026 at 08:55:10AM +0100, Thomas Weißschuh wrote:
> 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:
> > > 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 <thomas.weissschuh at linutronix.de>
> >
> > Acked-by: Arnd Bergmann <arnd at 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. (...)
This doesn't seem to be true. ARC does have a custom C implementation which
according to its comment is supposed to be more efficient than the generic one.
So I'd like to keep this as-is.
(...)
Thomas
More information about the linux-snps-arc
mailing list