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: <20160407094333.GD3866@pd.tnic>
Date:	Thu, 7 Apr 2016 11:43:33 +0200
From:	Borislav Petkov <bp@...e.de>
To:	Dmitry Vyukov <dvyukov@...gle.com>
Cc:	Andi Kleen <andi@...stfloor.org>, zengzhaoxiu@....com,
	Thomas Gleixner <tglx@...utronix.de>,
	Ingo Molnar <mingo@...hat.com>,
	"H. Peter Anvin" <hpa@...or.com>,
	Denys Vlasenko <dvlasenk@...hat.com>,
	Andrew Morton <akpm@...ux-foundation.org>,
	Kees Cook <keescook@...omium.org>,
	LKML <linux-kernel@...r.kernel.org>,
	Zhaoxiu Zeng <zhaoxiu.zeng@...il.com>
Subject: Re: [PATCH v2 10/30] Add x86-specific parity functions

On Thu, Apr 07, 2016 at 08:31:09AM +0200, Dmitry Vyukov wrote:
> Hweight custom calling convention caused crashes with KCOV coverage.
> We had to disable instrumentation of the file.

I guess we can do something like this:

       if (likely(static_cpu_has(X86_FEATURE_POPCNT)))
               asm volatile(POPCNT32
                            : "="REG_OUT (res)
                            : REG_IN (w));
       else
               res = __sw_hweight32(w);

and get rid of the custom calling convention.

Along with some numbers showing that the change doesn't cause any
noticeable slowdown...

-- 
Regards/Gruss,
    Boris.

SUSE Linux GmbH, GF: Felix Imendörffer, Jane Smithard, Graham Norton, HRB 21284 (AG Nürnberg)
-- 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ