lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <aA3pj0yVIizZPRxT@gmail.com>
Date: Sun, 27 Apr 2025 10:23:43 +0200
From: Ingo Molnar <mingo@...nel.org>
To: Brian Gerst <brgerst@...il.com>
Cc: Uros Bizjak <ubizjak@...il.com>, linux-kernel@...r.kernel.org,
	"Ahmed S . Darwish" <darwi@...utronix.de>,
	Andrew Cooper <andrew.cooper3@...rix.com>,
	Ard Biesheuvel <ardb@...nel.org>, Arnd Bergmann <arnd@...nel.org>,
	Borislav Petkov <bp@...en8.de>,
	Dave Hansen <dave.hansen@...ux.intel.com>,
	"H . Peter Anvin" <hpa@...or.com>,
	John Ogness <john.ogness@...utronix.de>,
	Linus Torvalds <torvalds@...ux-foundation.org>,
	Peter Zijlstra <peterz@...radead.org>,
	Thomas Gleixner <tglx@...utronix.de>
Subject: Re: [PATCH 15/15] x86/atomics: Remove !CONFIG_X86_CX8 methods


* Brian Gerst <brgerst@...il.com> wrote:

> On Fri, Apr 25, 2025 at 10:30 AM Uros Bizjak <ubizjak@...il.com> wrote:
> >
> >
> >
> > On 25. 04. 25 10:42, Ingo Molnar wrote:
> >
> > > -#endif
> > > +#define arch_cmpxchg64                       __cmpxchg64
> > > +#define arch_cmpxchg64_local         __cmpxchg64_local
> > > +#define arch_try_cmpxchg64           __try_cmpxchg64
> > > +#define arch_try_cmpxchg64_local     __try_cmpxchg64_local
> > >
> > >   #define system_has_cmpxchg64()              boot_cpu_has(X86_FEATURE_CX8)
> >
> > #define system_has_cmpxchg64()          1
> 
> Or just outright removed, since x86 was the only arch that defined it.

No, it cannot be removed, x86-32 *is* still the only 32-bit arch that 
enables it.

I.e. defining it to 1 is the correct solution, and that unconditionally 
enables the SLUB code optimizations. It depended on a runtime 
boot_cpu_has() check before.

Removing it would remove the optimization from x86-32 for no good 
reason.

Thanks,

	Ingo

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ