summaryrefslogtreecommitdiffstats
path: root/arch/x86/kvm/vmx/pmu_intel.c
diff options
context:
space:
mode:
authorSean Christopherson <seanjc@google.com>2021-01-13 12:45:15 -0800
committerPaolo Bonzini <pbonzini@redhat.com>2021-01-25 18:52:06 -0500
commiteb79cd00ce25974c21f34f1eeb92a580ff572971 (patch)
tree49e1ba395906d96346e471dd430d76d8fdd1a744 /arch/x86/kvm/vmx/pmu_intel.c
parenta10f373ad3c760dd40b41e2f69a800ee7b8da15e (diff)
downloadlinux-eb79cd00ce25974c21f34f1eeb92a580ff572971.tar.bz2
KVM: x86: Add more protection against undefined behavior in rsvd_bits()
Add compile-time asserts in rsvd_bits() to guard against KVM passing in garbage hardcoded values, and cap the upper bound at '63' for dynamic values to prevent generating a mask that would overflow a u64. Suggested-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Sean Christopherson <seanjc@google.com> Message-Id: <20210113204515.3473079-1-seanjc@google.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'arch/x86/kvm/vmx/pmu_intel.c')
0 files changed, 0 insertions, 0 deletions