Skip to content

Commit 97c81ef

Browse files
committed
Merge tag 'pull-9p-20230706' of https://github.com/cschoenebeck/qemu into staging
Administrative changes only: * Deprecate 9p 'proxy' backend. * Raise status of 9p to 'Maintained'. # -----BEGIN PGP SIGNATURE----- # # iQJLBAABCgA1FiEEltjREM96+AhPiFkBNMK1h2Wkc5UFAmSmkAsXHHFlbXVfb3Nz # QGNydWRlYnl0ZS5jb20ACgkQNMK1h2Wkc5We1xAAol+HbhQ2zNCJUbZ2/WY3Jf0H # K86DRQIs6w6UkL9msFz+id+tR5i50HoJ3+RnOKvy/fPqO8Rv6mb0d9r+bIG1JJCc # ubHP91x/nyDbP0XbLMtmtCz/T4g67E11Qqriq7lH1bPF7ccU3iXHZNup9HARjOoE # SQo9x4e7IDi1WdmM2vjvRXCh4ZLIlBv7c+2vAeP4V7FhJhDkL+1y+w6aCFw0xpd8 # lto3Egnhz6pk7+SJfQwCl3rfozHhCxlNmcNa+7vqckVFpdJrvtKOQB4cn9yVDPr/ # WjmYoB2J3MwYuZz+qAkdRJ6dUTLJb87YqJJe6lcKq0lqjiFBk7TccvIN9WgyJQd/ # eLUPCCyo98g9RCaPzjLc4MgbpCPCmqJkg8A1vJzykvq51BqJZcdkwfJ7LFmsvTSo # IfR1Seq4OUUzTZ2gWh8wJBNcPpAbilHzQnumxBEupe0Dg/pwoQWCywTYJN6Yf/6+ # PzcK39bVFKrEyc4Z1Y/yXvAzD7nX8X78kSHvxYYEQfzruLIVQjUUQ7Mp3TiJvljk # mLdcYqavjawgC2zmZU4L2Lx4Su7iVIkhNWj57WkfooSzLrAjueYQIJEltAt8Qmn6 # x3+u3xI/myNKujMpaqgTAU5Gk2J2UApshq5Zwe8HpnVwWoxS3QetXdA/f4AXwZOk # TpnKPYQa7edPLSSAbAs= # =GzjR # -----END PGP SIGNATURE----- # gpg: Signature made Thu 06 Jul 2023 10:57:31 AM BST # gpg: using RSA key 96D8D110CF7AF8084F88590134C2B58765A47395 # gpg: issuer "[email protected]" # gpg: Good signature from "Christian Schoenebeck <[email protected]>" [unknown] # gpg: WARNING: This key is not certified with a trusted signature! # gpg: There is no indication that the signature belongs to the owner. # Primary key fingerprint: ECAB 1A45 4014 1413 BA38 4926 30DB 47C3 A012 D5F4 # Subkey fingerprint: 96D8 D110 CF7A F808 4F88 5901 34C2 B587 65A4 7395 * tag 'pull-9p-20230706' of https://github.com/cschoenebeck/qemu: MAINTAINERS: raise status of 9p to 'Maintained' 9pfs: deprecate 'proxy' backend Signed-off-by: Richard Henderson <[email protected]>
2 parents 822cb97 + 3548fa0 commit 97c81ef

File tree

9 files changed

+68
-4
lines changed

9 files changed

+68
-4
lines changed

MAINTAINERS

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2120,17 +2120,24 @@ F: include/sysemu/balloon.h
21202120
virtio-9p
21212121
M: Greg Kurz <[email protected]>
21222122
M: Christian Schoenebeck <[email protected]>
2123-
S: Odd Fixes
2123+
S: Maintained
21242124
W: https://wiki.qemu.org/Documentation/9p
21252125
F: hw/9pfs/
21262126
X: hw/9pfs/xen-9p*
2127+
X: hw/9pfs/9p-proxy*
21272128
F: fsdev/
2128-
F: docs/tools/virtfs-proxy-helper.rst
2129+
X: fsdev/virtfs-proxy-helper.c
21292130
F: tests/qtest/virtio-9p-test.c
21302131
F: tests/qtest/libqos/virtio-9p*
21312132
T: git https://gitlab.com/gkurz/qemu.git 9p-next
21322133
T: git https://github.com/cschoenebeck/qemu.git 9p.next
21332134

2135+
virtio-9p-proxy
2136+
F: hw/9pfs/9p-proxy*
2137+
F: fsdev/virtfs-proxy-helper.c
2138+
F: docs/tools/virtfs-proxy-helper.rst
2139+
S: Obsolete
2140+
21342141
virtio-blk
21352142
M: Stefan Hajnoczi <[email protected]>
21362143

docs/about/deprecated.rst

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -343,6 +343,29 @@ the addition of volatile memory support, it is now necessary to distinguish
343343
between persistent and volatile memory backends. As such, memdev is deprecated
344344
in favor of persistent-memdev.
345345

346+
``-fsdev proxy`` and ``-virtfs proxy`` (since 8.1)
347+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
348+
349+
The 9p ``proxy`` filesystem backend driver has been deprecated and will be
350+
removed (along with its proxy helper daemon) in a future version of QEMU. Please
351+
use ``-fsdev local`` or ``-virtfs local`` for using the 9p ``local`` filesystem
352+
backend, or alternatively consider deploying virtiofsd instead.
353+
354+
The 9p ``proxy`` backend was originally developed as an alternative to the 9p
355+
``local`` backend. The idea was to enhance security by dispatching actual low
356+
level filesystem operations from 9p server (QEMU process) over to a separate
357+
process (the virtfs-proxy-helper binary). However this alternative never gained
358+
momentum. The proxy backend is much slower than the local backend, hasn't seen
359+
any development in years, and showed to be less secure, especially due to the
360+
fact that its helper daemon must be run as root, whereas with the local backend
361+
QEMU is typically run as unprivileged user and allows to tighten behaviour by
362+
mapping permissions et al by using its 'mapped' security model option.
363+
364+
Nowadays it would make sense to reimplement the ``proxy`` backend by using
365+
QEMU's ``vhost`` feature, which would eliminate the high latency costs under
366+
which the 9p ``proxy`` backend currently suffers. However as of to date nobody
367+
has indicated plans for such kind of reimplemention unfortunately.
368+
346369

347370
Block device options
348371
''''''''''''''''''''

docs/tools/virtfs-proxy-helper.rst

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,9 @@ Synopsis
99
Description
1010
-----------
1111

12+
NOTE: The 9p 'proxy' backend is deprecated (since QEMU 8.1) and will be
13+
removed, along with this daemon, in a future version of QEMU!
14+
1215
Pass-through security model in QEMU 9p server needs root privilege to do
1316
few file operations (like chown, chmod to any mode/uid:gid). There are two
1417
issues in pass-through security model:

fsdev/qemu-fsdev.c

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,14 @@ int qemu_fsdev_add(QemuOpts *opts, Error **errp)
133133
}
134134

135135
if (fsdriver) {
136+
if (strncmp(fsdriver, "proxy", 5) == 0) {
137+
warn_report(
138+
"'-fsdev proxy' and '-virtfs proxy' are deprecated, use "
139+
"'local' instead of 'proxy, or consider deploying virtiofsd "
140+
"as alternative to 9p"
141+
);
142+
}
143+
136144
for (i = 0; i < ARRAY_SIZE(FsDrivers); i++) {
137145
if (strcmp(FsDrivers[i].name, fsdriver) == 0) {
138146
break;

fsdev/virtfs-proxy-helper.c

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,11 @@
99
* the COPYING file in the top-level directory.
1010
*/
1111

12+
/*
13+
* NOTE: The 9p 'proxy' backend is deprecated (since QEMU 8.1) and will be
14+
* removed in a future version of QEMU!
15+
*/
16+
1217
#include "qemu/osdep.h"
1318
#include <glib/gstdio.h>
1419
#include <sys/resource.h>
@@ -1057,6 +1062,10 @@ int main(int argc, char **argv)
10571062
struct statfs st_fs;
10581063
#endif
10591064

1065+
fprintf(stderr, "NOTE: The 9p 'proxy' backend is deprecated (since "
1066+
"QEMU 8.1) and will be removed in a future version of "
1067+
"QEMU!\n");
1068+
10601069
prog_name = g_path_get_basename(argv[0]);
10611070

10621071
is_daemon = true;

hw/9pfs/9p-proxy.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,11 @@
1515
* https://wiki.qemu.org/Documentation/9p
1616
*/
1717

18+
/*
19+
* NOTE: The 9p 'proxy' backend is deprecated (since QEMU 8.1) and will be
20+
* removed in a future version of QEMU!
21+
*/
22+
1823
#include "qemu/osdep.h"
1924
#include <sys/socket.h>
2025
#include <sys/un.h>

hw/9pfs/9p-proxy.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,11 @@
1010
* the COPYING file in the top-level directory.
1111
*/
1212

13+
/*
14+
* NOTE: The 9p 'proxy' backend is deprecated (since QEMU 8.1) and will be
15+
* removed in a future version of QEMU!
16+
*/
17+
1318
#ifndef QEMU_9P_PROXY_H
1419
#define QEMU_9P_PROXY_H
1520

meson.build

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4179,7 +4179,7 @@ if have_block
41794179
summary_info += {'Block whitelist (ro)': get_option('block_drv_ro_whitelist')}
41804180
summary_info += {'Use block whitelist in tools': get_option('block_drv_whitelist_in_tools')}
41814181
summary_info += {'VirtFS (9P) support': have_virtfs}
4182-
summary_info += {'VirtFS (9P) Proxy Helper support': have_virtfs_proxy_helper}
4182+
summary_info += {'VirtFS (9P) Proxy Helper support (deprecated)': have_virtfs_proxy_helper}
41834183
summary_info += {'Live block migration': config_host_data.get('CONFIG_LIVE_BLOCK_MIGRATION')}
41844184
summary_info += {'replication support': config_host_data.get('CONFIG_REPLICATION')}
41854185
summary_info += {'bochs support': get_option('bochs').allowed()}

qemu-options.hx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1735,7 +1735,9 @@ SRST
17351735
Accesses to the filesystem are done by QEMU.
17361736

17371737
``proxy``
1738-
Accesses to the filesystem are done by virtfs-proxy-helper(1).
1738+
Accesses to the filesystem are done by virtfs-proxy-helper(1). This
1739+
option is deprecated (since QEMU 8.1) and will be removed in a future
1740+
version of QEMU. Use ``local`` instead.
17391741

17401742
``synth``
17411743
Synthetic filesystem, only used by QTests.
@@ -1867,6 +1869,8 @@ SRST
18671869

18681870
``proxy``
18691871
Accesses to the filesystem are done by virtfs-proxy-helper(1).
1872+
This option is deprecated (since QEMU 8.1) and will be removed in a
1873+
future version of QEMU. Use ``local`` instead.
18701874

18711875
``synth``
18721876
Synthetic filesystem, only used by QTests.

0 commit comments

Comments
 (0)