From mboxrd@z Thu Jan 1 00:00:00 1970 From: Keir Fraser Subject: Re: Re: [PATCH]Add a flag for shadow pages Date: Wed, 04 Mar 2009 13:19:17 +0000 Message-ID: References: <20090304121317.GB6322@york.uk.xensource.com> Mime-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <20090304121317.GB6322@york.uk.xensource.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Tim Deegan Cc: Gianluca Guida , "Jiang, Yunhong" , "xen-devel@lists.xensource.com" List-Id: xen-devel@lists.xenproject.org On 04/03/2009 12:13, "Tim Deegan" wrote: > 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. This is the tradeoff for the new get_page() implementation and wider reference counts. We just need to be careful and use page_get_owner_and_reference() in the few cases it seems to be needed. -- Keir