9pfs: deprecate 'proxy' backend
PATCH v3 1/1 9pfs: deprecate 'proxy' backend
As recent CVE-2023-2861 once again showed, the 9p 'proxy' fs driver is in bad shape. Using the 'proxy' backend was already discouraged for safety reasons before and we recommended to use the 'local' backend instead, but now it is time to officially deprecate the 'proxy' backend.
---
v2 -> v3:
* Fix copy wasted typo (-> 'backend').
MAINTAINERS | 7 +++++++ docs/about/deprecated.rst | 17 +++++++++++++++++ docs/tools/virtfs-proxy-helper.rst | 3 +++ fsdev/qemu-fsdev.c | 5 +++++ fsdev/virtfs-proxy-helper.c | 5 +++++ hw/9pfs/9p-proxy.c | 5 +++++ hw/9pfs/9p-proxy.h | 5 +++++ meson.build | 2 +- qemu-options.hx | 6 +++++- softmmu/vl.c | 5 +++++ 10 files changed, 58 insertions(+), 2 deletions(-)
MAINTAINERS +7 -0
@@ -2118,13 +2118,20 @@ S: Odd Fixes W: https://wiki.qemu.org/Documentation/9p F: hw/9pfs/ X: hw/9pfs/xen-9p* +X: hw/9pfs/9p-proxy* F: fsdev/ +X: fsdev/virtfs-proxy-helper.c F: docs/tools/virtfs-proxy-helper.rst F: tests/qtest/virtio-9p-test.c F: tests/qtest/libqos/virtio-9p* T: git https://gitlab.com/gkurz/qemu.git 9p-next T: git https://github.com/cschoenebeck/qemu.git 9p.next +virtio-9p-proxy +F: hw/9pfs/9p-proxy* +F: fsdev/virtfs-proxy-helper.c +S: Obsolete + virtio-blk M: Stefan Hajnoczi <[email protected]> L: [email protected]
docs/about/deprecated.rst +17 -0
@@ -343,6 +343,23 @@ the addition of volatile memory support, it is now necessary to distinguish between persistent and volatile memory backends. As such, memdev is deprecated in favor of persistent-memdev. +``-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. + Block device options ''''''''''''''''''''
docs/tools/virtfs-proxy-helper.rst +3 -0
@@ -9,6 +9,9 @@ Synopsis Description ----------- +NOTE: The 9p 'proxy' backend is deprecated (since QEMU 8.1) and will be +removed, along with this daemon, in a future version of QEMU! + Pass-through security model in QEMU 9p server needs root privilege to do few file operations (like chown, chmod to any mode/uid:gid). There are two issues in pass-through security model:
fsdev/qemu-fsdev.c +5 -0
@@ -133,6 +133,11 @@ int qemu_fsdev_add(QemuOpts *opts, Error **errp) }if (fsdriver) { +if (strncmp (fsdriver,"proxy" ,5 ) ==0 ) { +warn_report ("'-fsdev proxy' is deprecated, use '-fsdev local' " +"instead" ); + } +for (i =0 ; i <ARRAY_SIZE (FsDrivers); i++) {if (strcmp (FsDrivers[i].name, fsdriver) ==0 ) {break ;
fsdev/virtfs-proxy-helper.c +5 -0
@@ -9,6 +9,11 @@* the COPYING file in the top-level directory. */ +/* +* NOTE: The 9p 'proxy' backend is deprecated (since QEMU 8.1) and will be +* removed in a future version of QEMU! +*/ +#include "qemu/osdep.h" #include <glib/gstdio.h> #include <sys/resource.h>
hw/9pfs/9p-proxy.c +5 -0
@@ -15,6 +15,11 @@* https://wiki.qemu.org/Documentation/9p */ +/* +* NOTE: The 9p 'proxy' backend is deprecated (since QEMU 8.1) and will be +* removed in a future version of QEMU! +*/ +#include "qemu/osdep.h" #include <sys/socket.h> #include <sys/un.h>
hw/9pfs/9p-proxy.h +5 -0
@@ -10,6 +10,11 @@* the COPYING file in the top-level directory. */ +/* +* NOTE: The 9p 'proxy' backend is deprecated (since QEMU 8.1) and will be +* removed in a future version of QEMU! +*/ +#ifndef QEMU_9P_PROXY_H #define QEMU_9P_PROXY_H
meson.build +1 -1
@@ -4170,7 +4170,7 @@ if have_block summary_info += {'Block whitelist (ro)': get_option('block_drv_ro_whitelist')} summary_info += {'Use block whitelist in tools': get_option('block_drv_whitelist_in_tools')} summary_info += {'VirtFS (9P) support': have_virtfs} - summary_info += {'VirtFS (9P) Proxy Helper support': have_virtfs_proxy_helper} + summary_info += {'VirtFS (9P) Proxy Helper support (deprecated)': have_virtfs_proxy_helper} summary_info += {'Live block migration': config_host_data.get('CONFIG_LIVE_BLOCK_MIGRATION')} summary_info += {'replication support': config_host_data.get('CONFIG_REPLICATION')} summary_info += {'bochs support': get_option('bochs').allowed()}
qemu-options.hx +5 -1
@@ -1735,7 +1735,9 @@ SRST Accesses to the filesystem are done by QEMU. ``proxy`` - Accesses to the filesystem are done by virtfs-proxy-helper(1). + Accesses to the filesystem are done by virtfs-proxy-helper(1). This + option is deprecated (since QEMU 8.1) and will be removed in a future + version of QEMU. Use ``local`` instead. ``synth`` Synthetic filesystem, only used by QTests.
@@ -1867,6 +1869,8 @@ SRST ``proxy`` Accesses to the filesystem are done by virtfs-proxy-helper(1). + This option is deprecated (since QEMU 8.1) and will be removed in a + future version of QEMU. Use ``local`` instead. ``synth`` Synthetic filesystem, only used by QTests.
softmmu/vl.c +5 -0
@@ -3102,6 +3102,11 @@ void qemu_init(int argc, char **argv)error_report ("Usage: -virtfs fsdriver,mount_tag=tag" );exit (1 ); } +if (strncmp (qemu_opt_get (opts,"fsdriver" ),"proxy" ,5 ) ==0 ) { +warn_report ("'-virtfs proxy' is deprecated, use " +"'-virtfs local' instead" ); + } + fsdev = qemu_opts_create(qemu_find_opts("fsdev"), qemu_opts_id(opts) ?: qemu_opt_get(opts, "mount_tag"),
Signature · 1 line
2.30.2
Hi Christian,
Quoted 5 lines · On Sat, 10 Jun 2023 15:39:44 +0200 Christian Schoenebeck…
As recent CVE-2023-2861 once again showed, the 9p 'proxy' fs driver is in bad shape. Using the 'proxy' backend was already discouraged for safety reasons before and we recommended to use the 'local' backend instead, but now it is time to officially deprecate the 'proxy' backend.
For the records :
The 'proxy' backend is an old thing that predates vhost-user. It really turns QEMU into a proxy : all requests go to QEMU, which forwads them to the helper and the other way around for responses. Data is copied both ways. All of this severely damages latency.
If someone really wants to offload 9p stuff to a separate process, they should come up with a vhost-user-9p implementation. The whole server would be offloaded, possibly sharing most of the code with the in-QEMU server, QEMU wouldn't be involved anymore in the I/Os. No more copies.
Quoted 105 lines
Signed-off-by Christian Schoenebeck <[email protected]>---
v2 -> v3:
* Fix copy wasted typo (-> 'backend').MAINTAINERS | 7 +++++++ docs/about/deprecated.rst | 17 +++++++++++++++++ docs/tools/virtfs-proxy-helper.rst | 3 +++ fsdev/qemu-fsdev.c | 5 +++++ fsdev/virtfs-proxy-helper.c | 5 +++++ hw/9pfs/9p-proxy.c | 5 +++++ hw/9pfs/9p-proxy.h | 5 +++++ meson.build | 2 +- qemu-options.hx | 6 +++++- softmmu/vl.c | 5 +++++ 10 files changed, 58 insertions(+), 2 deletions(-)MAINTAINERS +7
-0@@ -2118,13 +2118,20 @@ S: Odd Fixes W: https://wiki.qemu.org/Documentation/9p F: hw/9pfs/ X: hw/9pfs/xen-9p* +X: hw/9pfs/9p-proxy* F: fsdev/ +X: fsdev/virtfs-proxy-helper.c F: docs/tools/virtfs-proxy-helper.rst F: tests/qtest/virtio-9p-test.c F: tests/qtest/libqos/virtio-9p* T: git https://gitlab.com/gkurz/qemu.git 9p-next T: git https://github.com/cschoenebeck/qemu.git 9p.next +virtio-9p-proxy +F: hw/9pfs/9p-proxy* +F: fsdev/virtfs-proxy-helper.c +S: Obsolete + virtio-blk M: Stefan Hajnoczi <[email protected]> L: [email protected]docs/about/deprecated.rst +17
-0@@ -343,6 +343,23 @@ the addition of volatile memory support, it is now necessary to distinguish between persistent and volatile memory backends. As such, memdev is deprecated in favor of persistent-memdev. +``-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. + Block device options ''''''''''''''''''''docs/tools/virtfs-proxy-helper.rst +3
-0@@ -9,6 +9,9 @@ Synopsis Description ----------- +NOTE: The 9p 'proxy' backend is deprecated (since QEMU 8.1) and will be +removed, along with this daemon, in a future version of QEMU! + Pass-through security model in QEMU 9p server needs root privilege to do few file operations (like chown, chmod to any mode/uid:gid). There are two issues in pass-through security model:fsdev/qemu-fsdev.c +5
-0@@ -133,6 +133,11 @@ int qemu_fsdev_add(QemuOpts *opts, Error **errp) }if (fsdriver) { +if (strncmp (fsdriver,"proxy" ,5 ) ==0 ) { +warn_report ("'-fsdev proxy' is deprecated, use '-fsdev local' " +"instead" ); + } +for (i =0 ; i <ARRAY_SIZE (FsDrivers); i++) {if (strcmp (FsDrivers[i].name, fsdriver) ==0 ) {break ;fsdev/virtfs-proxy-helper.c +0
-0
fsdev/virtfs-proxy-helper.c line 16
Quoted 8 lines
fsdev/virtfs-proxy-helper.c +5
-0@@ -9,6 +9,11 @@* the COPYING file in the top-level directory. */ +/* +* NOTE: The 9p 'proxy' backend is deprecated (since QEMU 8.1) and will be +* removed in a future version of QEMU! +*/ +
What about having the proxy to print a deprecation warning as well ?
Quoted 78 lines
fsdev/virtfs-proxy-helper.c +0
-0#include "qemu/osdep.h" #include <glib/gstdio.h> #include <sys/resource.h> hw/9pfs/9p-proxy.c +5
-0@@ -15,6 +15,11 @@* https://wiki.qemu.org/Documentation/9p */ +/* +* NOTE: The 9p 'proxy' backend is deprecated (since QEMU 8.1) and will be +* removed in a future version of QEMU! +*/ +#include "qemu/osdep.h" #include <sys/socket.h> #include <sys/un.h> hw/9pfs/9p-proxy.h +5
-0@@ -10,6 +10,11 @@* the COPYING file in the top-level directory. */ +/* +* NOTE: The 9p 'proxy' backend is deprecated (since QEMU 8.1) and will be +* removed in a future version of QEMU! +*/ +#ifndef QEMU_9P_PROXY_H #define QEMU_9P_PROXY_H meson.build +1
-1@@ -4170,7 +4170,7 @@ if have_block summary_info += {'Block whitelist (ro)': get_option('block_drv_ro_whitelist')} summary_info += {'Use block whitelist in tools': get_option('block_drv_whitelist_in_tools')} summary_info += {'VirtFS (9P) support': have_virtfs} - summary_info += {'VirtFS (9P) Proxy Helper support': have_virtfs_proxy_helper} + summary_info += {'VirtFS (9P) Proxy Helper support (deprecated)': have_virtfs_proxy_helper} summary_info += {'Live block migration': config_host_data.get('CONFIG_LIVE_BLOCK_MIGRATION')} summary_info += {'replication support': config_host_data.get('CONFIG_REPLICATION')} summary_info += {'bochs support': get_option('bochs').allowed()}qemu-options.hx +5
-1@@ -1735,7 +1735,9 @@ SRST Accesses to the filesystem are done by QEMU. ``proxy`` - Accesses to the filesystem are done by virtfs-proxy-helper(1). + Accesses to the filesystem are done by virtfs-proxy-helper(1). This + option is deprecated (since QEMU 8.1) and will be removed in a future + version of QEMU. Use ``local`` instead. ``synth`` Synthetic filesystem, only used by QTests.@@ -1867,6 +1869,8 @@ SRST ``proxy`` Accesses to the filesystem are done by virtfs-proxy-helper(1). + This option is deprecated (since QEMU 8.1) and will be removed in a + future version of QEMU. Use ``local`` instead. ``synth`` Synthetic filesystem, only used by QTests.softmmu/vl.c +0
-0@@ -3102,6 +3102,11 @@ void qemu_init(int argc, char **argv)error_report ("Usage: -virtfs fsdriver,mount_tag=tag" );
softmmu/vl.c void qemu_init(int argc, char **argv) · line 3112
Quoted 10 lines
softmmu/vl.c +5
-0exit (1 ); } +if (strncmp (qemu_opt_get (opts,"fsdriver" ),"proxy" ,5 ) ==0 ) { +warn_report ("'-virtfs proxy' is deprecated, use " +"'-virtfs local' instead" ); + } + fsdev = qemu_opts_create(qemu_find_opts("fsdev"), qemu_opts_id(opts) ?: qemu_opt_get(opts, "mount_tag"),
Since an -fsdev is generated internally for each -virtfs we end up with two warnings, which seems a bit weird :
$ qemu-system-x86_64-mbuild -virtfs proxy,id=fsdev0,mount_tag=9p qemu-system-x86_64: -virtfs proxy,id=fsdev0,mount_tag=9p: warning: '-virtfs proxy' is deprecated, use '-virtfs local' instead qemu-system-x86_64: -virtfs proxy,id=fsdev0,mount_tag=9p: warning: '-fsdev proxy' is deprecated, use '-fsdev local' instead ...
Since it might be quite complex to guess in qemu_fsdev_add() that we're dealing with such an internally generated opt, I'd adapt the text so that it works for both cases.
e.g. '-fsdev proxy' and '-virtfs proxy' are deprecated, use 'local' instead of 'proxy'
Cheers,
Signature · 1 line
Greg
Quoted 10 lines · CEST Christian Schoenebeck
As recent CVE-2023-2861 once again showed, the 9p 'proxy' fs driver is in bad shape. Using the 'proxy' backend was already discouraged for safety reasons before and we recommended to use the 'local' backend instead, but now it is time to officially deprecate the 'proxy' backend.
Signed-off-by Christian Schoenebeck <[email protected]>---
v2 -> v3:
* Fix copy wasted typo (-> 'backend').
Quoted 11 lines
MAINTAINERS | 7 +++++++ docs/about/deprecated.rst | 17 +++++++++++++++++ docs/tools/virtfs-proxy-helper.rst | 3 +++ fsdev/qemu-fsdev.c | 5 +++++ fsdev/virtfs-proxy-helper.c | 5 +++++ hw/9pfs/9p-proxy.c | 5 +++++ hw/9pfs/9p-proxy.h | 5 +++++ meson.build | 2 +- qemu-options.hx | 6 +++++- softmmu/vl.c | 5 +++++ 10 files changed, 58 insertions(+), 2 deletions(-)
Or would it be better to split this up, e.g. into 3 separate patches (runtime messages, docs, MAINTAINERS)?
MAINTAINERS S: Odd Fixes · line 2124
Quoted 12 lines
MAINTAINERS +2
-0@@ -2118,13 +2118,20 @@ S: Odd Fixes W: https://wiki.qemu.org/Documentation/9p F: hw/9pfs/ X: hw/9pfs/xen-9p* +X: hw/9pfs/9p-proxy* F: fsdev/ +X: fsdev/virtfs-proxy-helper.c F: docs/tools/virtfs-proxy-helper.rst
I missed virtfs-proxy-helper.rst here. That should be moved to the new 'proxy' section below as well.
Quoted 173 lines
MAINTAINERS +5
-0F: tests/qtest/virtio-9p-test.c F: tests/qtest/libqos/virtio-9p* T: git https://gitlab.com/gkurz/qemu.git 9p-next T: git https://github.com/cschoenebeck/qemu.git 9p.next +virtio-9p-proxy +F: hw/9pfs/9p-proxy* +F: fsdev/virtfs-proxy-helper.c +S: Obsolete + virtio-blk M: Stefan Hajnoczi <[email protected]> L: [email protected]docs/about/deprecated.rst +17
-0@@ -343,6 +343,23 @@ the addition of volatile memory support, it is now necessary to distinguish between persistent and volatile memory backends. As such, memdev is deprecated in favor of persistent-memdev. +``-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. + Block device options ''''''''''''''''''''docs/tools/virtfs-proxy-helper.rst +3
-0@@ -9,6 +9,9 @@ Synopsis Description ----------- +NOTE: The 9p 'proxy' backend is deprecated (since QEMU 8.1) and will be +removed, along with this daemon, in a future version of QEMU! + Pass-through security model in QEMU 9p server needs root privilege to do few file operations (like chown, chmod to any mode/uid:gid). There are two issues in pass-through security model:fsdev/qemu-fsdev.c +5
-0@@ -133,6 +133,11 @@ int qemu_fsdev_add(QemuOpts *opts, Error **errp) }if (fsdriver) { +if (strncmp (fsdriver,"proxy" ,5 ) ==0 ) { +warn_report ("'-fsdev proxy' is deprecated, use '-fsdev local' " +"instead" ); + } +for (i =0 ; i <ARRAY_SIZE (FsDrivers); i++) {if (strcmp (FsDrivers[i].name, fsdriver) ==0 ) {break ;fsdev/virtfs-proxy-helper.c +5
-0@@ -9,6 +9,11 @@* the COPYING file in the top-level directory. */ +/* +* NOTE: The 9p 'proxy' backend is deprecated (since QEMU 8.1) and will be +* removed in a future version of QEMU! +*/ +#include "qemu/osdep.h" #include <glib/gstdio.h> #include <sys/resource.h> hw/9pfs/9p-proxy.c +5
-0@@ -15,6 +15,11 @@* https://wiki.qemu.org/Documentation/9p */ +/* +* NOTE: The 9p 'proxy' backend is deprecated (since QEMU 8.1) and will be +* removed in a future version of QEMU! +*/ +#include "qemu/osdep.h" #include <sys/socket.h> #include <sys/un.h> hw/9pfs/9p-proxy.h +5
-0@@ -10,6 +10,11 @@* the COPYING file in the top-level directory. */ +/* +* NOTE: The 9p 'proxy' backend is deprecated (since QEMU 8.1) and will be +* removed in a future version of QEMU! +*/ +#ifndef QEMU_9P_PROXY_H #define QEMU_9P_PROXY_H meson.build +1
-1@@ -4170,7 +4170,7 @@ if have_block summary_info += {'Block whitelist (ro)': get_option('block_drv_ro_whitelist')} summary_info += {'Use block whitelist in tools': get_option('block_drv_whitelist_in_tools')} summary_info += {'VirtFS (9P) support': have_virtfs} - summary_info += {'VirtFS (9P) Proxy Helper support': have_virtfs_proxy_helper} + summary_info += {'VirtFS (9P) Proxy Helper support (deprecated)': have_virtfs_proxy_helper} summary_info += {'Live block migration': config_host_data.get('CONFIG_LIVE_BLOCK_MIGRATION')} summary_info += {'replication support': config_host_data.get('CONFIG_REPLICATION')} summary_info += {'bochs support': get_option('bochs').allowed()}qemu-options.hx +5
-1@@ -1735,7 +1735,9 @@ SRST Accesses to the filesystem are done by QEMU. ``proxy`` - Accesses to the filesystem are done by virtfs-proxy-helper(1). + Accesses to the filesystem are done by virtfs-proxy-helper(1). This + option is deprecated (since QEMU 8.1) and will be removed in a future + version of QEMU. Use ``local`` instead. ``synth`` Synthetic filesystem, only used by QTests.@@ -1867,6 +1869,8 @@ SRST ``proxy`` Accesses to the filesystem are done by virtfs-proxy-helper(1). + This option is deprecated (since QEMU 8.1) and will be removed in a + future version of QEMU. Use ``local`` instead. ``synth`` Synthetic filesystem, only used by QTests.softmmu/vl.c +5
-0@@ -3102,6 +3102,11 @@ void qemu_init(int argc, char **argv)error_report ("Usage: -virtfs fsdriver,mount_tag=tag" );exit (1 ); } +if (strncmp (qemu_opt_get (opts,"fsdriver" ),"proxy" ,5 ) ==0 ) { +warn_report ("'-virtfs proxy' is deprecated, use " +"'-virtfs local' instead" ); + } + fsdev = qemu_opts_create(qemu_find_opts("fsdev"), qemu_opts_id(opts) ?: qemu_opt_get(opts, "mount_tag"),
Quoted 7 lines · CEST Christian Schoenebeck
Quoted 6 lines · CEST Christian Schoenebeck
As recent CVE-2023-2861 once again showed, the 9p 'proxy' fs driver is in bad shape. Using the 'proxy' backend was already discouraged for safety reasons before and we recommended to use the 'local' backend instead, but now it is time to officially deprecate the 'proxy' backend.
Signed-off-by Christian Schoenebeck <[email protected]>
Ping
Quoted 212 lines
Quoted 4 lines
---
v2 -> v3:
* Fix copy wasted typo (-> 'backend').Quoted 11 lines
MAINTAINERS | 7 +++++++ docs/about/deprecated.rst | 17 +++++++++++++++++ docs/tools/virtfs-proxy-helper.rst | 3 +++ fsdev/qemu-fsdev.c | 5 +++++ fsdev/virtfs-proxy-helper.c | 5 +++++ hw/9pfs/9p-proxy.c | 5 +++++ hw/9pfs/9p-proxy.h | 5 +++++ meson.build | 2 +- qemu-options.hx | 6 +++++- softmmu/vl.c | 5 +++++ 10 files changed, 58 insertions(+), 2 deletions(-)Or would it be better to split this up, e.g. into 3 separate patches (runtime messages, docs,
MAINTAINERS)?MAINTAINERS S: Odd Fixes · line 2124
Quoted 12 lines
MAINTAINERS +2
-0@@ -2118,13 +2118,20 @@ S: Odd Fixes W: https://wiki.qemu.org/Documentation/9p F: hw/9pfs/ X: hw/9pfs/xen-9p* +X: hw/9pfs/9p-proxy* F: fsdev/ +X: fsdev/virtfs-proxy-helper.c F: docs/tools/virtfs-proxy-helper.rstI missed
virtfs-proxy-helper.rsthere. That should be moved to the new 'proxy' section below as well.Quoted 173 lines
MAINTAINERS +5
-0F: tests/qtest/virtio-9p-test.c F: tests/qtest/libqos/virtio-9p* T: git https://gitlab.com/gkurz/qemu.git 9p-next T: git https://github.com/cschoenebeck/qemu.git 9p.next +virtio-9p-proxy +F: hw/9pfs/9p-proxy* +F: fsdev/virtfs-proxy-helper.c +S: Obsolete + virtio-blk M: Stefan Hajnoczi <[email protected]> L: [email protected]docs/about/deprecated.rst +17
-0@@ -343,6 +343,23 @@ the addition of volatile memory support, it is now necessary to distinguish between persistent and volatile memory backends. As such, memdev is deprecated in favor of persistent-memdev. +``-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. + Block device options ''''''''''''''''''''docs/tools/virtfs-proxy-helper.rst +3
-0@@ -9,6 +9,9 @@ Synopsis Description ----------- +NOTE: The 9p 'proxy' backend is deprecated (since QEMU 8.1) and will be +removed, along with this daemon, in a future version of QEMU! + Pass-through security model in QEMU 9p server needs root privilege to do few file operations (like chown, chmod to any mode/uid:gid). There are two issues in pass-through security model:fsdev/qemu-fsdev.c +5
-0@@ -133,6 +133,11 @@ int qemu_fsdev_add(QemuOpts *opts, Error **errp) }if (fsdriver) { +if (strncmp (fsdriver,"proxy" ,5 ) ==0 ) { +warn_report ("'-fsdev proxy' is deprecated, use '-fsdev local' " +"instead" ); + } +for (i =0 ; i <ARRAY_SIZE (FsDrivers); i++) {if (strcmp (FsDrivers[i].name, fsdriver) ==0 ) {break ;fsdev/virtfs-proxy-helper.c +5
-0@@ -9,6 +9,11 @@* the COPYING file in the top-level directory. */ +/* +* NOTE: The 9p 'proxy' backend is deprecated (since QEMU 8.1) and will be +* removed in a future version of QEMU! +*/ +#include "qemu/osdep.h" #include <glib/gstdio.h> #include <sys/resource.h> hw/9pfs/9p-proxy.c +5
-0@@ -15,6 +15,11 @@* https://wiki.qemu.org/Documentation/9p */ +/* +* NOTE: The 9p 'proxy' backend is deprecated (since QEMU 8.1) and will be +* removed in a future version of QEMU! +*/ +#include "qemu/osdep.h" #include <sys/socket.h> #include <sys/un.h> hw/9pfs/9p-proxy.h +5
-0@@ -10,6 +10,11 @@* the COPYING file in the top-level directory. */ +/* +* NOTE: The 9p 'proxy' backend is deprecated (since QEMU 8.1) and will be +* removed in a future version of QEMU! +*/ +#ifndef QEMU_9P_PROXY_H #define QEMU_9P_PROXY_H meson.build +1
-1@@ -4170,7 +4170,7 @@ if have_block summary_info += {'Block whitelist (ro)': get_option('block_drv_ro_whitelist')} summary_info += {'Use block whitelist in tools': get_option('block_drv_whitelist_in_tools')} summary_info += {'VirtFS (9P) support': have_virtfs} - summary_info += {'VirtFS (9P) Proxy Helper support': have_virtfs_proxy_helper} + summary_info += {'VirtFS (9P) Proxy Helper support (deprecated)': have_virtfs_proxy_helper} summary_info += {'Live block migration': config_host_data.get('CONFIG_LIVE_BLOCK_MIGRATION')} summary_info += {'replication support': config_host_data.get('CONFIG_REPLICATION')} summary_info += {'bochs support': get_option('bochs').allowed()}qemu-options.hx +5
-1@@ -1735,7 +1735,9 @@ SRST Accesses to the filesystem are done by QEMU. ``proxy`` - Accesses to the filesystem are done by virtfs-proxy-helper(1). + Accesses to the filesystem are done by virtfs-proxy-helper(1). This + option is deprecated (since QEMU 8.1) and will be removed in a future + version of QEMU. Use ``local`` instead. ``synth`` Synthetic filesystem, only used by QTests.@@ -1867,6 +1869,8 @@ SRST ``proxy`` Accesses to the filesystem are done by virtfs-proxy-helper(1). + This option is deprecated (since QEMU 8.1) and will be removed in a + future version of QEMU. Use ``local`` instead. ``synth`` Synthetic filesystem, only used by QTests.softmmu/vl.c +5
-0@@ -3102,6 +3102,11 @@ void qemu_init(int argc, char **argv)error_report ("Usage: -virtfs fsdriver,mount_tag=tag" );exit (1 ); } +if (strncmp (qemu_opt_get (opts,"fsdriver" ),"proxy" ,5 ) ==0 ) { +warn_report ("'-virtfs proxy' is deprecated, use " +"'-virtfs local' instead" ); + } + fsdev = qemu_opts_create(qemu_find_opts("fsdev"), qemu_opts_id(opts) ?: qemu_opt_get(opts, "mount_tag"),
Quoted 11 lines · On Wed, 21 Jun 2023 15:32:39 +0200 Christian Schoenebeck…
Quoted 7 lines · CEST Christian Schoenebeck
Quoted 6 lines · CEST Christian Schoenebeck
As recent CVE-2023-2861 once again showed, the 9p 'proxy' fs driver is in bad shape. Using the 'proxy' backend was already discouraged for safety reasons before and we recommended to use the 'local' backend instead, but now it is time to officially deprecate the 'proxy' backend.
Signed-off-by Christian Schoenebeck <[email protected]>Ping
It seems you missed the review I posted last week :
https://patchew.org/QEMU/[email protected]/#20230612165742.3333ea08@bahia
Quoted 214 lines
Quoted 212 lines
Quoted 4 lines
---
v2 -> v3:
* Fix copy wasted typo (-> 'backend').Quoted 11 lines
MAINTAINERS | 7 +++++++ docs/about/deprecated.rst | 17 +++++++++++++++++ docs/tools/virtfs-proxy-helper.rst | 3 +++ fsdev/qemu-fsdev.c | 5 +++++ fsdev/virtfs-proxy-helper.c | 5 +++++ hw/9pfs/9p-proxy.c | 5 +++++ hw/9pfs/9p-proxy.h | 5 +++++ meson.build | 2 +- qemu-options.hx | 6 +++++- softmmu/vl.c | 5 +++++ 10 files changed, 58 insertions(+), 2 deletions(-)Or would it be better to split this up, e.g. into 3 separate patches (runtime messages, docs,
MAINTAINERS)?MAINTAINERS S: Odd Fixes · line 2124
Quoted 12 lines
MAINTAINERS +2
-0@@ -2118,13 +2118,20 @@ S: Odd Fixes W: https://wiki.qemu.org/Documentation/9p F: hw/9pfs/ X: hw/9pfs/xen-9p* +X: hw/9pfs/9p-proxy* F: fsdev/ +X: fsdev/virtfs-proxy-helper.c F: docs/tools/virtfs-proxy-helper.rstI missed
virtfs-proxy-helper.rsthere. That should be moved to the new 'proxy' section below as well.Quoted 173 lines
MAINTAINERS +5
-0F: tests/qtest/virtio-9p-test.c F: tests/qtest/libqos/virtio-9p* T: git https://gitlab.com/gkurz/qemu.git 9p-next T: git https://github.com/cschoenebeck/qemu.git 9p.next +virtio-9p-proxy +F: hw/9pfs/9p-proxy* +F: fsdev/virtfs-proxy-helper.c +S: Obsolete + virtio-blk M: Stefan Hajnoczi <[email protected]> L: [email protected]docs/about/deprecated.rst +17
-0@@ -343,6 +343,23 @@ the addition of volatile memory support, it is now necessary to distinguish between persistent and volatile memory backends. As such, memdev is deprecated in favor of persistent-memdev. +``-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. + Block device options ''''''''''''''''''''docs/tools/virtfs-proxy-helper.rst +3
-0@@ -9,6 +9,9 @@ Synopsis Description ----------- +NOTE: The 9p 'proxy' backend is deprecated (since QEMU 8.1) and will be +removed, along with this daemon, in a future version of QEMU! + Pass-through security model in QEMU 9p server needs root privilege to do few file operations (like chown, chmod to any mode/uid:gid). There are two issues in pass-through security model:fsdev/qemu-fsdev.c +5
-0@@ -133,6 +133,11 @@ int qemu_fsdev_add(QemuOpts *opts, Error **errp) }if (fsdriver) { +if (strncmp (fsdriver,"proxy" ,5 ) ==0 ) { +warn_report ("'-fsdev proxy' is deprecated, use '-fsdev local' " +"instead" ); + } +for (i =0 ; i <ARRAY_SIZE (FsDrivers); i++) {if (strcmp (FsDrivers[i].name, fsdriver) ==0 ) {break ;fsdev/virtfs-proxy-helper.c +5
-0@@ -9,6 +9,11 @@* the COPYING file in the top-level directory. */ +/* +* NOTE: The 9p 'proxy' backend is deprecated (since QEMU 8.1) and will be +* removed in a future version of QEMU! +*/ +#include "qemu/osdep.h" #include <glib/gstdio.h> #include <sys/resource.h> hw/9pfs/9p-proxy.c +5
-0@@ -15,6 +15,11 @@* https://wiki.qemu.org/Documentation/9p */ +/* +* NOTE: The 9p 'proxy' backend is deprecated (since QEMU 8.1) and will be +* removed in a future version of QEMU! +*/ +#include "qemu/osdep.h" #include <sys/socket.h> #include <sys/un.h> hw/9pfs/9p-proxy.h +5
-0@@ -10,6 +10,11 @@* the COPYING file in the top-level directory. */ +/* +* NOTE: The 9p 'proxy' backend is deprecated (since QEMU 8.1) and will be +* removed in a future version of QEMU! +*/ +#ifndef QEMU_9P_PROXY_H #define QEMU_9P_PROXY_H meson.build +1
-1@@ -4170,7 +4170,7 @@ if have_block summary_info += {'Block whitelist (ro)': get_option('block_drv_ro_whitelist')} summary_info += {'Use block whitelist in tools': get_option('block_drv_whitelist_in_tools')} summary_info += {'VirtFS (9P) support': have_virtfs} - summary_info += {'VirtFS (9P) Proxy Helper support': have_virtfs_proxy_helper} + summary_info += {'VirtFS (9P) Proxy Helper support (deprecated)': have_virtfs_proxy_helper} summary_info += {'Live block migration': config_host_data.get('CONFIG_LIVE_BLOCK_MIGRATION')} summary_info += {'replication support': config_host_data.get('CONFIG_REPLICATION')} summary_info += {'bochs support': get_option('bochs').allowed()}qemu-options.hx +5
-1@@ -1735,7 +1735,9 @@ SRST Accesses to the filesystem are done by QEMU. ``proxy`` - Accesses to the filesystem are done by virtfs-proxy-helper(1). + Accesses to the filesystem are done by virtfs-proxy-helper(1). This + option is deprecated (since QEMU 8.1) and will be removed in a future + version of QEMU. Use ``local`` instead. ``synth`` Synthetic filesystem, only used by QTests.@@ -1867,6 +1869,8 @@ SRST ``proxy`` Accesses to the filesystem are done by virtfs-proxy-helper(1). + This option is deprecated (since QEMU 8.1) and will be removed in a + future version of QEMU. Use ``local`` instead. ``synth`` Synthetic filesystem, only used by QTests.softmmu/vl.c +5
-0@@ -3102,6 +3102,11 @@ void qemu_init(int argc, char **argv)error_report ("Usage: -virtfs fsdriver,mount_tag=tag" );exit (1 ); } +if (strncmp (qemu_opt_get (opts,"fsdriver" ),"proxy" ,5 ) ==0 ) { +warn_report ("'-virtfs proxy' is deprecated, use " +"'-virtfs local' instead" ); + } + fsdev = qemu_opts_create(qemu_find_opts("fsdev"), qemu_opts_id(opts) ?: qemu_opt_get(opts, "mount_tag"),
Signature · 1 line
Greg
Quoted 6 lines · CEST Greg Kurz
Quoted 3 lines · On Wed, 21 Jun 2023 15:32:39 +0200 Christian Schoenebeck…
Quoted 2 lines · CEST Christian Schoenebeck
Quoted 1 line · CEST Christian Schoenebeck
As recent CVE-2023-2861 once again showed, the 9p 'proxy' fs driver is
in
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
bad shape. Using the 'proxy' backend was already discouraged for
safety
Quoted 11 lines
Quoted 7 lines
Quoted 4 lines
Quoted 4 lines
reasons before and we recommended to use the 'local' backend instead, but now it is time to officially deprecate the 'proxy' backend.
Signed-off-by Christian Schoenebeck <[email protected]>Ping
It seems you missed the review I posted last week :
#20230612165742.3333ea08@bahia
Oh, I never received your email. I'll check the logs what happened there.
I'll send a v4 with your suggestions, they make sense.
Do you want me to add your "for the records" comments as well in the deprecation notice?
Best regards,
Christian Schoenebeck
Quoted 21 lines · On Wed, 21 Jun 2023 16:16:46 +0200 Christian Schoenebeck…
Quoted 6 lines · CEST Greg Kurz
Quoted 3 lines · On Wed, 21 Jun 2023 15:32:39 +0200 Christian Schoenebeck…
Quoted 2 lines · CEST Christian Schoenebeck
Quoted 1 line · CEST Christian Schoenebeck
As recent CVE-2023-2861 once again showed, the 9p 'proxy' fs driver is
in
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
bad shape. Using the 'proxy' backend was already discouraged for
safety
Quoted 11 lines
Quoted 7 lines
Quoted 4 lines
Quoted 4 lines
reasons before and we recommended to use the 'local' backend instead, but now it is time to officially deprecate the 'proxy' backend.
Signed-off-by Christian Schoenebeck <[email protected]>Ping
It seems you missed the review I posted last week :
Quoted 9 lines
#20230612165742.3333ea08@bahia
Oh, I never received your email. I'll check the logs what happened there.
I'll send a v4 with your suggestions, they make sense.
Do you want me to add your "for the records" comments as well in the deprecation notice?
This was more targeting qemu-devel archives or git log, but feel free to provide relevant details in the deprecation notice.
I agree with Daniel that virtiofsd should also be mentioned as an alternative.
Quoted 4 lines
Best regards,
Christian Schoenebeck
Cheers,
Signature · 1 line
Greg
Quoted 23 lines · Christian Schoenebeck
Quoted 10 lines · CEST Christian Schoenebeck
As recent CVE-2023-2861 once again showed, the 9p 'proxy' fs driver is in bad shape. Using the 'proxy' backend was already discouraged for safety reasons before and we recommended to use the 'local' backend instead, but now it is time to officially deprecate the 'proxy' backend.
Signed-off-by Christian Schoenebeck <[email protected]>---
v2 -> v3:
* Fix copy wasted typo (-> 'backend').Quoted 11 lines
MAINTAINERS | 7 +++++++ docs/about/deprecated.rst | 17 +++++++++++++++++ docs/tools/virtfs-proxy-helper.rst | 3 +++ fsdev/qemu-fsdev.c | 5 +++++ fsdev/virtfs-proxy-helper.c | 5 +++++ hw/9pfs/9p-proxy.c | 5 +++++ hw/9pfs/9p-proxy.h | 5 +++++ meson.build | 2 +- qemu-options.hx | 6 +++++- softmmu/vl.c | 5 +++++ 10 files changed, 58 insertions(+), 2 deletions(-)
Quoted 2 lines
Or would it be better to split this up, e.g. into 3 separate patches (runtime messages, docs,
MAINTAINERS)?
In general we've tended to do deprecations all in one patch like you have here. I don't think there's compelling benefit to split the patch.
With regards,
Daniel
Signature · 3 lines
|: 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 :|
Quoted 6 lines · Christian Schoenebeck
+``-fsdev proxy`` and ``-virtfs proxy`` (since 8.1) +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
docs/about/deprecated.rst +4
-0+ +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.
docs/about/deprecated.rst the addition of volatile memory support, it is now necessary to distinguish · line 361
Quoted 10 lines
docs/about/deprecated.rst +10
-0+ +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
Signature · 3 lines
|: 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 :|
Quoted 26 lines · CEST Daniel P. Berrangé
Quoted 6 lines · Christian Schoenebeck
+``-fsdev proxy`` and ``-virtfs proxy`` (since 8.1) +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
docs/about/deprecated.rst +4
-0+ +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.docs/about/deprecated.rst the addition of volatile memory support, it is now necessary to distinguish · line 361
Quoted 10 lines
docs/about/deprecated.rst +10
-0+ +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.
Quoted 7 lines
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.
Depends. Some people just want to dump few files between host <-> guest, they should even be fine with unpriviliged 'passhthrough' security model with the 'local' backend.
For more complex use cases, you would probably transition to 'mapped' security model with the 'local' backend. That's like transitioning from one file system to another, mounting the two, copying over once, that's it.
Quoted 4 lines
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.
OK, I can add that to the deprecation doc, but you don't want that to be added to all the runtime warnings as well, do you?
Best regards,
Christian Schoenebeck
Quoted 43 lines · Christian Schoenebeck
Quoted 26 lines · CEST Daniel P. Berrangé
Quoted 6 lines · Christian Schoenebeck
+``-fsdev proxy`` and ``-virtfs proxy`` (since 8.1) +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
docs/about/deprecated.rst +4
-0+ +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.docs/about/deprecated.rst the addition of volatile memory support, it is now necessary to distinguish · line 361
Quoted 10 lines
docs/about/deprecated.rst +10
-0+ +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.
Quoted 7 lines
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.
Depends. Some people just want to dump few files between host <-> guest, they should even be fine with unpriviliged 'passhthrough' security model with the 'local' backend.
For more complex use cases, you would probably transition to 'mapped' security model with the 'local' backend. That's like transitioning from one file system to another, mounting the two, copying over once, that's it.
Quoted 7 lines
Quoted 4 lines
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.
OK, I can add that to the deprecation doc, but you don't want that to be added to all the runtime warnings as well, do you?
I'd suggest we could do mention it briefly as an option at rutime, eg
warn_report("'-virtfs proxy' is deprecated, use '-virtfs local' or virtiofs instead");
With regards,
Daniel
Signature · 3 lines
|: 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 :|
On Wednesday, June 21, 2023 5:28:33 PM CEST Daniel P. Berrangé wrote:
[...]
Quoted 11 lines
Quoted 7 lines
Quoted 4 lines
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.
OK, I can add that to the deprecation doc, but you don't want that to be added to all the runtime warnings as well, do you?
I'd suggest we could do mention it briefly as an option at rutime, eg
warn_report("'-virtfs proxy' is deprecated, use '-virtfs local' or virtiofs instead");
I asked because with what Greg already suggested, it starts to become a long runtime message, like:
"'-fsdev proxy' and '-virtfs proxy' are deprecated, use 'local' instead of
'proxy' or virtiofs"
And that's probably still ambiguous, becauses that might suggest people that they could simply s/-virtfs proxy/-virtfs virtiofs/.
Low care rate on my end though.
Best regards,
Christian Schoenebeck