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: "Jiang, Yunhong" <yunhong.jiang@xxxxxxxxx>, Tim Deegan <Tim.Deegan@xxxxxxxxxxxxx>, Gianluca Guida <Gianluca.Guida@xxxxxxxxxxxxx>
Subject: Re: [Xen-devel] Re: [PATCH]Add a flag for shadow pages
From: Keir Fraser <keir.fraser@xxxxxxxxxxxxx>
Date: Wed, 04 Mar 2009 11:57:15 +0000
Cc: "xen-devel@xxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxx>
Delivery-date: Wed, 04 Mar 2009 03:58:14 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <C5D400CD.4168%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>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Thread-index: AcmcpbnsO+Hd65wBRsq7KCOjKnHUNQAAtTT+AAANk1AAAH+w/wAABzXgAAEnI6UABDe9jw==
Thread-topic: [Xen-devel] Re: [PATCH]Add a flag for shadow pages
User-agent: Microsoft-Entourage/12.15.0.081119
On 04/03/2009 09:56, "Keir Fraser" <keir.fraser@xxxxxxxxxxxxx> wrote:

> Another would be to create a new function page_get_reference_and_owner()
> which obtains a reference on a guest page and *returns* the (now known
> valid) domain pointer. Probably this is nicer actually. Then all existing
> users of page_get_owner() need checking to ensure they don't need to use the
> new more expensive function -- I think some are probably actually unsafe now
> that shadow pages clobber the domain field.

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.

 -- Keir



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