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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20150826113507.GA7922@fixme-laptop.cn.ibm.com>
Date:	Wed, 26 Aug 2015 19:35:07 +0800
From:	Boqun Feng <boqun.feng@...il.com>
To:	Will Deacon <will.deacon@....com>
Cc:	"linux-arch@...r.kernel.org" <linux-arch@...r.kernel.org>,
	"Waiman.Long@...com" <Waiman.Long@...com>,
	"peterz@...radead.org" <peterz@...radead.org>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	"paulmck@...ux.vnet.ibm.com" <paulmck@...ux.vnet.ibm.com>,
	"mingo@...nel.org" <mingo@...nel.org>
Subject: Re: [PATCH v5 0/8] Add generic support for relaxed atomics

Hi Will,

On Wed, Aug 26, 2015 at 11:41:00AM +0100, Will Deacon wrote:
> Hi Boqun,
> 
> On Wed, Aug 26, 2015 at 05:28:34AM +0100, Boqun Feng wrote:
> > On Thu, Aug 06, 2015 at 05:54:36PM +0100, Will Deacon wrote:
> > > Will Deacon (8):
> > >   atomics: add acquire/release/relaxed variants of some atomic
> > >     operations
> > >   asm-generic: rework atomic-long.h to avoid bulk code duplication
> > >   asm-generic: add relaxed/acquire/release variants for atomic_long_t
> > >   lockref: remove homebrew cmpxchg64_relaxed macro definition
> > >   locking/qrwlock: implement queue_write_unlock using smp_store_release
> > >   locking/qrwlock: make use of acquire/release/relaxed atomics
> > >   include/llist: use linux/atomic.h instead of asm/cmpxchg.h
> > 
> > Should we step further to privatize asm/cmpxchg.h entirely? Keep it only
> > included in arch/*?
> > 
> > Because after your next patch, in some configurations, asm/cmpxchg.h of
> > ARM only provides the definition of {cmpxchg,xchg}_relaxed, others are
> > built in linux/atomic.h. Further more, other architecture may implement
> > asm/cmpxchg.h similarly in the future. So, IIUC, we actually don't
> > guarantee all cmpxchg(), xchg() and their variants are defined in
> > asm/cmpxchg.h.
> > 
> > Though current users of asm/cmpxchg.h outside arch/* are fine,
> > because they all happen to have got linux/atomic.h included. But we'd
> > better change the current users and call out that asm/cmpxchg.h is
> > privatized in the document.
> > 
> > >   ARM: atomics: define our SMP atomics in terms of _relaxed operations
> > 
> > 
> > Consider this patch maybe? I did a simple build test on X86.
> 
> I'm not sure that the addition to Documentation/atomic_ops.txt is really

Well.. I think at least we'd better say "to use {cmp,}xchg, include
linux/atomic.h" somewhere, because these two function families don't
have atomic_ prefix and don't take atomic{,64}_t as a parameter.

> worth it, but either way:
> 
>   Acked-by: Will Deacon <will.deacon@....com>

Thank you!

> 
> It's probably best to send this as a standalone patch, since the relaxed
> parts are already queued in -tip.

Good point. Will send a standalone patch.

Regards,
Boqun

Download attachment "signature.asc" of type "application/pgp-signature" (474 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ