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] [day] [month] [year] [list]
Date:   Thu, 5 Apr 2018 13:22:43 +0200
From:   Peter Zijlstra <peterz@...radead.org>
To:     Will Deacon <will.deacon@....com>
Cc:     Ingo Molnar <mingo@...nel.org>,
        Matthew Wilcox <mawilcox@...rosoft.com>,
        linux-kernel@...r.kernel.org
Subject: Re: [RFC] locking/mutex: Optimize __mutex_trylock_fast

On Thu, Apr 05, 2018 at 10:55:45AM +0100, Will Deacon wrote:

> > +#define atomic_long_try_cmpxchg_relaxed(l, old, new) \
> > +	(ATOMIC_LONG_PFX(_try_cmpxchg_relaxed)((ATOMIC_LONG_PFX(_t) *)(l), \
> > +					   (ATOMIC_LONG_TYPE *)(old), (ATOMIC_LONG_TYPE)(new)))
> 
> Are the casts on old and new strictly needed? We don't have them for the
> non-try versions...

It was required for the pointer; it doesn't want to convert (unsigned
long *) into (s64 *) without complaining about it :/

Powered by blists - more mailing lists