[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <d2ad12f2-3d65-4bef-890c-65d78a33d790@app.fastmail.com>
Date: Tue, 30 Dec 2025 15:20:10 +0100
From: "Arnd Bergmann" <arnd@...db.de>
To: Thomas Weißschuh <thomas.weissschuh@...utronix.de>,
"Vineet Gupta" <vgupta@...nel.org>, "Russell King" <linux@...linux.org.uk>,
"Dinh Nguyen" <dinguyen@...nel.org>, "Thomas Gleixner" <tglx@...utronix.de>,
"Ingo Molnar" <mingo@...hat.com>, "Borislav Petkov" <bp@...en8.de>,
"Dave Hansen" <dave.hansen@...ux.intel.com>, x86@...nel.org,
"H. Peter Anvin" <hpa@...or.com>
Cc: linux-snps-arc@...ts.infradead.org, linux-kernel@...r.kernel.org,
linux-arm-kernel@...ts.infradead.org
Subject: Re: [PATCH 2/5] ARM: uapi: Stop leaking CONFIG_CPU_ENDIAN_BE8 reference to
userspace
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 <thomas.weissschuh@...utronix.de>
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
Powered by blists - more mailing lists