diff options
author | Sean Christopherson | 2021-01-13 12:45:15 -0800 |
---|---|---|
committer | Paolo Bonzini | 2021-01-25 18:52:06 -0500 |
commit | eb79cd00ce25974c21f34f1eeb92a580ff572971 (patch) | |
tree | 49e1ba395906d96346e471dd430d76d8fdd1a744 /arch/nds32/Kconfig.cpu | |
parent | a10f373ad3c760dd40b41e2f69a800ee7b8da15e (diff) |
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/nds32/Kconfig.cpu')
0 files changed, 0 insertions, 0 deletions