Re: [PATCH] KVM: x86/pmu: Fix type length error when reading pmu->fixed_ctr_ctrl

From: Sean Christopherson
Date: Fri Feb 02 2024 - 19:14:20 EST


On Tue, 23 Jan 2024 22:12:20 +0000, Mingwei Zhang wrote:
> Fix type length error since pmu->fixed_ctr_ctrl is u64 but the local
> variable old_fixed_ctr_ctrl is u8. Truncating the value leads to
> information loss at runtime. This leads to incorrect value in old_ctrl
> retrieved from each field of old_fixed_ctr_ctrl and causes incorrect code
> execution within the for loop of reprogram_fixed_counters(). So fix this
> type to u64.
>
> [...]

Applied to kvm-x86 fixes. I'll let it stew in -next for a few days before
sending a pull request to Paolo. Thanks!

[1/1] KVM: x86/pmu: Fix type length error when reading pmu->fixed_ctr_ctrl
https://github.com/kvm-x86/linux/commit/05519c86d699

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