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: <20150810081552.GV16853@twins.programming.kicks-ass.net>
Date:	Mon, 10 Aug 2015 10:15:52 +0200
From:	Peter Zijlstra <peterz@...radead.org>
To:	Manfred Spraul <manfred@...orfullife.com>
Cc:	Andrew Morton <akpm@...ux-foundation.org>,
	LKML <linux-kernel@...r.kernel.org>, 1vier1@....de,
	Oleg Nesterov <oleg@...hat.com>,
	"Paul E. McKenney" <paulmck@...ux.vnet.ibm.com>,
	Kirill Tkhai <ktkhai@...allels.com>,
	Ingo Molnar <mingo@...hat.com>,
	Josh Poimboeuf <jpoimboe@...hat.com>, stable@...r.kernel.org
Subject: Re: [PATCH] ipc/sem.c: Update/correct memory barriers

On Sun, Aug 09, 2015 at 07:55:39PM +0200, Manfred Spraul wrote:
> sem_lock() did not properly pair memory barriers:
> 
> !spin_is_locked() and spin_unlock_wait() are both only control barriers.
> The code needs an acquire barrier, otherwise the cpu might perform
> read operations before the lock test.
> As no primitive exists inside <include/spinlock.h> and since it seems
> noone wants another primitive, the code creates a local primitive within
> ipc/sem.c.
> 
> With regards to -stable:
> The change of sem_wait_array() is a bugfix, the change to sem_lock()
> is a nop (just a preprocessor redefinition to improve the readability).
> The bugfix is necessary for all kernels that use sem_wait_array()
> (i.e.: starting from 3.10).
> 
> Andrew: Could you include it into your tree and forward it?
> 
> Signed-off-by: Manfred Spraul <manfred@...orfullife.com>
> Reported-by: Oleg Nesterov <oleg@...hat.com>
> Cc: <stable@...r.kernel.org>

Acked-by: Peter Zijlstra (Intel) <peterz@...radead.org>
--
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