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]
Date:	Sat, 30 May 2009 12:22:09 -0700
From:	"H. Peter Anvin" <hpa@...or.com>
To:	Andrew Morton <akpm@...ux-foundation.org>
CC:	Borislav Petkov <petkovbb@...glemail.com>,
	Borislav Petkov <borislav.petkov@....com>, greg@...ah.com,
	mingo@...e.hu, norsk5@...oo.com, tglx@...utronix.de,
	mchehab@...hat.com, aris@...hat.com, edt@....ca,
	linux-kernel@...r.kernel.org, randy.dunlap@...cle.com
Subject: Re: [PATCH 0/4] amd64_edac: misc fixes

Andrew Morton wrote:
> On Sat, 30 May 2009 10:19:54 +0200 Borislav Petkov <petkovbb@...glemail.com> wrote:
> 
>> Also, I've been thinking about how the old(er)
>> toolchain problem can be addressed and one fairly doable thing would be
>> if I'd query the gas version in the kernel Makefile and define popcnt
>> dependent on it and for older assemblers simply slap in the opcode and
>> fixate the operands in an inline assembly so that it works.
> 
> We've done that before.  BUG() is one case (for other reasons), I think.
> 
> But if we have the code in there which uese the literal opcode, there's
> no need to query gas or to add the conditional.
> 
> Is popcnt supported on all CPUs?

Obviously not, since it's a relatively new opcode.  However, it is
supported by both Intel and AMD with the opcode F3 0F B8 /r.

The "/r" is the real problem ... it means one can't just mimic it with
hard-coding .byte directives without fixing the arguments (which means a
performance hit.)  Furthermore, the 0F B8 opcode is JMPE, which doesn't
take the same arguments either.

We have these kinds of toolchain issues regularly.

	-hpa

-- 
H. Peter Anvin, Intel Open Source Technology Center
I work for Intel.  I don't speak on their behalf.

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