All of lore.kernel.org
 help / color / mirror / Atom feed
From: Anthony PERARD <anthony@xenproject.org>
To: Jason Andryuk <jason.andryuk@amd.com>
Cc: Jan Beulich <jbeulich@suse.com>,
	"xen-devel@lists.xenproject.org" <xen-devel@lists.xenproject.org>,
	Anthony PERARD <anthony.perard@vates.tech>,
	Juergen Gross <jgross@suse.com>
Subject: Re: [PATCH] libxl: preserve errno in libxl__xcinfo2xlinfo()
Date: Mon, 8 Sep 2025 14:40:04 +0200	[thread overview]
Message-ID: <aL7OpEaEFswuUbSQ@l14> (raw)
In-Reply-To: <c4ce1651-3881-4af0-bfe4-294917c31c9d@amd.com>

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@suse.com>
> > ---
> > 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@amd.com>

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

Thanks,

-- 
Anthony PERARD


      parent reply	other threads:[~2025-09-08 12:40 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-08-27  5:57 [PATCH] libxl: preserve errno in libxl__xcinfo2xlinfo() Jan Beulich
2025-08-28  1:16 ` Jason Andryuk
2025-08-28  6:11   ` Jan Beulich
2025-09-08 12:40   ` Anthony PERARD [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=aL7OpEaEFswuUbSQ@l14 \
    --to=anthony@xenproject.org \
    --cc=anthony.perard@vates.tech \
    --cc=jason.andryuk@amd.com \
    --cc=jbeulich@suse.com \
    --cc=jgross@suse.com \
    --cc=xen-devel@lists.xenproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.