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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Wed, 9 Jul 2014 09:04:20 -0700
From:	"Paul E. McKenney" <paulmck@...ux.vnet.ibm.com>
To:	Lai Jiangshan <laijs@...fujitsu.com>
Cc:	linux-kernel@...r.kernel.org, mingo@...nel.org,
	dipankar@...ibm.com, akpm@...ux-foundation.org,
	mathieu.desnoyers@...icios.com, josh@...htriplett.org,
	niv@...ibm.com, tglx@...utronix.de, peterz@...radead.org,
	rostedt@...dmis.org, dhowells@...hat.com, edumazet@...gle.com,
	dvhart@...ux.intel.com, fweisbec@...il.com, oleg@...hat.com,
	sbw@....edu
Subject: Re: [PATCH tip/core/rcu 08/17] rcu: Allow post-unlock reference for
 rt_mutex

On Wed, Jul 09, 2014 at 09:50:09AM +0800, Lai Jiangshan wrote:
> On 07/08/2014 06:38 AM, Paul E. McKenney wrote:
> > From: "Paul E. McKenney" <paulmck@...ux.vnet.ibm.com>
> > 
> > The current approach to RCU priority boosting uses an rt_mutex strictly
> > for its priority-boosting side effects.  The rt_mutex_init_proxy_locked()
> > function is used by the booster to initialize the lock as held by the
> > boostee.  The booster then uses rt_mutex_lock() to acquire this rt_mutex,
> > which priority-boosts the boostee.  When the boostee reaches the end
> > of its outermost RCU read-side critical section, it checks a field in
> > its task structure to see whether it has been boosted, and, if so, uses
> > rt_mutex_unlock() to release the rt_mutex.  The booster can then go on
> > to boost the next task that is blocking the current RCU grace period.
> > 
> > But reasonable implementations of rt_mutex_unlock() might result in the
> > boostee referencing the rt_mutex's data after releasing it. 
> 
> XXXX_unlock(lock_ptr) should not reference to the lock_ptr after it has unlocked the lock. (*)
> So I think this patch is unneeded. Although its adding overhead is at slow-patch,
> but it adds REVIEW-burden.
> 
> And although the original rt_mutex_unlock() violates the rule(*) when the fast-cmpxchg-path,
> but it is fixed now.
> 
> It is the lock-subsystem's responsible to do this. I prefer to add the wait_for_complete()
> stuff until the future when the boostee needs to re-access the booster after rt_mutex_unlock()
> instead of now.

It is on my list to remove.  ;-)

							Thanx, Paul

--
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