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] [HVM]A possible mov_to_cr3 bug

To: "Tian, Kevin" <kevin.tian@xxxxxxxxx>
Subject: Re: [Xen-devel] [HVM]A possible mov_to_cr3 bug
From: Tim Deegan <Tim.Deegan@xxxxxxxxxxxxx>
Date: Tue, 28 Nov 2006 09:43:26 +0000
Cc: xen-devel@xxxxxxxxxxxxxxxxxxx, "Jiang, Yunhong" <yunhong.jiang@xxxxxxxxx>
Delivery-date: Tue, 28 Nov 2006 01:43:31 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <D470B4E54465E3469E2ABBC5AFAC390F051449@xxxxxxxxxxxxxxxxxxxxxxxxxxxx>
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/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <D470B4E54465E3469E2ABBC5AFAC390F051449@xxxxxxxxxxxxxxxxxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mutt/1.5.13 (2006-08-11)
Hi, 

At 17:25 +0800 on 28 Nov (1164734703), Tian, Kevin wrote:
> However the logic within shadow_update_cr3() doesn't ensure this, 
> which will sh_put_ref old shadow. Normally l4 shadow page is pinned 
> and thus with refcount as 2. So above sh_put_ref doesn't free this 
> shadow page, and the original one will be re-chosed immediately.
> 
> This is the normal case, however it doesn't hold true once 
> shadow_prealloc is invoked before this update. 

Yes; that's a bug in sh_set_toplevel_shadow(), since we don't want to 
accidentally unshadow an entire process.  I've fixed it to take the ref
on the new contents before putting the ref on the old.

Thanks,

Tim.

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

<Prev in Thread] Current Thread [Next in Thread>