All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Alex Bennée" <alex.bennee@linaro.org>
To: Stefan Hajnoczi <stefanha@redhat.com>
Cc: John G Johnson <john.g.johnson@oracle.com>,
	Daniele Buono <dbuono@us.ibm.com>,
	slp@redhat.com, "Michael S. Tsirkin" <mst@redhat.com>,
	qemu-devel@nongnu.org,
	"marcandre.lureau@redhat.com" <marcandre.lureau@redhat.com>,
	Hubertus Franke <frankeh@us.ibm.com>,
	rust-vmm@lists.opendev.org,
	Thanos Makatos <thanos.makatos@nutanix.com>
Subject: Re: Requirements for out-of-process device emulation
Date: Mon, 12 Oct 2020 18:16:18 +0100	[thread overview]
Message-ID: <87ft6jz7od.fsf@linaro.org> (raw)
In-Reply-To: <20201009161815.GA321402@stefanha-x1.localdomain>


Stefan Hajnoczi <stefanha@redhat.com> writes:

> I just posted the following on my blog to outline the requirements that
> have been discussed over the past few months around out-of-process
> device emulation (vhost-user, vfio-user, etc). I hope it's helpful for
> covering various angles of out-of-process device emulation.
>
> It's long, so no worries if you don't want to join the discussion.
>

Nice post.

> Security
> --------
> The trust model
> ```````````````
> The VMM must not trust the device emulation program. This is key to
> implementing privilege separation and the principle of least privilege.
> If a compromised device emulation program is able to gain control of the
> VMM then out-of-process device emulation has failed to provide isolation
> between devices.
>
> The device emulation program must not trust the VMM to the extent that
> this is possible. For example, it must validate inputs so that the VMM
> cannot gain control of the device emulation process through memory
> corruptions or other bugs. This makes it so that even if the VMM has
> been compromised, access to device resources and associated system calls
> still requires further compromising the device emulation process.

However in this model the guest intrinsically trusts device emulation
because it currently has full access to the guest's address space. It
would probably be worth making that explicit.

There are security models where the guest doesn't need to trust the VMM
or particular device emulations.


> Conclusion
> ----------
> This was largely a brain dump but I hope it is useful food for thought
> as out-of-process device emulation interfaces are designed and
> developed. There is a lot more to it than simply implementing a protocol
> for device register accesses and guest RAM DMA. Developing open source
> libraries in Rust and C that can be used as needed will ensure that
> out-of-process devices are high-quality and easy for users to deploy.

A useful exercise ;-)

-- 
Alex Bennée


  parent reply	other threads:[~2020-10-12 17:19 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-09 16:18 Requirements for out-of-process device emulation Stefan Hajnoczi
2020-10-09 19:44 ` Alex Williamson
2020-10-12 15:39   ` Stefan Hajnoczi
2020-10-12 17:16 ` Alex Bennée [this message]
2020-11-11 11:17   ` [Rust-VMM] " Stefan Hajnoczi
     [not found] <CAJSP0QUUR72Rr_deeckz+RHpZMEBv692V4XupWy9ai3i2QD8bw@mail.gmail.com>
2020-01-14 14:06 ` Stefan Hajnoczi

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=87ft6jz7od.fsf@linaro.org \
    --to=alex.bennee@linaro.org \
    --cc=dbuono@us.ibm.com \
    --cc=frankeh@us.ibm.com \
    --cc=john.g.johnson@oracle.com \
    --cc=marcandre.lureau@redhat.com \
    --cc=mst@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=rust-vmm@lists.opendev.org \
    --cc=slp@redhat.com \
    --cc=stefanha@redhat.com \
    --cc=thanos.makatos@nutanix.com \
    /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.