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: <20090525215754.GF3667@n2100.arm.linux.org.uk>
Date:	Mon, 25 May 2009 22:57:54 +0100
From:	Russell King - ARM Linux <linux@....linux.org.uk>
To:	Mathieu Desnoyers <mathieu.desnoyers@...ymtl.ca>
Cc:	Jamie Lokier <jamie@...reable.org>,
	Catalin Marinas <catalin.marinas@....com>,
	linux-arm-kernel@...ts.arm.linux.org.uk,
	linux-kernel@...r.kernel.org,
	Andrew Morton <akpm@...ux-foundation.org>,
	"Paul E. McKenney" <paulmck@...ux.vnet.ibm.com>,
	"David S. Miller" <davem@...emloft.net>,
	Paul Mackerras <paulus@...ba.org>
Subject: Re: Broken ARM (and powerpc ?) futex wrt memory barriers

On Mon, May 25, 2009 at 05:45:33PM -0400, Mathieu Desnoyers wrote:
> I think we also have to deal with futexes. See
> arch/arm/include/asm/futex.h :
> 
> 1 - 
> 
> #ifdef CONFIG_SMP
> 
> #include <asm-generic/futex.h>
> 
> #else /* !SMP, we can work around lack of atomic ops by disabling
> preemption */
> 
> (arm-specific code here, seems to deal with futexes)
> 
> #endif
> 
> -> is it just me or this ifdef condition is the exact opposite of what
> it should be ? I thought those generic futexes were for UP-only
> systems...

No, it is correct.  Look deeper - the generic stuff implements a whole
load of futex stuff as returning -ENOSYS - it's not implemented.

What you see in ARM is the UP code implementing the set/add/or/andn/xor
cmpxchg operations.  However, this code is most certainly not SMP safe
(and I couldn't persuade the folk writing it to come up with a SMP
version.)  So, on ARM futex is supported on UP systems, but not SMP
systems until someone gets around to fixing this.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ