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: <5998407c-3497-22c1-45dc-a86afcb73c94@zytor.com>
Date:	Wed, 4 May 2016 12:33:24 -0700
From:	"H. Peter Anvin" <hpa@...or.com>
To:	Brian Gerst <brgerst@...il.com>, Borislav Petkov <bp@...e.de>
Cc:	LKML <linux-kernel@...r.kernel.org>,
	Dmitry Vyukov <dvyukov@...gle.com>,
	Andi Kleen <andi@...stfloor.org>, zengzhaoxiu@....com,
	Thomas Gleixner <tglx@...utronix.de>,
	Ingo Molnar <mingo@...hat.com>,
	Denys Vlasenko <dvlasenk@...hat.com>,
	Andrew Morton <akpm@...ux-foundation.org>,
	Kees Cook <keescook@...omium.org>,
	Zhaoxiu Zeng <zhaoxiu.zeng@...il.com>,
	Andy Lutomirski <luto@...capital.net>,
	Peter Zijlstra <peterz@...radead.org>
Subject: Re: [RFC PATCH] x86/hweight: Get rid of the special calling
 convention

On 05/04/2016 12:31 PM, Brian Gerst wrote:
>>
>> -       asm (ALTERNATIVE("call __sw_hweight32", POPCNT32, X86_FEATURE_POPCNT)
>> -                    : "="REG_OUT (res)
>> -                    : REG_IN (w));
>> +       if (likely(static_cpu_has(X86_FEATURE_POPCNT))) {
>> +               asm volatile("popcnt %[w], %[res]" : [res] "=r" (res) : [w] "r" (w));
> 
> Do all supported versions of the assembler know of the popcnt
> instruction?  That's why is was open coded before.  The problem is
> Intel and AMD are constantly adding new instructions and it's a long
> cycle for the user's assembler to get updated.
> 

Most likely not.  It would be nice to have some more uniform solution to
that.  I'm wondering if we could use the -Wa option to load some kind of
macro package.

	-hpa


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ