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: <20180507065021.s63ndzpjq4pg4a74@gmail.com>
Date:   Mon, 7 May 2018 08:50:21 +0200
From:   Ingo Molnar <mingo@...nel.org>
To:     Boqun Feng <boqun.feng@...il.com>
Cc:     Peter Zijlstra <peterz@...radead.org>,
        Mark Rutland <mark.rutland@....com>,
        linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org,
        aryabinin@...tuozzo.com, catalin.marinas@....com,
        dvyukov@...gle.com, will.deacon@....com
Subject: Re: [PATCH] locking/atomics/powerpc: Move cmpxchg helpers to
 asm/cmpxchg.h and define the full set of cmpxchg APIs


* Boqun Feng <boqun.feng@...il.com> wrote:

> 
> 
> On Sun, May 6, 2018, at 8:11 PM, Ingo Molnar wrote:
> > 
> > * Boqun Feng <boqun.feng@...il.com> wrote:
> > 
> > > > The only change I made beyond a trivial build fix is that I also added the release 
> > > > atomics variants explicitly:
> > > > 
> > > > +#define atomic_cmpxchg_release(v, o, n) \
> > > > +	cmpxchg_release(&((v)->counter), (o), (n))
> > > > +#define atomic64_cmpxchg_release(v, o, n) \
> > > > +	cmpxchg_release(&((v)->counter), (o), (n))
> > > > 
> > > > It has passed a PowerPC cross-build test here, but no runtime tests.
> > > > 
> > > 
> > > Do you have the commit at any branch in tip tree? I could pull it and
> > > cross-build and check the assembly code of lib/atomic64_test.c, that way
> > > I could verify whether we mess something up.
> > > 
> > > > Does this patch look good to you?
> > > > 
> > > 
> > > Yep!
> > 
> > Great - I have pushed the commits out into the locking tree, they can be 
> > found in:
> > 
> >   git fetch git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git 
> > locking/core
> > 
> 
> Thanks! My compile test told me that we need to remove the definitions of 
> atomic_xchg and atomic64_xchg in ppc's asm/atomic.h: they are now
> duplicate, and will prevent the generation of _release and _acquire in the
> new logic.
> 
> If you need a updated patch for this from me, I could send later today.
> (I don't have a  handy environment for patch sending now, so...)

That would be cool, thanks! My own cross-build testing didn't trigger that build 
failure.

> Other than this, the modification looks fine, the lib/atomic64_test.c
> generated the same asm before and after the patches.

Cool, thanks for checking!

Thanks,

	Ingo

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ