|
|
|
|
|
|
|
|
|
|
xen-changelog
[Xen-changelog] [xen-unstable] PoD: Scrub pages before adding to the cac
# HG changeset patch
# User Keir Fraser <keir.fraser@xxxxxxxxxx>
# Date 1253002116 -3600
# Node ID 3deb2bd7aade3aa65904a4f5cd8f405de7a1231b
# Parent d20260bece2d9da7a2a46936661fa9c8bf2c509c
PoD: Scrub pages before adding to the cache
Neither memory from the allocator nor memory from
the balloon driver is guaranteed to be zero. Scrub it
before adding to the cache.
Signed-off-by: George Dunlap <george.dunlap@xxxxxxxxxxxxx>
---
xen/arch/x86/mm/p2m.c | 11 +++++++++++
1 files changed, 11 insertions(+)
diff -r d20260bece2d -r 3deb2bd7aade xen/arch/x86/mm/p2m.c
--- a/xen/arch/x86/mm/p2m.c Tue Sep 15 09:06:46 2009 +0100
+++ b/xen/arch/x86/mm/p2m.c Tue Sep 15 09:08:36 2009 +0100
@@ -306,6 +306,17 @@ p2m_pod_cache_add(struct domain *d,
}
}
#endif
+
+ /* Pages from domain_alloc and returned by the balloon driver aren't
+ * guaranteed to be zero; but by reclaiming zero pages, we implicitly
promise
+ * to provide zero pages. So we scrub pages before using */
+ for ( i=0; i< 1 << order ; i++)
+ {
+ char * b;
+ b = map_domain_page(page_to_mfn(page) + i);
+ clear_page(b);
+ unmap_domain_page(b);
+ }
spin_lock(&d->page_alloc_lock);
_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog
|
<Prev in Thread] |
Current Thread |
[Next in Thread> |
- [Xen-changelog] [xen-unstable] PoD: Scrub pages before adding to the cache,
Xen patchbot-unstable <=
|
|
|
|
|