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] [day] [month] [year] [list]
Message-ID: <20160201172444.GX6357@twins.programming.kicks-ass.net>
Date:	Mon, 1 Feb 2016 18:24:44 +0100
From:	Peter Zijlstra <peterz@...radead.org>
To:	Will Deacon <will.deacon@....com>
Cc:	Paul McKenney <paulmck@...ux.vnet.ibm.com>,
	linux-kernel@...r.kernel.org, Davidlohr Bueso <dave@...olabs.net>,
	Ingo Molnar <mingo@...nel.org>, parri.andrea@...il.com
Subject: Re: [RFC][PATCH] locking/mcs: Fix ordering for mcs_spin_lock()

On Mon, Feb 01, 2016 at 04:58:13PM +0000, Will Deacon wrote:
> Hi Peter,
> 
> On Mon, Feb 01, 2016 at 03:37:24PM +0100, Peter Zijlstra wrote:
> > Given the below patch; we've now got an unconditional full global
> > barrier in, does this make the MCS spinlock RCsc ?
> > 
> > The 'problem' is that this barrier can happen before we actually acquire
> > the lock. That is, if we hit arch_mcs_spin_lock_contended() _that_ will
> > be the acquire barrier and we end up with a SYNC in between unlock and
> > lock -- ie. not an smp_mb__after_unlock_lock() equivalent.
> 
> In which case, I don't think the lock will be RCsc with this change;
> you'd need an smp_mb__after_unlock_lock() after
> arch_mcs_spin_lock_contended(...) if you wanted the thing to be RCsc.

Right, I think it works for TSO, but in general it makes my head hurt.

> > This is non-critical because the MCS code isn't actually used and
> > mostly serves as documentation, a stepping stone to the more complex
> > things we've build on top of the idea.
> 
> Although I wonder how useful this is as a documentation aid now that we
> have the osq_lock.

So the OSQ thing is horribly complex, pure MCS is a nice step-stone.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ