From: Daniel De Graaf <dgdegra@tycho.nsa.gov>
To: xen-devel <xen-devel@lists.xen.org>
Cc: Jeremy Fitzhardinge <jeremy@goop.org>,
Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Subject: Multicall result missing sign extension in Xen or Linux
Date: Fri, 03 Aug 2012 14:57:24 -0400 [thread overview]
Message-ID: <501C1F14.9000505@tycho.nsa.gov> (raw)
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.
--
Daniel De Graaf
National Security Agency
next reply other threads:[~2012-08-03 18:57 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-08-03 18:57 Daniel De Graaf [this message]
2012-08-03 19:00 ` Multicall result missing sign extension in Xen or Linux Jeremy Fitzhardinge
2012-08-03 19:26 ` Daniel De Graaf
2012-08-03 21:26 ` Keir Fraser
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=501C1F14.9000505@tycho.nsa.gov \
--to=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 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.