Re: [PATCH] KVM: selftests: Fix signedness issue with vCPU mmap size check
From: Sean Christopherson
Date: Tue Aug 19 2025 - 19:19:48 EST
On Fri, 11 Jul 2025 00:17:42 +0000, James Houghton wrote:
> Check that the return value of KVM_GET_VCPU_MMAP_SIZE is non-negative
> before comparing with sizeof(vcpu_run). If KVM_GET_VCPU_MMAP_SIZE fails,
> it will return -1, and `-1 > sizeof(vcpu_run)` is true, so the ASSERT
> passes.
>
> There are no other locations in tools/testing/selftests/kvm that make
> the same mistake.
>
> [...]
Applied to kvm-x86 selftests, thanks!
[1/1] KVM: selftests: Fix signedness issue with vCPU mmap size check
https://github.com/kvm-x86/linux/commit/a585b8761451
--
https://github.com/kvm-x86/linux/tree/next