qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Daniel P. Berrangé" <berrange@redhat.com>
To: Christian Schoenebeck <qemu_oss@crudebyte.com>
Cc: qemu-devel@nongnu.org, Greg Kurz <groug@kaod.org>
Subject: Re: [PATCH v3] 9pfs: deprecate 'proxy' backend
Date: Wed, 21 Jun 2023 14:46:39 +0100	[thread overview]
Message-ID: <ZJL/P90n4R6ioq0J@redhat.com> (raw)
In-Reply-To: <E1q7ytt-0005Fl-JX@lizzy.crudebyte.com>

On Sat, Jun 10, 2023 at 03:39:44PM +0200, Christian Schoenebeck wrote:
> +``-fsdev proxy`` and ``-virtfs proxy`` (since 8.1)
> +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> +
> +The 9p ``proxy`` filesystem backend driver has been deprecated and will be
> +removed in a future version of QEMU. Please use ``-fsdev local`` or
> +``-virtfs local`` for using the ``local`` 9p filesystem backend instead.
> +
> +The 9p ``proxy`` backend was originally developed as an alternative to the 9p
> +``local`` backend. The idea was to enhance security by dispatching actual low
> +level filesystem operations from 9p server (QEMU process) over to a separate
> +process (the virtfs-proxy-helper binary). However this alternative never gained
> +momentum. The proxy backend is much slower than the local backend, hasn't seen
> +any development in years, and showed to be less secure, especially due to the
> +fact that its helper daemon must be run as root, whereas with the local backend
> +QEMU is typically run as unprivileged user and allows to tighten behaviour by
> +mapping permissions et al.

The fact that the helper daemon runs as root was actually an intentional
design choice to improve security. When QEMU is running unprivileged, the
'local' backend is limited in what it can serve to stuff that is readable/
writable by the 'qemu' user account.

Using the 'proxy' backend allowed that restriction to be lifted, such
that it can serve files owned by arbitrary users.

Yes, the 'proxy' backend is less secure than the 'local' backend in an
unprivileged QEMU. It is massively more secure, however, than the 'local'
backend in a QEMU process running as root, which was the only option if
you need to serve files for many users.

IOW, if someone is currently using the 'proxy' backend, the 'local' backend
is quite likely NOT a viable alternative.

I'm fine with deprecating this. In terms of messaging wrt replacements,
we should highlight both the 9p 'local' backend, and virtiofsd as the
two alternatives. The latter is likely the better choice (on linux
hosts) for many.

With regards,
Daniel
-- 
|: https://berrange.com      -o-    https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org         -o-            https://fstop138.berrange.com :|
|: https://entangle-photo.org    -o-    https://www.instagram.com/dberrange :|



  parent reply	other threads:[~2023-06-21 13:47 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-06-10 13:39 [PATCH v3] 9pfs: deprecate 'proxy' backend Christian Schoenebeck
2023-06-12 14:57 ` [SPAM] " Greg Kurz
2023-06-15  9:35 ` Christian Schoenebeck
2023-06-21 13:32   ` Christian Schoenebeck
2023-06-21 13:41     ` Greg Kurz
2023-06-21 14:16       ` Christian Schoenebeck
2023-06-21 14:58         ` Greg Kurz
2023-06-21 13:39   ` Daniel P. Berrangé
2023-06-21 13:46 ` Daniel P. Berrangé [this message]
2023-06-21 14:27   ` Christian Schoenebeck
2023-06-21 15:28     ` Daniel P. Berrangé
2023-06-21 16:44       ` Christian Schoenebeck

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=ZJL/P90n4R6ioq0J@redhat.com \
    --to=berrange@redhat.com \
    --cc=groug@kaod.org \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu_oss@crudebyte.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 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).