[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <176823878891.1368899.400639654569804512.b4-ty@google.com>
Date: Mon, 12 Jan 2026 09:38:48 -0800
From: Sean Christopherson <seanjc@...gle.com>
To: Sean Christopherson <seanjc@...gle.com>, pbonzini@...hat.com,
MJ Pooladkhay <mj@...ladkhay.com>
Cc: shuah@...nel.org, kvm@...r.kernel.org, linux-kselftest@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2] KVM: selftests: Fix sign extension bug in get_desc64_base()
On Mon, 22 Dec 2025 17:42:07 +0000, MJ Pooladkhay wrote:
> The function get_desc64_base() performs a series of bitwise left shifts on
> fields of various sizes. More specifically, when performing '<< 24' on
> 'desc->base2' (which is a u8), 'base2' is promoted to a signed integer
> before shifting.
>
> In a scenario where base2 >= 0x80, the shift places a 1 into bit 31,
> causing the 32-bit intermediate value to become negative. When this
> result is cast to uint64_t or ORed into the return value, sign extension
> occurs, corrupting the upper 32 bits of the address (base3).
>
> [...]
Applied to kvm-x86 selftests, thanks!
[1/1] KVM: selftests: Fix sign extension bug in get_desc64_base()
https://github.com/kvm-x86/linux/commit/7fe9f5366bd5
--
https://github.com/kvm-x86/linux/tree/next
Powered by blists - more mailing lists