From: Wei Liu Subject: Re: [PATCH V4 01/24] xl / libxl: push parsing of SSID and CPU pool ID down to libxl Date: Wed, 7 May 2014 11:30:22 +0100 Message-ID: <20140507103022.GB17067@zion.uk.xensource.com> References: <1398949101-23320-1-git-send-email-wei.liu2@citrix.com> <1398949101-23320-2-git-send-email-wei.liu2@citrix.com> <1399380330.3014.113.camel@kazak.uk.xensource.com> <20140506130317.GE17067@zion.uk.xensource.com> <1399456258.3014.232.camel@kazak.uk.xensource.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Content-Disposition: inline In-Reply-To: <1399456258.3014.232.camel@kazak.uk.xensource.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Ian Campbell Cc: Wei Liu , Dario Faggioli , ian.jackson@eu.citrix.com, xen-devel@lists.xen.org, Daniel De Graaf , Juergen Gross List-Id: xen-devel@lists.xenproject.org On Wed, May 07, 2014 at 10:50:58AM +0100, Ian Campbell wrote: > On Tue, 2014-05-06 at 14:03 +0100, Wei Liu wrote: > > > > + size_t size; > > > > + > > > > memcpy(&(xlinfo->uuid), xcinfo->handle, sizeof(xen_domain_handle_t)); > > > > xlinfo->domid = xcinfo->domain; > > > > xlinfo->ssidref = xcinfo->ssidref; > > > > + if (libxl_flask_sid_to_context(ctx, xlinfo->ssidref, > > > > + &xlinfo->ssid_label, &size) < 0) > > > > + xlinfo->ssid_label = NULL; > > > > > > Is this a critical error? > > > > > > > I'm not very sure about this. My thought was that not displaying the > > name of the label is not critical, but on the other hand you can argue > > that showing incorrect information is just wrong... > > Isn't this used when roundtripping things through the JSON though -- > i.e. lookup the name and then reparse on the other end? If you fail to > do the lookup -> boom? > No. This is only used for showing information, not for domain creation. So it seems less critical to me. Wei. > Are there circumstances where it is expected that it isn't possible to > translate an ssid ref back to a name? Perhaps if it has been deleted > since the guest was created? If there isn't such a possibility then that > would argue for it being an error. (Maybe this is one for Daniel) > > Ian.