From mboxrd@z Thu Jan 1 00:00:00 1970 From: Olaf Hering Subject: [PATCH 03 of 10] xenpaging: mmap guest pages read-only Date: Mon, 30 Jan 2012 16:59:26 +0100 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: 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 1327937794 -3600 # Node ID dcf9cca8e1d5121782ea96dc183f52ff0cee2251 # Parent 55b2e9676a5a871833e6c57ec3b424c70f15af2b 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 55b2e9676a5a -r dcf9cca8e1d5 tools/xenpaging/xenpaging.c --- a/tools/xenpaging/xenpaging.c +++ b/tools/xenpaging/xenpaging.c @@ -585,7 +585,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);