Re: [PATCH] x86/kvm: clear RSB before VMENTER to obscure host addresses

From: Paolo Bonzini
Date: Mon Feb 05 2018 - 09:19:37 EST


On 02/02/2018 22:10, Dave Hansen wrote:
> I'm posting this because I went to the trouble of hacking it together
> and writing up a pretty lengthy description of what it does and where
> it _might_ have benefit. But, I'm rather unconvinced that mitigation
> of attacks on ASLR has a lot of value because of how many other
> attacks on ASLR there are.
>
> Thus, the RFC.

I'm a bit afraid that this would be pretty expensive for just an ASLR
attack.

The cost of stuffing the RSB once is about 60 clock cycles, and if you
do it twice we're spending 10-15% of vmexit time (for the low-latency
cases that matter) on RSB stuffing.

Paolo