[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <ZfChEaiQ29qYzFaq@google.com>
Date: Tue, 12 Mar 2024 11:38:09 -0700
From: Sean Christopherson <seanjc@...gle.com>
To: Christophe JAILLET <christophe.jaillet@...adoo.fr>
Cc: 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>, linux-kernel@...r.kernel.org,
kernel-janitors@...r.kernel.org, kvm@...r.kernel.org
Subject: Re: [PATCH] KVM: SVM: Remove a useless zeroing of allocated memory
On Sat, Mar 09, 2024, Christophe JAILLET wrote:
> Depending of the memory size needed, we clear or not the allocated memory.
> This is not consistent.
>
> So remove the zeroing of the memory in the __vmalloc() case.
>
> Signed-off-by: Christophe JAILLET <christophe.jaillet@...adoo.fr>
> ---
> This is just a guess.
>
> I don't know this code at all, but because of KVM, it is maybe safer to
> clear the memory in both cases?
> So, maybe it is better to use kzalloc() in the other path.
Not zeroing should be totally fine, the array is only used to hold kernel pointers,
if KVM leaks that state and/or accesses uninitialized data, we have bigger problems :-)
Powered by blists - more mailing lists