]> 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>
Sun, 20 Apr 2025 08:18:22 +0000 (10:18 +0200)
commitfc4ba91278e2bee8dabb5e0aac3c150abc07f51b
treed995890b50c7476bb588b87048a04d131153c1b4
parent81b290aa24490956310d98e2d8e84d53d1899786
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