Commit 4b451a57 authored by Mathias Krause's avatar Mathias Krause Committed by Sean Christopherson
Browse files

KVM: selftests: Test max vCPU IDs corner cases



The KVM_CREATE_VCPU ioctl ABI had an implicit integer truncation bug,
allowing 2^32 aliases for a vCPU ID by setting the upper 32 bits of a 64
bit ioctl() argument.

It also allowed excluding a once set boot CPU ID.

Verify this no longer works and gets rejected with an error.

Signed-off-by: default avatarMathias Krause <minipli@grsecurity.net>
Link: https://lore.kernel.org/r/20240614202859.3597745-5-minipli@grsecurity.net


[sean: tweak assert message+comment for 63:32!=0 testcase]
Signed-off-by: default avatarSean Christopherson <seanjc@google.com>
parent d29bf2ca
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment