[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-devel] Re: [PATCH]Add a flag for shadow pages



On 04/03/2009 09:28, "Jiang, Yunhong" <yunhong.jiang@xxxxxxxxx> wrote:

> Keir Fraser <mailto:keir.fraser@xxxxxxxxxxxxx> wrote:
>> I just realised that. You use get_page() to lock down a page's owner.
>> Otherwise it can change under your feet anyway. You don't need
> 
> With get_page_owner() in get_page() will cause fault if it is a shadow page.
> Or you mean use exception table to protect it?

There are a few solutions. One would be to remove the debug printk from
get_page() since it is the only thing which dereferences the bogus 'domain
pointer'.

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.

 -- Keir



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


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.