]> git.baikalelectronics.ru Git - kernel.git/commit
KVM: nVMX: Fix size checks in vmx_set_nested_state
authorJim Mattson <jmattson@google.com>
Thu, 17 Jan 2019 19:55:58 +0000 (11:55 -0800)
committerPaolo Bonzini <pbonzini@redhat.com>
Tue, 30 Apr 2019 22:43:44 +0000 (00:43 +0200)
commit47d6fb4ed45a61d9ee854581c6e70683374ddc2e
tree1c9477e16bf77f84c60a6fd4da58eac069005e12
parent5e4679df963e22de11603070fbf67dfdfe77f110
KVM: nVMX: Fix size checks in vmx_set_nested_state

The size checks in vmx_nested_state are wrong because the calculations
are made based on the size of a pointer to a struct kvm_nested_state
rather than the size of a struct kvm_nested_state.

Reported-by: Felix Wilhelm <fwilhelm@google.com>
Signed-off-by: Jim Mattson <jmattson@google.com>
Reviewed-by: Drew Schmitt <dasch@google.com>
Reviewed-by: Marc Orr <marcorr@google.com>
Reviewed-by: Peter Shier <pshier@google.com>
Reviewed-by: Krish Sadhukhan <krish.sadhukhan@oracle.com>
Fixes: 1877921b6206427f6676139c30ed44fc07e5d8f9
Cc: stable@ver.kernel.org
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
arch/x86/kvm/vmx/nested.c