Return-Path: Received: from mail.linutronix.de (146.0.238.70:993) by crypto-ml.lab.linutronix.de with IMAP4-SSL for ; 04 Jul 2018 14:52:06 -0000 Received: from mx2.suse.de ([195.135.220.15] helo=mx1.suse.de) by Galois.linutronix.de with esmtps (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1faj8V-0000br-Rn for speck@linutronix.de; Wed, 04 Jul 2018 16:52:05 +0200 Received: from relay1.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id 4C98EAF49 for ; Wed, 4 Jul 2018 14:51:58 +0000 (UTC) Subject: [MODERATED] Re: ***UNCHECKED*** Re: KVM L1TF options References: <47ec967f-ae94-cb68-65ce-64d4aaf14609@suse.de> <410bdf58-c1c8-1513-3adc-f7b1890fa0ed@redhat.com> From: Alexander Graf Message-ID: <8f7d325a-e306-53b2-98a3-5d4964ffd0d9@suse.de> Date: Wed, 4 Jul 2018 16:51:56 +0200 MIME-Version: 1.0 In-Reply-To: Content-Type: multipart/mixed; boundary="VU9j5zkCLiLzqBCf1tKbPvukOrocMIISW"; protected-headers="v1" To: speck@linutronix.de List-ID: This is an OpenPGP/MIME encrypted message (RFC 4880 and 3156) --VU9j5zkCLiLzqBCf1tKbPvukOrocMIISW Content-Type: text/plain; charset=windows-1252 Content-Language: en-US Content-Transfer-Encoding: quoted-printable On 04.07.18 16:33, speck for Jiri Kosina wrote: > On Tue, 3 Jul 2018, speck for Paolo Bonzini wrote: >=20 >> I think it's possible indeed to do the WP lazily, because you get=20 >> vmexits for both CR3 load and INVLPG which are the only events that=20 >> invalidate the TLB. >=20 > I am still having issues understanding the concept here. >=20 > What prevents malicious guest from *not* doing invlpg after tinkering w= ith=20 > !present PTE? >=20 > Sure, it'll eventually lead to memory corruption in the guest, but woul= d=20 > still allow it for exploiting L1TF, no? How so? The guest will never have the ability to write to anything that goes into cr3. It only has access to its own copy of page tables, never the ones that hardware uses. Alex --VU9j5zkCLiLzqBCf1tKbPvukOrocMIISW--