aboutsummaryrefslogtreecommitdiffstats
path: root/tools/xenpaging
diff options
context:
space:
mode:
authorOlaf Hering <olaf@aepfle.de>2011-10-11 10:46:28 +0100
committerOlaf Hering <olaf@aepfle.de>2011-10-11 10:46:28 +0100
commit62530296c71a6572e6ae82ffe3a309ab6540d53a (patch)
treef808259a3e3d6dbd8c3734c1c49403567ecb3970 /tools/xenpaging
parent080559d289bb3410a148b4cb4a0a4adbdcdf9540 (diff)
downloadxen-62530296c71a6572e6ae82ffe3a309ab6540d53a.tar.gz
xen-62530296c71a6572e6ae82ffe3a309ab6540d53a.tar.bz2
xen-62530296c71a6572e6ae82ffe3a309ab6540d53a.zip
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 <olaf@aepfle.de> Acked-by: Ian Jackson <ian.jackson@eu.citrix.com> Acked-by: Tim Deegan <tim@xen.org> Committed-by: Tim Deegan <tim@xen.org>
Diffstat (limited to 'tools/xenpaging')
-rw-r--r--tools/xenpaging/xenpaging.c3
1 files changed, 0 insertions, 3 deletions
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 */