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: <20170222113832.GQ6515@twins.programming.kicks-ass.net>
Date:   Wed, 22 Feb 2017 12:38:32 +0100
From:   Peter Zijlstra <peterz@...radead.org>
To:     Stafford Horne <shorne@...il.com>
Cc:     Jonas Bonn <jonas@...thpole.se>,
        Stefan Kristiansson <stefan.kristiansson@...nalahti.fi>,
        linux@...ck-us.net, openrisc@...ts.librecores.org,
        linux-kernel@...r.kernel.org, Ingo Molnar <mingo@...hat.com>
Subject: Re: [PATCH v3 10/25] openrisc: add spinlock implementation

On Wed, Feb 22, 2017 at 04:11:39AM +0900, Stafford Horne wrote:
> +		lockval.tickets.owner = ACCESS_ONCE(lock->tickets.owner);
> +	return !arch_spin_value_unlocked(ACCESS_ONCE(*lock));
> +	struct __raw_tickets tickets = ACCESS_ONCE(lock->tickets);
> +#define arch_write_can_lock(x)		(ACCESS_ONCE((x)->lock) == 0)
> +#define arch_read_can_lock(x)		(ACCESS_ONCE((x)->lock) < 0x80000000)

Please, no ACCESS_ONCE() in new code, use READ_ONCE() or WRITE_ONCE().

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ