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

Re: [PATCH] libxl: preserve errno in libxl__xcinfo2xlinfo()



On Wed, Aug 27, 2025 at 09:16:38PM -0400, Jason Andryuk wrote:
> On 2025-08-27 01:57, Jan Beulich wrote:
> > Callers observing errors elsewhere may be confused by the ENOSYS that
> > the Flask operation would yield on a Flask-disabled hypervisor.
> > 
> > Signed-off-by: Jan Beulich <jbeulich@xxxxxxxx>
> > ---
> > Of course I don't know whether clobbering errno is perhaps deemed "fine"
> > in libxl.
> 
> I wonder if it would be better to special case libxl_flask_sid_to_context()
> to preserve errno on ENOSYS.  flask returning ENOSYS is common, but
> libxl_flask_sid_to_context() can legitimately have error.

Well, errno=ENOSYS gives information about why
libxl_flask_sid_to_context() returns an error. 
They are multiple error code for returns libxl_*() functions but they
aren't really check. We often rely on errno to print an error message.
And in this case, libxl_flask_sid_to_context() doesn't event return a
proper libxl_error value.

> I guess this is fine if we want to use this approach:
> 
> Reviewed-by: Jason Andryuk <jason.andryuk@xxxxxxx>

Acked-by: Anthony PERARD <anthony.perard@xxxxxxxxxx>

Thanks,

-- 
Anthony PERARD



 


Rackspace

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