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: <20150803172658.GX25159@twins.programming.kicks-ass.net>
Date:	Mon, 3 Aug 2015 19:26:58 +0200
From:	Peter Zijlstra <peterz@...radead.org>
To:	Will Deacon <will.deacon@....com>
Cc:	linux-arch@...r.kernel.org, Waiman.Long@...com,
	linux-kernel@...r.kernel.org, paulmck@...ux.vnet.ibm.com,
	mingo@...nel.org
Subject: Re: [PATCH v4 1/8] atomics: add acquire/release/relaxed variants of
 some atomic operations

On Mon, Aug 03, 2015 at 06:02:24PM +0100, Will Deacon wrote:
> +/*
> + * The idea here is to build acquire/release variants by adding explicit
> + * barriers on top of the relaxed variant. In the case where the relaxed
> + * variant is already fully ordered, no additional barriers are needed.
> + */
> +#define __atomic_op_acquire(ret_t, op, ...)				\
> +({									\
> +	ret_t __ret = op##_relaxed(__VA_ARGS__);			\

Do you really need ret_t? Can't we use typeof() on the expression?

> +	smp_mb__after_atomic();						\
> +	__ret;								\
> +})

--
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