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:	Wed, 05 May 2010 10:30:18 +0300
From:	Avi Kivity <avi@...hat.com>
To:	"H. Peter Anvin" <hpa@...or.com>
CC:	Suresh Siddha <suresh.b.siddha@...el.com>,
	Brian Gerst <brgerst@...il.com>,
	"Cui, Dexuan" <dexuan.cui@...el.com>,
	Sheng Yang <sheng@...ux.intel.com>,
	Ingo Molnar <mingo@...e.hu>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	"kvm@...r.kernel.org" <kvm@...r.kernel.org>
Subject: Re: [PATCH 1/2] x86: eliminate TS_XSAVE

On 05/04/2010 09:24 PM, H. Peter Anvin wrote:
>
> I would like to request one change, however.  I would like to see the
> alternatives code to be:
>
> 	movb $0,reg
> 	movb $1,reg
>
> ... instead of using xor (which has to be padded with NOPs, which is of
> course pointless since the slot is a fixed size.)

Right.

> I would suggest using
> a byte-sized variable instead of a dword-size variable to save a few
> bytes, too.
>    

I used a bool, and the code already compiles to a byte mov.  Though it 
could be argued that a word instruction is better since it avoids a 
false dependency, and allows a preceding instruction that modifies %reg 
to be executed after the mov instruction.

> Once the jump label framework is integrated and has matured, I think we
> should consider using it to save the mov/test/jump.
>    

IIRC that has an implied unlikely() which isn't suitable here?

Perhaps the immediate values patches.

-- 
error compiling committee.c: too many arguments to function

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