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

Re: [Xen-devel] [PATCH] Make get_page_from_l1e refcount correctly onforeign pagetables.



>>> Tim Deegan <Tim.Deegan@xxxxxxxxxx> 13.05.09 18:07 >>>
>
>Hypercalls from dom0 can end up doing resyncs on HVM guests' out-of-sync
>shadow pagetables.  At that point the check against current->domain in 
>get_page_from_l1e() triggers the typecount exemption for foreign mappings
>and a writeable typecount gets lost. 
>
>Make the foreign-domain check explicit by having get_page_from_l1e_for(),
>which understands both the dom whose right are being used and the dom
>whose pagetables are being updated.  Most callers of get_page_from_l1e() 
>have both the same (instead of one hard-coded to current->domain as before).
>
>Analysis and fix from David Lively.

I have to admit that the change to mod_l1_entry() look suspicious to me -
as I understand it, the third parameter of get_page_from_l1e_for() represents
the target domain, and that's what FOREIGNDOM is to be used for.

Perhaps the whole thing gets more convoluted because of c/s 19383, which
added a vcpu parameter for no apparent reason (current is used for that
everywhere afaict).

Jan


_______________________________________________
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®.