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]
Date: Thu, 30 May 2024 11:21:40 -0700
From: "Paul E. McKenney" <paulmck@...nel.org>
To: Arnd Bergmann <arnd@...db.de>
Cc: Russell King <linux@...linux.org.uk>,
	Naresh Kamboju <naresh.kamboju@...aro.org>,
	open list <linux-kernel@...r.kernel.org>,
	Linux ARM <linux-arm-kernel@...ts.infradead.org>,
	lkft-triage@...ts.linaro.org,
	Linux Regressions <regressions@...ts.linux.dev>,
	rcu <rcu@...r.kernel.org>, Dan Carpenter <dan.carpenter@...aro.org>,
	Joel Fernandes <joel@...lfernandes.org>, eeraj.upadhyay@...nel.org,
	John Ogness <john.ogness@...utronix.de>,
	Mark Brown <broonie@...nel.org>
Subject: Re: arm-linux-gnueabihf-ld:
 kernel/rcu/update.o:update.c:(.text+0x1cc4): more undefined references to
 `__bad_cmpxchg' follow

On Thu, May 30, 2024 at 08:05:50PM +0200, Arnd Bergmann wrote:
> On Thu, May 30, 2024, at 19:24, Paul E. McKenney wrote:
> > On Thu, May 30, 2024 at 09:37:21AM -0700, Paul E. McKenney wrote:
> >> On Thu, May 30, 2024 at 03:27:58PM +0200, Arnd Bergmann wrote:
> 
> > And for an untested first attempt at a fix.
> >
> > What did I mess up this time?  ;-)
> >
> 
> I think only the comment:
> 
> > 
> >  	switch (size) {
> > -#ifndef CONFIG_CPU_V6	/* min ARCH >= ARMv6K */
> > +#ifdef CONFIG_CPU_V6	/* min ARCH >= ARMv6K */
> > +	case 1:
> > +		oldval = cmpxchg_emu_u8((volatile u8 *)ptr, old, new);
> > +		break;
> > +#else
> 
> "min ARCH >= ARMv6K" now applies to the #else side, while the
> #if side is the early ARMv6 (pre-v6K).

Good catch!

I plan to fold the following into the original with attribution.

							Thanx, Paul

------------------------------------------------------------------------

diff --git a/arch/arm/include/asm/cmpxchg.h b/arch/arm/include/asm/cmpxchg.h
index fd9b99f4dca46..34674a4118755 100644
--- a/arch/arm/include/asm/cmpxchg.h
+++ b/arch/arm/include/asm/cmpxchg.h
@@ -162,11 +162,11 @@ static inline unsigned long __cmpxchg(volatile void *ptr, unsigned long old,
 	prefetchw((const void *)ptr);
 
 	switch (size) {
-#ifdef CONFIG_CPU_V6	/* min ARCH >= ARMv6K */
+#ifdef CONFIG_CPU_V6	/* min ARCH < ARMv6K */
 	case 1:
 		oldval = cmpxchg_emu_u8((volatile u8 *)ptr, old, new);
 		break;
-#else
+#else /* min ARCH >= ARMv6K */
 	case 1:
 		do {
 			asm volatile("@ __cmpxchg1\n"

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ