Skip to contentSkip to conversation

scrub pages when balloon frees them

RFC PATCH In review Stefan Berger 2 participants 2 messages Apr 2, 2008

lore
Share & tools
lore
#0 lore raw

RFC PATCH 1/1 scrub pages when balloon frees them

When a domain is killed, all its memory pages are cleared. However, I looked at the code path that is run when a domain releases memory from the balloon and could not find code that would scrub these pages. So I added this line, but I am wondering whether previously it was forgotten or not done due to some other reason?

xen/common/page_alloc.c +1 -0
diff -r b64be2bc7a91 xen/common/page_alloc.c
@@ -455,6 +455,7 @@ static void free_heap_pages(
         {
             cpus_clear(pg[i].u.free.cpumask);
         }
+        scrub_page(page_to_virt(&pg[i]));
     }
 
     spin_lock(&heap_lock);

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel

#1 lore raw

The domain is responsible for scrubbing its own secrets while it is alive.

-- Keir

Quoted 8 lines · Stefan Berger

When a domain is killed, all its memory pages are cleared. However, I looked at the code path that is run when a domain releases memory from the balloon and could not find code that would scrub these pages. So I added this line, but I am wondering whether previously it was forgotten or not done due to some other reason?