]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
KVM: x86: Explicitly zero-initialize on-stack CPUID unions
authorSean Christopherson <seanjc@google.com>
Sat, 15 Mar 2025 02:41:02 +0000 (19:41 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 25 Apr 2025 08:45:35 +0000 (10:45 +0200)
commit8cb249d56e63aebbfcfdc970e5f53f73a6435997
treef24a740a53aa07fd58a36540c7b2b1a82ef0d576
parent504464fd01dc10e7579eb849de39a5285e9360c7
KVM: x86: Explicitly zero-initialize on-stack CPUID unions

commit bc52ae0a708cb6fa3926d11c88e3c55e1171b4a1 upstream.

Explicitly zero/empty-initialize the unions used for PMU related CPUID
entries, instead of manually zeroing all fields (hopefully), or in the
case of 0x80000022, relying on the compiler to clobber the uninitialized
bitfields.

Signed-off-by: Sean Christopherson <seanjc@google.com>
Reviewed-by: Jim Mattson <jmattson@google.com>
Message-ID: <20250315024102.2361628-1-seanjc@google.com>
Cc: stable@vger.kernel.org
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
arch/x86/kvm/cpuid.c