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] [thread-next>] [day] [month] [year] [list]
Message-ID: <20150715160109.GB17107@arm.com>
Date:	Wed, 15 Jul 2015 17:01:09 +0100
From:	Will Deacon <will.deacon@....com>
To:	Peter Zijlstra <peterz@...radead.org>
Cc:	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	"linux-arch@...r.kernel.org" <linux-arch@...r.kernel.org>,
	"rth@...ddle.net" <rth@...ddle.net>,
	"vgupta@...opsys.com" <vgupta@...opsys.com>,
	"linux@....linux.org.uk" <linux@....linux.org.uk>,
	"hskinnemoen@...il.com" <hskinnemoen@...il.com>,
	"realmz6@...il.com" <realmz6@...il.com>,
	"dhowells@...hat.com" <dhowells@...hat.com>,
	"rkuo@...eaurora.org" <rkuo@...eaurora.org>,
	"tony.luck@...el.com" <tony.luck@...el.com>,
	"geert@...ux-m68k.org" <geert@...ux-m68k.org>,
	"james.hogan@...tec.com" <james.hogan@...tec.com>,
	"ralf@...ux-mips.org" <ralf@...ux-mips.org>,
	"jejb@...isc-linux.org" <jejb@...isc-linux.org>,
	"benh@...nel.crashing.org" <benh@...nel.crashing.org>,
	"heiko.carstens@...ibm.com" <heiko.carstens@...ibm.com>,
	"davem@...emloft.net" <davem@...emloft.net>,
	"cmetcalf@...hip.com" <cmetcalf@...hip.com>,
	"mingo@...nel.org" <mingo@...nel.org>
Subject: Re: [RFC][PATCH 04/24] arm64: Provide atomic_{or,xor,and}

On Thu, Jul 09, 2015 at 06:28:59PM +0100, Peter Zijlstra wrote:
> Implement atomic logic ops -- atomic_{or,xor,and}.
> 
> These will replace the atomic_{set,clear}_mask functions that are
> available on some archs.
> 
> 
> Signed-off-by: Peter Zijlstra (Intel) <peterz@...radead.org>
> ---
>  arch/arm64/include/asm/atomic.h |    6 ++++++
>  1 file changed, 6 insertions(+)
> 
> --- a/arch/arm64/include/asm/atomic.h
> +++ b/arch/arm64/include/asm/atomic.h
> @@ -84,6 +84,9 @@ static inline int atomic_##op##_return(i
>  
>  ATOMIC_OPS(add, add)
>  ATOMIC_OPS(sub, sub)
> +ATOMIC_OP(and, and)
> +ATOMIC_OP(or, orr)

FYI, but without selecting CONFIG_ARCH_HAS_ATOMIC_OR this change leads to
build errors:

                 from include/linux/seqlock.h:35,
                 from include/linux/time.h:5,
                 from include/uapi/linux/timex.h:56,
                 from include/linux/timex.h:56,
                 from include/linux/sched.h:19,
                 from arch/arm64/kernel/asm-offsets.c:21:
include/linux/atomic.h:115:20: error: redefinition of ‘atomic_or’
 static inline void atomic_or(int i, atomic_t *v)
                    ^
In file included from include/linux/atomic.h:4:0,
                 from include/linux/spinlock.h:416,
                 from include/linux/seqlock.h:35,
                 from include/linux/time.h:5,
                 from include/uapi/linux/timex.h:56,
                 from include/linux/timex.h:56,
                 from include/linux/sched.h:19,
                 from arch/arm64/kernel/asm-offsets.c:21:
arch/arm64/include/asm/atomic.h:48:20: note: previous definition of ‘atomic_or’ was here
 static inline void atomic_##op(int i, atomic_t *v)   \
                    ^
arch/arm64/include/asm/atomic.h:88:1: note: in expansion of macro ‘ATOMIC_OP’
 ATOMIC_OP(or, orr)
 ^
make[2]: *** [arch/arm64/kernel/asm-offsets.s] Error 1

Will
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ