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: <20180605140256.chenuacq7s34ye7u@lakrids.cambridge.arm.com>
Date:   Tue, 5 Jun 2018 15:02:56 +0100
From:   Mark Rutland <mark.rutland@....com>
To:     Peter Zijlstra <peterz@...radead.org>
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, Jun 05, 2018 at 03:56:16PM +0200, Peter Zijlstra wrote:
> On Tue, Jun 05, 2018 at 02:28:02PM +0100, Mark Rutland wrote:
> > On Tue, Jun 05, 2018 at 02:16:23PM +0200, Peter Zijlstra wrote:
> > > and simply using smp_mb__{before,after}_atomic for the full fence, its
> > > exactly what they were made for.
> > 
> > The snag is arch/alpha, whare we have:
> > 
> > /*
> >  * To ensure dependency ordering is preserved for the _relaxed and
> >  * _release atomics, an smp_read_barrier_depends() is unconditionally
> >  * inserted into the _relaxed variants, which are used to build the
> >  * barriered versions. To avoid redundant back-to-back fences, we can
> >  * define the _acquire and _fence versions explicitly.
> >  */
> > #define __atomic_op_acquire(op, args...)        op##_relaxed(args)
> > #define __atomic_op_fence                       __atomic_op_release
> > 
> > ... where alpha's smp_read_barrier_depends() is the same as
> > smp_mb_after_atomic().
> > 
> > Since alpha's non-value-returning atomics do not have the
> > smp_read_barrier_depends(), I can't just define an empty
> > smp_mb_after_atomic().
> > 
> > Thoughts?
> 
> Bah, of course there had to be a misfit.

Of course it had to be alpha. ;)

> Something along these lines then:
> 
>  __atomic_acquire_fence
>  __atomic_release_fence
>  __atomic_mb_before
>  __atomic_mb_after

Locally I've made this:

__atomic_acquire_fence()
__atomic_release_fence()
__atomic_pre_fence()
__atomic_post_fence()

... but I'm more than happy to rename however you prefer.

Thanks,
Mark.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ