From: "Arnd Bergmann" <arnd@arndb.de>
To: "Thomas Weißschuh" <thomas.weissschuh@linutronix.de>,
"Vineet Gupta" <vgupta@kernel.org>,
"Russell King" <linux@armlinux.org.uk>,
"Dinh Nguyen" <dinguyen@kernel.org>,
"Thomas Gleixner" <tglx@linutronix.de>,
"Ingo Molnar" <mingo@redhat.com>,
"Borislav Petkov" <bp@alien8.de>,
"Dave Hansen" <dave.hansen@linux.intel.com>,
x86@kernel.org, "H. Peter Anvin" <hpa@zytor.com>
Cc: linux-snps-arc@lists.infradead.org, linux-kernel@vger.kernel.org,
linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH 1/5] ARC: uapi: Stop leaking CONFIG_ARC_HAS_SWAPE reference to userspace
Date: Tue, 30 Dec 2025 22:23:08 +0100 [thread overview]
Message-ID: <9ecebf46-c230-4074-9001-7ba9d65634f1@app.fastmail.com> (raw)
In-Reply-To: <20251230-headers_install-config-leak-v1-1-efba5c58073d@linutronix.de>
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@linutronix.de>
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.
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.
Arnd
next prev parent reply other threads:[~2025-12-30 21:23 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-12-30 7:10 [PATCH 0/5] uapi: fix remaining kconfig leaks in UAPI headers Thomas Weißschuh
2025-12-30 7:10 ` [PATCH 1/5] ARC: uapi: Stop leaking CONFIG_ARC_HAS_SWAPE reference to userspace Thomas Weißschuh
2025-12-30 21:23 ` Arnd Bergmann [this message]
2026-01-02 7:55 ` Thomas Weißschuh
2026-01-02 9:40 ` Thomas Weißschuh
2026-01-02 10:31 ` Arnd Bergmann
2026-01-02 21:53 ` Vineet Gupta
2025-12-30 7:10 ` [PATCH 2/5] ARM: uapi: Stop leaking CONFIG_CPU_ENDIAN_BE8 " Thomas Weißschuh
2025-12-30 14:20 ` Arnd Bergmann
2025-12-30 14:33 ` Thomas Weißschuh
2025-12-30 7:10 ` [PATCH 3/5] nios2: uapi: Stop leaking CONFIG_NIOS2_CI_SWAB_{NO,SUPPORT} references " Thomas Weißschuh
2025-12-30 21:19 ` Arnd Bergmann
2025-12-30 7:10 ` [PATCH 4/5] x86/uapi: Stop leaking kconfig " Thomas Weißschuh
2025-12-30 21:08 ` Arnd Bergmann
2026-01-02 9:30 ` Thomas Weißschuh
2025-12-30 7:11 ` [PATCH 5/5] scripts: headers_install.sh: Remove config leak ignore machinery Thomas Weißschuh
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=9ecebf46-c230-4074-9001-7ba9d65634f1@app.fastmail.com \
--to=arnd@arndb.de \
--cc=bp@alien8.de \
--cc=dave.hansen@linux.intel.com \
--cc=dinguyen@kernel.org \
--cc=hpa@zytor.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-snps-arc@lists.infradead.org \
--cc=linux@armlinux.org.uk \
--cc=mingo@redhat.com \
--cc=tglx@linutronix.de \
--cc=thomas.weissschuh@linutronix.de \
--cc=vgupta@kernel.org \
--cc=x86@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®