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: <aCWql__AlUA2fnLe@gmail.com>
Date: Thu, 15 May 2025 10:49:27 +0200
From: Ingo Molnar <mingo@...nel.org>
To: Uros Bizjak <ubizjak@...il.com>
Cc: 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


* Uros Bizjak <ubizjak@...il.com> wrote:

> On Sun, Apr 27, 2025 at 10:26 AM Ingo Molnar <mingo@...nel.org> wrote:
> >
> >
> > * 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
> >
> > Thanks, I've updated the patch with the change below.
> 
> I think you also want to change:
> 
> > diff --git a/lib/atomic64_test.c b/lib/atomic64_test.c
> > index d726068358c7de..352e811c99ce9e 100644
> > --- a/lib/atomic64_test.c
> > +++ b/lib/atomic64_test.c
> > @@ -254,10 +254,8 @@ static __init int test_atomics_init(void)
> > pr_info("passed for %s platform %s CX8 and %s SSE\n",
> > #ifdef CONFIG_X86_64
> > "x86-64",
> > -#elif defined(CONFIG_X86_CX8)
> > - "i586+",
> > #else
> > - "i386+",
> > + "i586+",
> > #endif
> > boot_cpu_has(X86_FEATURE_CX8) ? "with" : "without",
> 
> X86_FEATURE_CX8 is now always defined, so the "without" part is now a
> dead code. Perhaps the info message should be updated to always say
> "... platform with CX8 and ..." or even to remove this part.

Yeah, agreed. I've folded in the delta change below.

Thanks,

	Ingo

---
 lib/atomic64_test.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/lib/atomic64_test.c b/lib/atomic64_test.c
index 352e811c99ce..d7697c09041f 100644
--- a/lib/atomic64_test.c
+++ b/lib/atomic64_test.c
@@ -251,13 +251,12 @@ static __init int test_atomics_init(void)
 	test_atomic64();
 
 #ifdef CONFIG_X86
-	pr_info("passed for %s platform %s CX8 and %s SSE\n",
+	pr_info("passed for %s platform with CX8 and %s SSE\n",
 #ifdef CONFIG_X86_64
 		"x86-64",
 #else
 		"i586+",
 #endif
-	       boot_cpu_has(X86_FEATURE_CX8) ? "with" : "without",
 	       boot_cpu_has(X86_FEATURE_XMM) ? "with" : "without");
 #else
 	pr_info("passed\n");

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ