[PATCH v2 0/4] KVM: Reject vCPU IDs above 2^32

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



vCPU IDs above 2^32 are currently not rejected as invalid for
KVM_CREATE_VCPU and KVM_SET_BOOT_CPU_ID.

Below patches fix this and add selftests for it.

Please apply!

Thanks,
Mathias

v1: https://lore.kernel.org/kvm/20240605220504.2941958-1-minipli@xxxxxxxxxxxxxx/

changes v1->v2:
- add comment and build bug to make truncation check more obvious (Sean)
- handle KVM_SET_BOOT_CPU_ID similar

Mathias Krause (4):
  KVM: Reject overly excessive IDs in KVM_CREATE_VCPU
  KVM: selftests: Test vCPU IDs above 2^32
  KVM: Limit check IDs for KVM_SET_BOOT_CPU_ID
  KVM: selftests: Test vCPU boot IDs above 2^32

 arch/x86/kvm/x86.c                                   | 12 +++++++++---
 .../selftests/kvm/x86_64/max_vcpuid_cap_test.c       | 11 ++++++++++-
 tools/testing/selftests/kvm/x86_64/set_boot_cpu_id.c | 11 +++++++++++
 virt/kvm/kvm_main.c                                  | 10 +++++++++-
 4 files changed, 39 insertions(+), 5 deletions(-)

-- 
2.30.2





[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux