From 62530296c71a6572e6ae82ffe3a309ab6540d53a Mon Sep 17 00:00:00 2001 From: Olaf Hering Date: Tue, 11 Oct 2011 10:46:28 +0100 Subject: xenpaging: clear page content after evict If the guest happens to read from the gfn while xenpaging is in the process of evicting the page, the guest may read zeros instead of actual data. Also if eviction fails the page content will be corrupted and xenpaging wont attempt to restore the page. Remove page scrubbing from pager and do it after successful eviction. Signed-off-by: Olaf Hering Acked-by: Ian Jackson Acked-by: Tim Deegan Committed-by: Tim Deegan --- tools/xenpaging/xenpaging.c | 3 --- 1 file changed, 3 deletions(-) (limited to 'tools/xenpaging') diff --git a/tools/xenpaging/xenpaging.c b/tools/xenpaging/xenpaging.c index e2cbc614d0..1ab756efb2 100644 --- a/tools/xenpaging/xenpaging.c +++ b/tools/xenpaging/xenpaging.c @@ -455,9 +455,6 @@ static int xenpaging_evict_page(xenpaging_t *paging, goto out; } - /* Clear page */ - memset(page, 0, PAGE_SIZE); - munmap(page, PAGE_SIZE); /* Tell Xen to evict page */ -- cgit v1.2.3