From: Keir Fraser <keir@xen.org>
To: Daniel De Graaf <dgdegra@tycho.nsa.gov>,
xen-devel <xen-devel@lists.xen.org>
Cc: Jeremy Fitzhardinge <jeremy@goop.org>,
Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Subject: Re: Multicall result missing sign extension in Xen or Linux
Date: Fri, 03 Aug 2012 22:26:29 +0100 [thread overview]
Message-ID: <CC420095.47B75%keir@xen.org> (raw)
In-Reply-To: <501C1F14.9000505@tycho.nsa.gov>
On 03/08/2012 19:57, "Daniel De Graaf" <dgdegra@tycho.nsa.gov> wrote:
> While trying to figure out why a failing component of a multicall did not
> properly return its result, I discovered that multicall results are not
> sign-extended when placed in the unsigned long result field. For hypercalls
> such as do_mmu_update which return a (signed) int, this results in Linux
> incorrectly thinking the hypercall succeeded when it has actually failed
> since arch/x86/xen/multicalls.c uses a signed long for "result" and checks
> (b->entries[i].result < 0).
>
> Is this a bug in Xen (using the wrong return type for do_mmu_op and other
> hypercalls) or in Linux (assuming all returns are signed longs)? One or the
> other needs to be changed, because the current setup is silently hiding
> failed memory mapping operations.
I think this is a Xen bug, and we should update all hypercalls to explicitly
return a long. Nice and straightforward.
-- Keir
prev parent reply other threads:[~2012-08-03 21:26 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-08-03 18:57 Multicall result missing sign extension in Xen or Linux Daniel De Graaf
2012-08-03 19:00 ` Jeremy Fitzhardinge
2012-08-03 19:26 ` Daniel De Graaf
2012-08-03 21:26 ` Keir Fraser [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=CC420095.47B75%keir@xen.org \
--to=keir@xen.org \
--cc=dgdegra@tycho.nsa.gov \
--cc=jeremy@goop.org \
--cc=konrad.wilk@oracle.com \
--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).