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:	Wed, 18 May 2016 10:23:23 -0700
From:	Jason Low <jason.low2@....com>
To:	Davidlohr Bueso <dave@...olabs.net>
Cc:	Waiman Long <Waiman.Long@....com>,
	Peter Zijlstra <peterz@...radead.org>,
	Ingo Molnar <mingo@...hat.com>, linux-kernel@...r.kernel.org,
	Dave Chinner <david@...morbit.com>,
	Peter Hurley <peter@...leysoftware.com>,
	"Paul E. McKenney" <paulmck@...ux.vnet.ibm.com>,
	Scott J Norton <scott.norton@....com>,
	Douglas Hatch <doug.hatch@....com>, jason.low2@...com
Subject: Re: [PATCH v4 2/5] locking/rwsem: Protect all writes to owner by
 WRITE_ONCE()

On Wed, 2016-05-18 at 07:04 -0700, Davidlohr Bueso wrote:
> On Tue, 17 May 2016, Waiman Long wrote:
> 
> >Without using WRITE_ONCE(), the compiler can potentially break a
> >write into multiple smaller ones (store tearing). So a read from the
> >same data by another task concurrently may return a partial result.
> >This can result in a kernel crash if the data is a memory address
> >that is being dereferenced.
> >
> >This patch changes all write to rwsem->owner to use WRITE_ONCE()
> >to make sure that store tearing will not happen. READ_ONCE() may
> >not be needed for rwsem->owner as long as the value is only used for
> >comparison and not dereferencing.
> >
> >Signed-off-by: Waiman Long <Waiman.Long@....com>
> 
> Yes, ->owner can obviously be handled locklessly during optimistic
> spinning.
> 
> Acked-by: Davidlohr Bueso <dave@...olabs.net>

Acked-by: Jason Low <jason.low2@....com>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ