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:	Fri, 9 May 2014 12:22:19 +0200
From:	Peter Zijlstra <peterz@...radead.org>
To:	Vineet Gupta <Vineet.Gupta1@...opsys.com>
Cc:	"linux-arch@...r.kernel.org" <linux-arch@...r.kernel.org>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	"torvalds@...ux-foundation.org" <torvalds@...ux-foundation.org>,
	"akpm@...ux-foundation.org" <akpm@...ux-foundation.org>,
	"mingo@...nel.org" <mingo@...nel.org>,
	"will.deacon@....com" <will.deacon@....com>,
	"paulmck@...ux.vnet.ibm.com" <paulmck@...ux.vnet.ibm.com>
Subject: Re: [PATCH 03/20] arch,arc: Fold atomic_ops

On Fri, May 09, 2014 at 09:34:51AM +0000, Vineet Gupta wrote:
> Hi Peter,
> 
> Minor point below, otherwise looks good.
> 
> > +#define atomic_clear_mask(mask, v) atomic_and(~(mask), (v))
> 
> Given that ARC has instruction to do just that, can we keep below instead.
> 
> ATOMIC_OP(clear_mask, ~=, bic)
> 
> (see asm version of atomic_clear_mask)

Ah, yes I did notices that.

The thing is, I was going to kill clear_mask in the next set.

I'm going to introduce: atomic_{or,and,xor}() and replace all
atomic_set_mask() with atomic_or() and atomic_clear_mask() with
atomic_and(~(mask)).

One of the 'problems' is that atomic_{set,clear}_mask() are not
available on all archs and its a 'weird' interface in so far as that
most our other primitives are or/and based, I don't think we have nand.

But if people really want I suppose I could also add atomic_nand().

Content of type "application/pgp-signature" skipped

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ