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] [day] [month] [year] [list]
Date:	Wed, 12 Aug 2015 15:31:10 +0200
From:	Oleg Nesterov <oleg@...hat.com>
To:	Manfred Spraul <manfred@...orfullife.com>
Cc:	Andrew Morton <akpm@...ux-foundation.org>,
	LKML <linux-kernel@...r.kernel.org>, 1vier1@....de,
	"Paul E. McKenney" <paulmck@...ux.vnet.ibm.com>,
	Peter Zijlstra <peterz@...radead.org>,
	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 08/09, Manfred Spraul wrote:
>
>  /*
> + * spin_unlock_wait() and !spin_is_locked() are not memory barriers, they
> + * are only control barriers.
> + * The code must pair with spin_unlock(&sem->lock) or
> + * spin_unlock(&sem_perm.lock), thus just the control barrier is insufficient.
> + *
> + * smp_rmb() is sufficient, as writes cannot pass the control barrier.
> + */
> +#define ipc_smp_acquire__after_spin_is_unlocked()	smp_rmb()

Agreed.



But to remind, this can have more users. In particular, task_work_run()
which currently does mb() after spin_unlock_wait().

Can someone suggest a good "generic" name for this helper so that we can
move it into include/linux/spinlock.h?

Oleg.

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