xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: Andrew Cooper <andrew.cooper3@citrix.com>
To: David Vrabel <david.vrabel@citrix.com>, Jan Beulich <JBeulich@suse.com>
Cc: StefanoStabellini <stefano.stabellini@citrix.com>,
	Ian Campbell <ian.campbell@citrix.com>,
	Xen-devel <xen-devel@lists.xen.org>
Subject: Re: [PATCH] x86/hvm: Allow the guest to permit the use of userspace hypercalls
Date: Mon, 11 Jan 2016 18:50:05 +0000	[thread overview]
Message-ID: <5693F95D.4090800@citrix.com> (raw)
In-Reply-To: <5693F702.5040709@citrix.com>

On 11/01/16 18:40, David Vrabel wrote:
> On 11/01/16 18:32, Andrew Cooper wrote:
>> On 11/01/16 18:26, David Vrabel wrote:
>>> On 11/01/16 17:17, Andrew Cooper wrote:
>>>> So from one point of view, sufficient justification for this change is
>>>> "because the Linux way isn't the only valid way to do this".
>>> "Because we can" isn't a good justification for adding something new.
>> "Because I need this to sensibly regression test bits of the hypervisor" is.
> No.  Tests should not require a magic mode -- they should test the
> existing ABIs guests actually use.

It isn't a magic mode.

>
>>> Particularly something that is trivially easy to (accidentally) misuse
>>> and open a big security hole between userspace and kernel.
>> This is no conceptual difference to incorrectly updating a pagetable, or
>> having wrong dpl checks in the IDT.
> Yes there is.  This proposed ABI addition is impossible to use safely.

It is perfectly possible to use safely.  "Safe" is a matter of
perspective, and depends on the usecase.  My entire argument here is
that "The Linux way" isn’t the only way, and it is wrong of Xen to
enforce "the Linux way" as the only way.

>
>> An OS which doesn't use the hypercall can't shoot itself.  An OS which
>> does use it has plenty of other ways to accidentally compromise itself.
> This ABI allows /untrusted userspace/ to shoot the whole OS in the foot.
>  It's quite different.

Only if the OS chooses to permit this.  If an OS doesn't want itself to
be shot, it doesn't use this hypercall and everything works as before.

~Andrew

  reply	other threads:[~2016-01-11 18:50 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-01-11 13:59 [PATCH] x86/hvm: Allow the guest to permit the use of userspace hypercalls Andrew Cooper
2016-01-11 14:32 ` Paul Durrant
2016-01-11 14:44 ` Jan Beulich
2016-01-11 17:17   ` Andrew Cooper
2016-01-11 18:26     ` David Vrabel
2016-01-11 18:32       ` Andrew Cooper
2016-01-11 18:40         ` David Vrabel
2016-01-11 18:50           ` Andrew Cooper [this message]
2016-01-12 12:07       ` Stefano Stabellini
2016-01-12 15:06         ` Jan Beulich
2016-01-12 17:05           ` Stefano Stabellini
2016-01-12 17:10             ` Juergen Gross
2016-01-12 17:23               ` Stefano Stabellini
2016-01-13  5:12                 ` Juergen Gross
2016-01-13 10:41                   ` Stefano Stabellini
2016-01-13 11:14                     ` Juergen Gross
2016-01-13 11:26                       ` Stefano Stabellini
2016-01-13 11:32                         ` Juergen Gross
2016-01-13 11:42         ` David Vrabel
2016-01-13 12:51           ` Stefano Stabellini
2016-01-12  7:33     ` Jan Beulich
2016-01-12 10:57       ` Andrew Cooper
2016-01-12 11:03         ` George Dunlap
2016-01-14 10:50 ` Ian Campbell

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=5693F95D.4090800@citrix.com \
    --to=andrew.cooper3@citrix.com \
    --cc=JBeulich@suse.com \
    --cc=david.vrabel@citrix.com \
    --cc=ian.campbell@citrix.com \
    --cc=stefano.stabellini@citrix.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).