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

Re: [XEN PATCH for-4.14] tools/xen-ucode: fix error code propagation of microcode load operation



Igor Druzhinin writes ("Re: [XEN PATCH for-4.14] tools/xen-ucode: fix error 
code propagation of microcode load operation"):
> On 12/06/2020 17:53, Ian Jackson wrote:
> > Unfortunately I don't think this is right.  errno might not fit into a
> > return value.
> 
> errno codes that Xen return are all lower than 127. It fits perfectly fine.

I don't think this is a stable aspect of Xen's ABI, is it ?  And of
course what you get from libxc is not a Xen errno in Xen encoding, but
a Xen errno in host errno encoding, whioch might be >=127 even if the
Xen number for the same EFOOBAR is <=127.

But anyway, if this is controversial I will drop it.

> Probably but that is identical to what was suggested.
> Cleaning resource is just a nice thing to do although unnecessary.
> Can change to just "return errno" if that's what you'd prefer.

Yes please.

Would you care to at least arrange for bad usage to exit nonzero ?
I will leave it up to you to resolve this quandry: your view is that
this program's exit status is a Xen errno value (in host encoding,
presumably, although you don't state this) but now you need to return
an error that didn't come from Xen.

Ian.



 


Rackspace

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