Thread (16 messages) 16 messages, 3 authors, 2026-01-02

Re: [PATCH 2/5] ARM: uapi: Stop leaking CONFIG_CPU_ENDIAN_BE8 reference to userspace

From: "Arnd Bergmann" <arnd@arndb.de>
Date: 2025-12-30 14:20:41
Also in: lkml

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 same way other kconfig references in this file
are handled. 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>
According to codesearch.debian.net, there are no actual users of
this definition outside of the kernel, and there really shouldn't
be either.

It should be both safe and correct to open-code PSR_ENDSTATE
in the two file where it is used as

 if (IS_ENABLED(CONFIG_CPU_ENDIAN_BE8))
        regs->ARM_cpsr |= PSR_E_BIT

and then remove the definition from the header. Alternatively
it could be moved into the non-uapi header, or you can have
an #ifdef around both of them.

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