[MODERATED] Re: LVI

Andi Kleen <[email protected]> Tue, 26 Nov 2019 10:28:52 -0800
Newsgroups org.kernel.lore.historical-speck
Message-ID <[email protected]>
> Don't you need only half of a Spectrev1 gadget (see the Xen advisory at
> https://xenbits.xen.org/xsa/advisory-289.html and the KVM patch at
> https://marc.info/?l=kvm&m=157444806904659&w=2)?  

You need the universal read gadget at least, which is the primary thing
a Spectre v1 audit is looking for. My understanding is for the kernel
cases it was all the same locations.

> Also I assume you didn't take into account using vmexits as an assist.

Yes that was missing from the write up, thanks. 

For vmexit assists there are two cases:

- The CPU is not MDS_NO (e.g. pre CLX) and is vulnerable to L1TF:
In this case the L1TF mitigations (L1 cache clear and/or core scheduling)
are sufficient to avoid an attacker in a guest ever seeing any side effects

- The CPU is MDS_NO (e.g. CLX): LVI can only inject 0 values, which
are not considered a security risk for normal operation.

So no extra changes needed for vmexits.

-Andi