Skip to content
Commit 4710e4fc authored by Christophe JAILLET's avatar Christophe JAILLET Committed by Sean Christopherson
Browse files

KVM: SVM: Remove a useless zeroing of allocated memory



Remove KVM's unnecessary zeroing of memory when allocating the pages array
in sev_pin_memory() via __vmalloc(), as the array is only used to hold
kernel pointers.  The kmalloc() path for "small" regions doesn't zero the
array, and if KVM leaks state and/or accesses uninitialized data, then the
kernel has bigger problems.

Signed-off-by: default avatarChristophe JAILLET <christophe.jaillet@wanadoo.fr>
Link: https://lore.kernel.org/r/c7619a3d3cbb36463531a7c73ccbde9db587986c.1710004509.git.christophe.jaillet@wanadoo.fr


[sean: massage changelog]
Signed-off-by: default avatarSean Christopherson <seanjc@google.com>
parent fec50db7
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment