From: Sean Christopherson <seanjc@google.com>
To: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Cc: Paolo Bonzini <pbonzini@redhat.com>,
Thomas Gleixner <tglx@linutronix.de>,
Ingo Molnar <mingo@redhat.com>, Borislav Petkov <bp@alien8.de>,
Dave Hansen <dave.hansen@linux.intel.com>,
x86@kernel.org, "H. Peter Anvin" <hpa@zytor.com>,
linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org,
kvm@vger.kernel.org
Subject: Re: [PATCH] KVM: SVM: Remove a useless zeroing of allocated memory
Date: Tue, 12 Mar 2024 11:38:09 -0700 [thread overview]
Message-ID: <ZfChEaiQ29qYzFaq@google.com> (raw)
In-Reply-To: <c7619a3d3cbb36463531a7c73ccbde9db587986c.1710004509.git.christophe.jaillet@wanadoo.fr>
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@wanadoo.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 :-)
next prev parent reply other threads:[~2024-03-12 18:38 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-03-09 17:15 [PATCH] KVM: SVM: Remove a useless zeroing of allocated memory Christophe JAILLET
2024-03-12 18:38 ` Sean Christopherson [this message]
2024-04-10 0:19 ` Sean Christopherson
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=ZfChEaiQ29qYzFaq@google.com \
--to=seanjc@google.com \
--cc=bp@alien8.de \
--cc=christophe.jaillet@wanadoo.fr \
--cc=dave.hansen@linux.intel.com \
--cc=hpa@zytor.com \
--cc=kernel-janitors@vger.kernel.org \
--cc=kvm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=pbonzini@redhat.com \
--cc=tglx@linutronix.de \
--cc=x86@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox