[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-devel] [PATCH] xenpaging: mmap guest pages read-only


  • To: xen-devel@xxxxxxxxxxxxxxxxxxx
  • From: Olaf Hering <olaf@xxxxxxxxx>
  • Date: Wed, 11 Jan 2012 14:56:18 +0100
  • Delivery-date: Wed, 11 Jan 2012 13:57:11 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xensource.com>

# HG changeset patch
# User Olaf Hering <olaf@xxxxxxxxx>
# Date 1326290155 -3600
# Node ID ce095edc4f970b7b1bd6fa223137fc84607b2654
# Parent  17b173dbf8663f44790355b2503cb91f9788b84d
xenpaging: mmap guest pages read-only

xenpaging does not write to the gfn, so map the gfn to page-out in
read-only mode.

Signed-off-by: Olaf Hering <olaf@xxxxxxxxx>

diff -r 17b173dbf866 -r ce095edc4f97 tools/xenpaging/xenpaging.c
--- a/tools/xenpaging/xenpaging.c
+++ b/tools/xenpaging/xenpaging.c
@@ -584,7 +584,7 @@ static int xenpaging_evict_page(struct x
 
     /* Map page */
     ret = -EFAULT;
-    page = xc_map_foreign_pages(xch, paging->mem_event.domain_id, PROT_READ | 
PROT_WRITE, &victim, 1);
+    page = xc_map_foreign_pages(xch, paging->mem_event.domain_id, PROT_READ, 
&victim, 1);
     if ( page == NULL )
     {
         PERROR("Error mapping page %lx", gfn);

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.