All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jan Beulich <jbeulich@suse.com>
To: Andrew Cooper <andrew.cooper3@citrix.com>
Cc: "Wei Liu" <wl@xen.org>, "Roger Pau Monné" <roger.pau@citrix.com>,
	"Ian Jackson" <iwj@xenproject.org>,
	"Juergen Gross" <jgross@suse.com>,
	"xen-devel@lists.xenproject.org" <xen-devel@lists.xenproject.org>
Subject: Re: [PATCH 2/5] libxencall: osdep_hypercall() should return long
Date: Fri, 18 Jun 2021 15:42:25 +0200	[thread overview]
Message-ID: <31a3f6e7-2fe7-e25b-8e15-82940c9ef03f@suse.com> (raw)
In-Reply-To: <a8b032ec-bafa-ef50-825f-26e975e64c69@citrix.com>

On 18.06.2021 15:26, Andrew Cooper wrote:
> On 18/06/2021 11:23, Jan Beulich wrote:
>> Some hypercalls, memory-op in particular, can return values requiring
>> more than 31 bits to represent. Hence the underlying layers need to make
>> sure they won't truncate such values. (Note that for Solaris the
>> function also gets renamed, to match the other OSes.)
> 
> Spot the environment which obviously hasn't been compiled since the
> 4.5(?) timeframe...
> 
> Also, I'm fairly sure the comment in the NetBSD version is false when it
> says it is copying the Linux way of doing things - I'm pretty sure it
> means copying the FreeBSD way.

It doesn't say "copy", but "mimic", and I think what it means is the
effect for its callers. Therefore I think the comment makes sense in
its current shape. And I don't think I should change it right here
anyway.

>> Signed-off-by: Jan Beulich <jbeulich@suse.com>
> 
> I think the commit message needs to state that this doesn't fix
> truncation in the Linux or Solaris, nor the truncation in the
> xencall{0..5}() public APIs.  It only fixes truncation issues for
> FreeBSD, MiniOS and NetBSD.

I've added

"Due to them merely propagating ioctl()'s return value, this change is
 benign on Linux and Solaris. IOW there's an actual effect here only for
 the BSDs and MiniOS, but even then further adjustments are needed at the
 xencall<N>() level."

> With a suitable adjustment, and ideally a fix to the NetBSD comment,
> Acked-by: Andrew Cooper <andrew.cooper3@citrix.com>

Thanks.

Jan



  reply	other threads:[~2021-06-18 13:42 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-18 10:20 [PATCH 0/5] allow xc_domain_maximum_gpfn() to observe full GFN value Jan Beulich
2021-06-18 10:23 ` [PATCH 1/5] x86/HVM: wire up multicalls Jan Beulich
2021-06-18 13:02   ` Andrew Cooper
2021-06-18 13:11     ` Jan Beulich
2021-06-18 10:23 ` [PATCH 2/5] libxencall: osdep_hypercall() should return long Jan Beulich
2021-06-18 13:26   ` Andrew Cooper
2021-06-18 13:42     ` Jan Beulich [this message]
2021-06-18 10:24 ` [PATCH 3/5] libxencall: introduce variant of xencall2() returning long Jan Beulich
2021-06-18 13:46   ` Andrew Cooper
2021-06-18 15:03     ` Jan Beulich
2021-06-22 11:38   ` Ian Jackson
2021-06-18 10:24 ` [PATCH 4/5] libxc: use multicall for memory-op on Linux (and Solaris) Jan Beulich
2021-06-18 15:05   ` Andrew Cooper
2021-06-18 15:29     ` Jan Beulich
2021-06-18 10:25 ` [PATCH 5/5] libxc: make xc_domain_maximum_gpfn() endianness-agnostic Jan Beulich
2021-06-18 15:06   ` Andrew Cooper
2021-06-18 15:22     ` Andrew Cooper
2021-06-18 15:24       ` Andrew Cooper
2021-06-18 15:36         ` Jan Beulich
2021-06-18 13:04 ` [PATCH 0/5] allow xc_domain_maximum_gpfn() to observe full GFN value Jan Beulich

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=31a3f6e7-2fe7-e25b-8e15-82940c9ef03f@suse.com \
    --to=jbeulich@suse.com \
    --cc=andrew.cooper3@citrix.com \
    --cc=iwj@xenproject.org \
    --cc=jgross@suse.com \
    --cc=roger.pau@citrix.com \
    --cc=wl@xen.org \
    --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.