linux-stable/arch/x86
Mingwei Zhang 6d10c8c5ab KVM: x86/pmu: Fix type length error when reading pmu->fixed_ctr_ctrl
commit 05519c86d6 upstream.

Use a u64 instead of a u8 when taking a snapshot of pmu->fixed_ctr_ctrl
when reprogramming fixed counters, as truncating the value results in KVM
thinking fixed counter 2 is already disabled (the bug also affects fixed
counters 3+, but KVM doesn't yet support those).  As a result, if the
guest disables fixed counter 2, KVM will get a false negative and fail to
reprogram/disable emulation of the counter, which can leads to incorrect
counts and spurious PMIs in the guest.

Fixes: 76d287b234 ("KVM: x86/pmu: Drop "u8 ctrl, int idx" for reprogram_fixed_counter()")
Cc: stable@vger.kernel.org
Signed-off-by: Mingwei Zhang <mizhang@google.com>
Link: https://lore.kernel.org/r/20240123221220.3911317-1-mizhang@google.com
[sean: rewrite changelog to call out the effects of the bug]
Signed-off-by: Sean Christopherson <seanjc@google.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-02-23 09:51:49 +01:00
..
boot x86/efistub: Use 1:1 file:memory mapping for PE/COFF .compat section 2024-02-16 19:14:22 +01:00
coco x86/tdx: Allow 32-bit emulation by default 2023-12-07 09:51:29 -08:00
configs hardening updates for v6.7-rc1 2023-10-30 19:09:55 -10:00
crypto crypto: x86/nhpoly1305 - implement ->digest 2023-10-20 13:39:25 +08:00
entry x86/entry: Do not allow external 0x80 interrupts 2023-12-07 09:51:29 -08:00
events perf/x86/intel/uncore: Fix NULL pointer dereference issue in upi_fill_topology() 2024-01-25 15:44:38 -08:00
hyperv hyperv-fixes for 6.7-rc3 2023-11-22 09:56:26 -08:00
ia32
include work around gcc bugs with 'asm goto' with outputs 2024-02-23 09:51:20 +01:00
kernel x86/fpu: Stop relying on userspace for info to fault in xsave buffer 2024-02-23 09:51:49 +01:00
kvm KVM: x86/pmu: Fix type length error when reading pmu->fixed_ctr_ctrl 2024-02-23 09:51:49 +01:00
lib x86/lib: Revert to _ASM_EXTABLE_UA() for {get,put}_user() fixups 2024-02-16 19:14:28 +01:00
math-emu
mm 12 hotfixes. 2 are cc:stable and the remainder either address post-6.7 2024-01-05 13:46:18 -08:00
net bpf: Fix prog_array_map_poke_run map poke update 2023-12-06 22:40:16 +01:00
pci x86/pci: Reserve ECAM if BIOS didn't include it in PNP0C02 _CRS 2024-01-25 15:45:16 -08:00
platform
power
purgatory
ras
realmode
tools
um UML: remove unused cmd_vdso_install 2023-10-18 17:16:09 +09:00
video
virt
xen xen: branch for v6.7-rc7 2023-12-22 08:37:48 -08:00
.gitignore
Kbuild
Kconfig kexec: fix KEXEC_FILE dependencies 2023-12-20 13:46:19 -08:00
Kconfig.assembler
Kconfig.cpu x86/Kconfig: Transmeta Crusoe is CPU family 5, not 6 2024-02-23 09:51:49 +01:00
Kconfig.debug
Makefile Kbuild updates for v6.7 2023-11-04 08:07:19 -10:00
Makefile.postlink kbuild: remove ARCH_POSTLINK from module builds 2023-10-28 21:10:08 +09:00
Makefile.um
Makefile_32.cpu