mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] KVM: Zero guest memory before use
@ 2006-11-30 12:35 Avi Kivity
  0 siblings, 0 replies; only message in thread
From: Avi Kivity @ 2006-11-30 12:35 UTC (permalink / raw)
  To: kvm-devel; +Cc: linux-kernel, mingo, akpm

This prevents an information leak from the host to the vmm and the guest.

Signed-off-by: Avi Kivity <avi@qumranet.com>

diff -X /home/avi/kvm/linux-2.6/Documentation/dontdiff --exclude=Makefile -ru /home/avi/kvm/linux-2.6/drivers/kvm/kvm_main.c /home/avi/kvm-release/kernel/kvm_main.c
--- linux-2.6/drivers/kvm/kvm_main.c	2006-11-30 10:59:57.000000000 +0200
+++ linux-2.6/drivers/kvm/kvm_main.c	2006-11-30 14:26:29.000000000 +0200
@@ -620,7 +620,8 @@
 
 		memset(new.phys_mem, 0, npages * sizeof(struct page *));
 		for (i = 0; i < npages; ++i) {
-			new.phys_mem[i] = alloc_page(GFP_HIGHUSER);
+			new.phys_mem[i] = alloc_page(GFP_HIGHUSER
+						     | __GFP_ZERO);
 			if (!new.phys_mem[i])
 				goto out_free;
 		}

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2006-11-30 12:35 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-11-30 12:35 [PATCH] KVM: Zero guest memory before use Avi Kivity

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®