KVM: x86: SGX must obey the KVM_INTERNAL_ERROR_EMULATION protocol
authorDavid Edmondson <david.edmondson@oracle.com>
Mon, 20 Sep 2021 10:37:37 +0000 (11:37 +0100)
committerPaolo Bonzini <pbonzini@redhat.com>
Mon, 25 Oct 2021 10:48:25 +0000 (06:48 -0400)
commit0d7d84498fb43c42fa730c3a46b3048dc62165a5
treee20e0e5b7893a4e7c592e0ee28408acc94467b88
parente615e355894e619785af81479ad6f5a05a8a2e3f
KVM: x86: SGX must obey the KVM_INTERNAL_ERROR_EMULATION protocol

When passing the failing address and size out to user space, SGX must
ensure not to trample on the earlier fields of the emulation_failure
sub-union of struct kvm_run.

Signed-off-by: David Edmondson <david.edmondson@oracle.com>
Reviewed-by: Sean Christopherson <seanjc@google.com>
Message-Id: <20210920103737.2696756-5-david.edmondson@oracle.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
arch/x86/kvm/vmx/sgx.c