WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

[Xen-devel] [PATCH] Make get_page_from_l1e refcount correctly on foreign

To: <xen-devel@xxxxxxxxxxxxxxxxxxx>
Subject: [Xen-devel] [PATCH] Make get_page_from_l1e refcount correctly on foreign pagetables.
From: Tim Deegan <Tim.Deegan@xxxxxxxxxx>
Date: Wed, 13 May 2009 17:07:25 +0100
Delivery-date: Wed, 13 May 2009 09:07:59 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mutt/1.5.17 (2007-11-01)
Hypercalls from dom0 can end up doing resyncs on HVM guests' out-of-sync
shadow pagetables.  At that point the check against current->domain in 
get_page_from_l1e() triggers the typecount exemption for foreign mappings
and a writeable typecount gets lost. 

Make the foreign-domain check explicit by having get_page_from_l1e_for(),
which understands both the dom whose right are being used and the dom
whose pagetables are being updated.  Most callers of get_page_from_l1e() 
have both the same (instead of one hard-coded to current->domain as before).

Analysis and fix from David Lively.

Signed-off-by: Tim Deegan <Tim.Deegan@xxxxxxxxxx>

Attachment: get-page-from-l1e-refcounts
Description: Text document

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