xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: Andrew Cooper <andrew.cooper3@citrix.com>
To: Jan Beulich <JBeulich@suse.com>
Cc: "Tim (Xen.org)" <tim@xen.org>, "Keir (Xen.org)" <keir@xen.org>,
	Ian Campbell <Ian.Campbell@citrix.com>,
	Xen-devel List <xen-devel@lists.xen.org>
Subject: Re: Xen hypercall API/ABI problems
Date: Tue, 25 Jun 2013 14:10:16 +0100	[thread overview]
Message-ID: <51C996B8.2000501@citrix.com> (raw)
In-Reply-To: <51C2E0F902000078000DF436@nat28.tlf.novell.com>

On 20/06/13 10:01, Jan Beulich wrote:
>>>> On 19.06.13 at 17:43, Andrew Cooper <andrew.cooper3@citrix.com> wrote:
>> In memory.c, there is a possible unsigned->signed conversion error from
>> max_pages to rc.
> That's of no concern as long as the maximum possible value can't
> result in the value being negative. Plus it's problematic only when
> the hypervisor is 32-bit (as otherwise it's a conversion from
> "unsigned int" to "signed long".
>
> And for the list of items to be complete - there's a similar conversion
> for d->tot_pages.

In this case, 64bit domain on 64bit Xen is fine.  This hypercall is ok
as it really shouldn't be returning more than ((~0ULL)>>PAGE_SHIFT)

I guess the question boils down this:

Is it ok to retroactively apply -error semantics to hypercalls which
were previously defined to never return an error?  Already for the
compat layer a wrong value is being returned. All we would be doing is
changing from INT_MAX to -ERANGE which is differently wrong but more
consistent.

~Andrew

  reply	other threads:[~2013-06-25 13:10 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-06-19 15:43 Xen hypercall API/ABI problems Andrew Cooper
2013-06-20  9:01 ` Jan Beulich
2013-06-25 13:10   ` Andrew Cooper [this message]
2013-06-25 14:04     ` 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=51C996B8.2000501@citrix.com \
    --to=andrew.cooper3@citrix.com \
    --cc=Ian.Campbell@citrix.com \
    --cc=JBeulich@suse.com \
    --cc=keir@xen.org \
    --cc=tim@xen.org \
    --cc=xen-devel@lists.xen.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).