[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <717a1b5d-1bf3-5f72-147a-faccd4611b87@redhat.com>
Date: Thu, 9 Jul 2020 20:31:36 +0200
From: Paolo Bonzini <pbonzini@...hat.com>
To: Jim Mattson <jmattson@...gle.com>
Cc: LKML <linux-kernel@...r.kernel.org>,
kvm list <kvm@...r.kernel.org>,
Maxim Levitsky <mlevitsk@...hat.com>
Subject: Re: [PATCH] KVM: nSVM: vmentry ignores EFER.LMA and possibly
RFLAGS.VM
On 09/07/20 20:28, Jim Mattson wrote:
>> That said, the VMCB here is guest memory and it can change under our
>> feet between nested_vmcb_checks and nested_prepare_vmcb_save. Copying
>> the whole save area is overkill, but we probably should copy at least
>> EFER/CR0/CR3/CR4 in a struct at the beginning of nested_svm_vmrun; this
>> way there'd be no TOC/TOU issues between nested_vmcb_checks and
>> nested_svm_vmrun. This would also make it easier to reuse the checks in
>> svm_set_nested_state. Maybe Maxim can look at it while I'm on vacation,
>> as he's eager to do more nSVM stuff. :D
>
> I fear that nested SVM is rife with TOCTTOU issues.
I am pretty sure about that, actually. :)
Another possibility to stomp them in a more efficient manner could be to
rely on the dirty flags, and use them to set up an in-memory copy of the
VMCB.
Paolo
Powered by blists - more mailing lists