[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <170743804541.201306.3426133149771301470.b4-ty@google.com>
Date: Thu, 8 Feb 2024 16:22:45 -0800
From: Sean Christopherson <seanjc@...gle.com>
To: Sean Christopherson <seanjc@...gle.com>, Paolo Bonzini <pbonzini@...hat.com>,
Thomas Gleixner <tglx@...utronix.de>, Ingo Molnar <mingo@...hat.com>, Borislav Petkov <bp@...en8.de>,
Dave Hansen <dave.hansen@...ux.intel.com>, x86@...nel.org,
"H. Peter Anvin" <hpa@...or.com>, Julian Stecklina <julian.stecklina@...erus-technology.de>
Cc: kvm@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2 1/2] KVM: x86: Fix partially uninitialized integer in emulate_pop
On Mon, 09 Oct 2023 11:20:53 +0200, Julian Stecklina wrote:
> Most code gives a pointer to an uninitialized unsigned long as dest in
> emulate_pop. len is usually the word width of the guest.
>
> If the guest runs in 16-bit or 32-bit modes, len will not cover the
> whole unsigned long and we end up with uninitialized data in dest.
>
> Looking through the callers of this function, the issue seems
> harmless, but given that none of this is performance critical, there
> should be no issue with just always initializing the whole value.
>
> [...]
Applied to kvm-x86 misc. I massaged the changelog to make it clear that
uninitialized tweaks aren't actually a fix. I also omitted the change from
a u32=>unsigned long. The odds of someone copy+pasting em_popa() are lower
than the odds of an unnecessary size change causing some goofy error.
[1/2] KVM: x86: Clean up partially uninitialized integer in emulate_pop()
https://github.com/kvm-x86/linux/commit/6fd1e3963f20
[2/2] KVM: x86: rename push to emulate_push for consistency
https://github.com/kvm-x86/linux/commit/64435aaa4a6a
--
https://github.com/kvm-x86/linux/tree/next
Powered by blists - more mailing lists