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]
Date:	Thu, 15 Dec 2011 16:52:50 -0600 (CST)
From:	Christoph Lameter <cl@...ux.com>
To:	jbeulich@...e.com, mingo@...hat.com, hpa@...or.com,
	linux-kernel@...r.kernel.org, torvalds@...ux-foundation.org,
	a.p.zijlstra@...llo.nl, dhowells@...hat.com,
	akpm@...ux-foundation.org, Thomas Gleixner <tglx@...utronix.de>,
	Ingo Molnar <mingo@...e.hu>
cc:	linux-tip-commits@...r.kernel.org
Subject: Re: [tip:x86/asm] x86: Fix and improve
 percpu_cmpxchg{8,16}b_double()

On Thu, 15 Dec 2011, tip-bot for Jan Beulich wrote:

> x86: Fix and improve percpu_cmpxchg{8,16}b_double()

Great. Thanks. I wish you would have been there when I had to put this
together. Had a difficult time finding relevant docs etc on how to exactly
do this. And the failure messages from the inline asm parser were not that
helpful.

Acked-by: Christoph Lameter <cl@...ux.com>

> The __dummy variable was pointless (and needlessly initialized
> in the 2x32-bit case), given that local copies of the inputs
> already exist.

Hmm... I had some failures if I did not specify that dummy in the
inline asm. Does this work for all gcc versions?

> The 2x64-bit variant forced the address of the first object into
> %rsi, even though this is needed only for the call to the
> emulation function. The real cmpxchg16b can operate on an
> memory.

Yup. Good idea to code the load into the alternative code path to avoid
the cmpxchg of the primary code path to be restricted to %si register.

You dropped the padding with NOPs. Are the instructions on both paths
always the same length?

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