From: Andrew Cooper <andrew.cooper3@citrix.com>
To: Jan Beulich <JBeulich@suse.com>
Cc: Tim Deegan <tim@xen.org>, IanCampbell <Ian.Campbell@citrix.com>,
Xen-devel List <xen-devel@lists.xen.org>
Subject: Re: Xen-4.5 HVMOP ABI issues
Date: Fri, 28 Nov 2014 13:55:36 +0000 [thread overview]
Message-ID: <54787ED8.2010508@citrix.com> (raw)
In-Reply-To: <5478819F020000780004B70D@mail.emea.novell.com>
On 28/11/14 13:07, Jan Beulich wrote:
>>>> On 28.11.14 at 12:36, <andrew.cooper3@citrix.com> wrote:
>> However, it occurs to me that HVMOP_op_mask absolutely must live in the
>> public header files, as it is guest visible, and forms part of the ABI.
>>
>> Consider a userspace task which falls into a continuation, is preempted
>> and paused by the guest kernel, the entire VM migrated, and the task
>> unpaused later. If HVMOP_op_mask has changed in that time, the
>> continuation will become erroneous.
>>
>> In particular, all hypercall continuation strategies we use *must* be
>> forward compatible when moving to newer versions of Xen, because Xen
>> cannot possibly guarantee that a continuation which starts will finish
>> on the same hypervisor.
> Hmm, I see the issue, but surfacing such implementation details
> would not only be unfortunate, but eventually prevent us from
> making future changes. Just recall the mem-op case where we had
> to widen the continuation encoding mask at some point. Hence while
> I can't immediately see a way to avoid the situation you describe
> (and it doesn't even take a user space task in a preemptible kernel),
> I think we should allow ourselves a little more time to find possible
> solutions other than locking down these masks (really they don't
> need to be exposed in the public headers, but we would need
> them to not change if no other solution can be found).
It is certainly unfortunate, but I don't see that we have any choice.
The implementation details of continuations have already slipped into
the ABI.
>
> One thing to note is that the _introduction_ of such a mask (as
> has happened for hvm-op between 4.4 and 4.5) is not a problem
> as long as the respective bits all being zero has no special
> meaning. What I considered for mem-op a while ago though (and
> then forgot again) was to refuse non-zero start_extent values
> for any operations not making use of that mechanism. The same
> would of course be applicable to gnttab-op and hvm-op.
>
> What might additionally make this not that urgent an issue for 4.5
> is that only XSM_DM_PRIV guarded operations are affected, and
> I suppose a stubdom gets re-created on the target host (rather
> than migrated) when its client migrates.
The problem is with continuations which reuse the upper bits of the
input register, not with this HVMOP_op_mask specifically; the
HVMOP_op_mask simply adds to an existing problem. This is something
which needs considering urgently because, as you identify above, we have
already suffered an accidental ABI breakage with the mem-op widening.
32bit HVM guests reliably form a continuation on every single iteration
of a continuable hypercall (e.g. decrease reservation, which is the base
of my XSA-111 PoC), making it trivial to construct a migrateable HVM
domain which exposes the issue.
~Andrew
next prev parent reply other threads:[~2014-11-28 13:55 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-11-28 11:36 Xen-4.5 HVMOP ABI issues Andrew Cooper
2014-11-28 13:07 ` Jan Beulich
2014-11-28 13:11 ` Ian Campbell
2014-11-28 13:55 ` Andrew Cooper [this message]
2014-11-28 15:18 ` Jan Beulich
2014-11-28 15:46 ` Andrew Cooper
2014-12-04 13:49 ` Jan Beulich
2014-12-04 14:28 ` Andrew Cooper
2014-12-04 14:55 ` Jan Beulich
2014-12-04 15:46 ` Andrew Cooper
2014-12-04 16:11 ` Jan Beulich
2014-12-04 16:45 ` Andrew Cooper
2014-12-04 15:49 ` Tim Deegan
2014-12-05 2:19 ` Konrad Rzeszutek Wilk
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=54787ED8.2010508@citrix.com \
--to=andrew.cooper3@citrix.com \
--cc=Ian.Campbell@citrix.com \
--cc=JBeulich@suse.com \
--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 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.