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] Re: [PATCH]Add a flag for shadow pages

To: Keir Fraser <Keir.Fraser@xxxxxxxxxxxxx>
Subject: Re: [Xen-devel] Re: [PATCH]Add a flag for shadow pages
From: Tim Deegan <Tim.Deegan@xxxxxxxxxx>
Date: Wed, 4 Mar 2009 12:13:17 +0000
Cc: Gianluca Guida <Gianluca.Guida@xxxxxxxxxxxxx>, "Jiang, Yunhong" <yunhong.jiang@xxxxxxxxx>, "xen-devel@xxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxx>
Delivery-date: Wed, 04 Mar 2009 04:13:46 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <C5D41D1B.3BD5%keir.fraser@xxxxxxxxxxxxx>
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>
References: <C5D400CD.4168%keir.fraser@xxxxxxxxxxxxx> <C5D41D1B.3BD5%keir.fraser@xxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mutt/1.5.17 (2007-11-01)
At 11:57 +0000 on 04 Mar (1236167835), Keir Fraser wrote:
> I'm working on this by the way. I'll clean up everything except shadow uses
> of page_get_owner(). The only two possibly suspect uses I can see (most are
> just ASSERT/BUG_ON uses I think are okay):
>  * sh_mfn_is_a_pagetable()
>  * shadow_get_page_from_l1e()
> 
> It'd be good if Tim or Gianluca would check whether these need to be more
> careful -- could page_get_owner() return a duff non-NULL value in either of
> these functions? This could only happen if the pages they work on could
> possibly actually be shadow pages with clobbered page owner field.

shadow_get_page_from_l1e() should never be handling a pointer to a
shadow -- if it does that then we've let the guest see the shadows and
all invariants go out the window. 

sh_mfn_is_a_pagetable() looks OK too; it only gets called based on the
contents of shadow PTEs or the MFNs that guests are writing to, both of
which should be safe.

It all feels a bit fragile to me though, compared to the old layout
where we always knew the owner field would be NULL.

Cheers,

Tim.

-- 
Tim Deegan <Tim.Deegan@xxxxxxxxxx>
Principal Software Engineer, Citrix Systems (R&D) Ltd.
[Company #02300071, SL9 0DZ, UK.]

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