Re: [PATCH][next][V2] selftests: kvm: fix shift of 32 bit unsigned int more than 32 bits

From: Sean Christopherson
Date: Tue Jun 04 2024 - 19:29:59 EST


On Thu, 23 May 2024 16:41:02 +0100, Colin Ian King wrote:
> Currrentl a 32 bit 1u value is being shifted more than 32 bits causing
> overflow and incorrect checking of bits 32-63. Fix this by using the
> BIT_ULL macro for shifting bits.
>
> Detected by cppcheck:
> sev_init2_tests.c:108:34: error: Shifting 32-bit value by 63 bits is
> undefined behaviour [shiftTooManyBits]
>
> [...]

Applied to kvm-x86 fixes, thanks!

[1/1] selftests: kvm: fix shift of 32 bit unsigned int more than 32 bits
https://github.com/kvm-x86/linux/commit/9a68cefe9f05

--
https://github.com/kvm-x86/linux/tree/next