OSDN Git Service

KVM: emulator: more strict rsm checks.
authorMaxim Levitsky <mlevitsk@redhat.com>
Thu, 27 Aug 2020 17:11:44 +0000 (20:11 +0300)
committerPaolo Bonzini <pbonzini@redhat.com>
Sat, 12 Sep 2020 16:22:55 +0000 (12:22 -0400)
commit37f66bbef0920429b8cb5eddba849ec4308a9f8e
tree67f132e53a670820276243ba7238aba555ae8484
parent3ebb5d2617fbf45567975f878232178c5b292d58
KVM: emulator: more strict rsm checks.

Don't ignore return values in rsm_load_state_64/32 to avoid
loading invalid state from SMM state area if it was tampered with
by the guest.

This is primarly intended to avoid letting guest set bits in EFER
(like EFER.SVME when nesting is disabled) by manipulating SMM save area.

Signed-off-by: Maxim Levitsky <mlevitsk@redhat.com>
Message-Id: <20200827171145.374620-8-mlevitsk@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
arch/x86/kvm/emulate.c