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: <1464995089.2367.7.camel@j-VirtualBox>
Date:	Fri, 03 Jun 2016 16:04:49 -0700
From:	Jason Low <jason.low2@....com>
To:	Peter Zijlstra <peterz@...radead.org>
Cc:	jason.low2@...com, Ingo Molnar <mingo@...nel.org>,
	Linus Torvalds <torvalds@...ux-foundation.org>,
	Ingo Molnar <mingo@...hat.com>,
	Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
	Andrew Morton <akpm@...ux-foundation.org>,
	Richard Henderson <rth@...ddle.net>,
	Ivan Kokshaysky <ink@...assic.park.msu.ru>,
	Matt Turner <mattst88@...il.com>,
	Tony Luck <tony.luck@...el.com>,
	Fenghua Yu <fenghua.yu@...el.com>,
	Martin Schwidefsky <schwidefsky@...ibm.com>,
	Terry Rudd <terry.rudd@....com>,
	Heiko Carstens <heiko.carstens@...ibm.com>,
	Thomas Gleixner <tglx@...utronix.de>,
	Arnd Bergmann <arnd@...db.de>,
	Christoph Lameter <cl@...ux.com>,
	Davidlohr Bueso <dave@...olabs.net>,
	Waiman Long <Waiman.Long@....com>,
	Tim Chen <tim.c.chen@...ux.intel.com>,
	Peter Hurley <peter@...leysoftware.com>
Subject: Re: [RFC][PATCH 0/7] locking/rwsem: Convert rwsem count to
 atomic_long_t

On Sat, 2016-06-04 at 00:36 +0200, Peter Zijlstra wrote:
> On Fri, Jun 03, 2016 at 11:09:54AM -0700, Jason Low wrote:
> > --- a/arch/alpha/include/asm/rwsem.h
> > +++ b/arch/alpha/include/asm/rwsem.h
> > @@ -25,8 +25,8 @@ static inline void __down_read(struct rw_semaphore *sem)
> >  {
> >  	long oldcount;
> >  #ifndef	CONFIG_SMP
> > -	oldcount = sem->count;
> > -	sem->count += RWSEM_ACTIVE_READ_BIAS;
> > +	oldcount = atomic_long_read(&sem->count);
> > +	atomic_long_add(RWSEM_ACTIVE_READ_BIAS, &sem->count);
> >  #else
> 
> That _completely_ misses the point of the whole !SMP code.

Oh right, this defeats the purpose of the additional code path. Might as
well have removed the code entirely  :\

I can send out a new patch assuming we're still keeping all the arch/*/
rwsem.h?

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ