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: <1472742257-10515-2-git-send-email-manfred@colorfullife.com>
Date:   Thu,  1 Sep 2016 17:04:11 +0200
From:   Manfred Spraul <manfred@...orfullife.com>
To:     benh@...nel.crashing.org, paulmck@...ux.vnet.ibm.com,
        Ingo Molnar <mingo@...e.hu>, Boqun Feng <boqun.feng@...il.com>,
        Peter Zijlstra <peterz@...radead.org>,
        Andrew Morton <akpm@...ux-foundation.org>
Cc:     LKML <linux-kernel@...r.kernel.org>, will.deacon@....com,
        1vier1@....de, Davidlohr Bueso <dave@...olabs.net>,
        Manfred Spraul <manfred@...orfullife.com>
Subject: [PATCH 1/7] ipc/sem.c: Remove smp_rmb() from complexmode_enter()

complexmode_enter() contains an smp_rmb() after spin_unlock_wait().
This was done to allow safe backporting.

Commit 2c6100227116 ("locking/qspinlock: Fix spin_unlock_wait() some more")
(and the commits for the other archs) ensure that spin_unlock_wait()
is an ACQUIRE.
Therefore the smp_rmb() after spin_unlock_wait() can be removed.

Not for stable!

Signed-off-by: Manfred Spraul <manfred@...orfullife.com>
---
 ipc/sem.c | 8 --------
 1 file changed, 8 deletions(-)

diff --git a/ipc/sem.c b/ipc/sem.c
index 5e318c5..6586e0a 100644
--- a/ipc/sem.c
+++ b/ipc/sem.c
@@ -290,14 +290,6 @@ static void complexmode_enter(struct sem_array *sma)
 		sem = sma->sem_base + i;
 		spin_unlock_wait(&sem->lock);
 	}
-	/*
-	 * spin_unlock_wait() is not a memory barriers, it is only a
-	 * control barrier. The code must pair with spin_unlock(&sem->lock),
-	 * thus just the control barrier is insufficient.
-	 *
-	 * smp_rmb() is sufficient, as writes cannot pass the control barrier.
-	 */
-	smp_rmb();
 }
 
 /*
-- 
2.7.4

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ