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

Re: [Xen-devel] [PATCH] libxc: fix HVM core dump



On Wed, Mar 20, 2019 at 01:49:30PM +0000, Ian Jackson wrote:
> Wei Liu writes ("[PATCH] libxc: fix HVM core dump"):
> > f969bc9fc96 forbid get_address_size call on HVM guests, because that
> > didn't make sense. It broke core dump functionality on HVM because
> > libxc unconditionally asked for guest width.
> ...
> > +    if ( !auto_translated_physmap &&
> > +         xc_domain_get_guest_width(xch, domid, &dinfo->guest_width) != 0 )
> > +    {
> > +        PERROR("Could not get address size for domain");
> > +        goto out;
> > +    }
> 
> Did you consider and reject the option of writing:
> 
>     if ( auto_translated_physmap ) {
>          ... xc_domain_get_guest_width(,,&dinfo->guest_width,,) ...
>     } else {
>          dinfo->guest_width = sizeof(unsigned long)
>     }
> 
> This is perhaps less likely to leave dinfo->guest_width as an
> uninitialised hazard.

Works for me too.

Wei.

> 
> Ian.

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/xen-devel

 


Rackspace

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