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

Re: [Xen-devel] [PATCH] Make get_page_from_l1e refcount correctly on for

To: Tim Deegan <Tim.Deegan@xxxxxxxxxx>, "xen-devel@xxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxx>
Subject: Re: [Xen-devel] [PATCH] Make get_page_from_l1e refcount correctly on foreign pagetables.
From: Keir Fraser <keir.fraser@xxxxxxxxxxxxx>
Date: Thu, 14 May 2009 10:17:07 +0100
Cc:
Delivery-date: Thu, 14 May 2009 02:17:58 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <20090513160725.GH12377@xxxxxxxxxxxxxxxxxxxxx>
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
Thread-index: AcnT5PznmSI1z4A4StaFrN1+RrXQgwAj8O9w
Thread-topic: [Xen-devel] [PATCH] Make get_page_from_l1e refcount correctly on foreign pagetables.
User-agent: Microsoft-Entourage/12.17.0.090302
On 13/05/2009 17:07, "Tim Deegan" <Tim.Deegan@xxxxxxxxxx> wrote:

> 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).

The patch doesn't apply to unstable/3.4. Further, the usage of domain
pointers in get_page_from_l1e_for() is now pretty insane -- we have 'd',
'target', 'owner', and still a couple of references to 'current->domain'.
Can we rename some of these, and/or remove redundant variables, and/or add a
function comment explaining what is going on therein, and be really sure
this won't bite us if we check it in so close to 3.4.0? I'm certainly
nervous about it.

 -- Keir



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