From: Olaf Hering Subject: [PATCH] xenpaging: mmap guest pages read-only Date: Wed, 11 Jan 2012 14:56:18 +0100 Message-ID: Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: xen-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org # HG changeset patch # User Olaf Hering # 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 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);