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

Re: [Xen-devel] [PATCH v2 1/2] amd/passthrough: Do not leak domain mappings from do_invalidate_dte()



>>> On 04.12.13 at 17:44, Andrew Cooper <andrew.cooper3@xxxxxxxxxx> wrote:
> @@ -424,12 +424,14 @@ static int do_invalidate_dte(struct domain *d, 
> cmd_entry_t *cmd)
>                                          sizeof(dev_entry_t), gbdf);
>      ASSERT(mfn_valid(dte_mfn));
>  
> -    dte_base = map_domain_page(dte_mfn);
> -
> -    gdte = dte_base + gbdf % (PAGE_SIZE / sizeof(dev_entry_t));
> +    gdte = map_domain_page(dte_mfn) + gbdf % (PAGE_SIZE / 
> sizeof(dev_entry_t));

You would better have avoided the extra cleanup, as the arithmetic
now is different from what it was before (acting on void * now, i.e.
byte granular, instead of in dev_entry_t *).

Jan


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

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