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

Re: [Xen-devel] [PATCH v8 12/14] tools/libxl: handle the iomem parameter with the memory_mapping hcall



On Sun, 2014-05-25 at 18:04 +0100, Julien Grall wrote:
> Hi Arianna,
> 
> On 25/05/14 11:51, Arianna Avanzini wrote:
> > diff --git a/tools/libxc/xc_domain.c b/tools/libxc/xc_domain.c
> > index 369c3f3..14f9880 100644
> > --- a/tools/libxc/xc_domain.c
> > +++ b/tools/libxc/xc_domain.c
> > @@ -1650,6 +1650,18 @@ int xc_domain_memory_mapping(
> >       uint32_t add_mapping)
> >   {
> >       DECLARE_DOMCTL;
> > +    xc_dominfo_t info;
> > +
> > +    if ( xc_domain_getinfo(xch, domid, 1, &info) != 1 )
> > +    {
> 
> You may retrieve the wrong domain here. xc_domain_getinfo return the 
> information of the first domain with an ID >= domid (see 
> XEN_DOMCTL_getdomaininfo in xen/common/domctl.c).

This made me notice that the existing user of
xc_core_arch_auto_translated_physmap is just *before* the check for
info.domid == domid. Oops!

(it's safe/harmless, but silly...)

Ian.


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