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:	Thu, 24 Apr 2014 15:37:25 -0700
From:	"H. Peter Anvin" <hpa@...or.com>
To:	Andrew Lutomirski <amluto@...il.com>,
	"H. Peter Anvin" <hpa@...ux.intel.com>
CC:	comex <comexk@...il.com>,
	Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
	Linus Torvalds <torvalds@...ux-foundation.org>,
	Ingo Molnar <mingo@...nel.org>,
	Alexander van Heukelum <heukelum@...tmail.fm>,
	Konrad Rzeszutek Wilk <konrad.wilk@...cle.com>,
	Boris Ostrovsky <boris.ostrovsky@...cle.com>,
	Borislav Petkov <bp@...en8.de>,
	Arjan van de Ven <arjan.van.de.ven@...el.com>,
	Brian Gerst <brgerst@...il.com>,
	Alexandre Julliard <julliard@...ehq.com>,
	Andi Kleen <andi@...stfloor.org>,
	Thomas Gleixner <tglx@...utronix.de>
Subject: Re: [PATCH] x86-64: espfix for 64-bit mode *PROTOTYPE*

On 04/24/2014 03:31 PM, Andrew Lutomirski wrote:
> 
> I was imagining just randomizing a couple of high bits so the whole
> espfix area moves as a unit.
> 
>> We could XOR with a random constant with no penalty at all.  Only
>> problem is that this happens early, so the entropy system is not yet
>> available.  Fine if we have RDRAND, but...
> 
> How many people have SMAP and not RDRAND?  I think this is a complete
> nonissue for non-SMAP systems.
> 

Most likely none, unless some "clever" virtualizer turns off RDRAND out
of spite.

>>> Peter, is this idea completely nuts?  The only exceptions that can
>>> happen there are NMI, MCE, #DB, #SS, and #GP.  The first four use IST,
>>> so they won't double-fault.
>>
>> It is completely nuts, but sometimes completely nuts is actually useful.
>>  It is more complexity, to be sure, but it doesn't seem completely out
>> of the realm of reason, and avoids having to unwind the ministack except
>> in the normally-fatal #DF handler.  #DFs are documented as not
>> recoverable, but we might be able to do something here.
>>
>> The only real disadvantage I see is the need for more bookkeeping
>> metadata.  Basically the bitmask in espfix_64.c now needs to turn into
>> an array, plus we need a second percpu variable.  Given that if
>> CONFIG_NR_CPUS=8192 the array has 128 entries I think we can survive that.
> 
> Doing something in #DF needs percpu data?  What am I missing?

You need the second percpu variable in the espfix setup code so you have
both the write address and the target rsp (read address).

	-hpa


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