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:   Tue, 5 Jun 2018 14:16:23 +0200
From:   Peter Zijlstra <peterz@...radead.org>
To:     Mark Rutland <mark.rutland@....com>
Cc:     linux-kernel@...r.kernel.org, Boqun Feng <boqun.feng@...il.com>,
        Will Deacon <will.deacon@....com>,
        Andrea Parri <parri.andrea@...il.com>
Subject: Re: [PATCH 2/7] atomics/treewide: rework ordering barriers

On Tue, May 29, 2018 at 07:07:41PM +0100, Mark Rutland wrote:
> +#ifndef __atomic_mb__after_acquire
> +#define __atomic_mb__after_acquire	smp_mb__after_atomic
> +#endif
> +
> +#ifndef __atomic_mb__before_release
> +#define __atomic_mb__before_release	smp_mb__before_atomic
> +#endif
> +
> +#ifndef __atomic_mb__before_fence
> +#define __atomic_mb__before_fence	smp_mb__before_atomic
> +#endif
> +
> +#ifndef __atomic_mb__after_fence
> +#define __atomic_mb__after_fence	smp_mb__after_atomic
> +#endif

I really _really_ dislike those names.. because they imply providing an
MB before/after something else.

But that is exactly what they do not.

How about:

	__atomic_acquire_fence
	__atomic_release_fence

for the acquire/release things, and simply using
smp_mb__{before,after}_atomic for the full fence, its exactly what they
were made for.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ