From: Ian Campbell Subject: Re: [PATCH V4 01/24] xl / libxl: push parsing of SSID and CPU pool ID down to libxl Date: Wed, 7 May 2014 10:50:58 +0100 Message-ID: <1399456258.3014.232.camel@kazak.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> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <20140506130317.GE17067@zion.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: Wei Liu Cc: Daniel De Graaf , Dario Faggioli , ian.jackson@eu.citrix.com, Juergen Gross , xen-devel@lists.xen.org List-Id: xen-devel@lists.xenproject.org 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? 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.