Skip to content

Commit cfc4ca8

Browse files
committed
Merge tag 'uml-for-linux-6.16-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/uml/linux
Pull UML updates from Johannes Berg: "The only really new thing is the long-standing seccomp work (originally from 2021!). Wven if it still isn't enabled by default due to security concerns it can still be used e.g. for tests. - remove obsolete network transports - remove PCI IO port support - start adding seccomp-based process handling instead of ptrace" * tag 'uml-for-linux-6.16-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/uml/linux: (29 commits) um: remove "extern" from implementation of sigchld_handler um: fix unused variable warning um: fix SECCOMP 32bit xstate register restore um: pass FD for memory operations when needed um: Add SECCOMP support detection and initialization um: Implement kernel side of SECCOMP based process handling um: Track userspace children dying in SECCOMP mode um: Add helper functions to get/set state for SECCOMP um: Add stub side of SECCOMP/futex based process handling um: Move faultinfo extraction into userspace routine um: vector: Use mac_pton() for MAC address parsing um: vector: Clean up and modernize log messages um: chan_kern: use raw spinlock for irqs_to_free_lock MAINTAINERS: remove obsolete file entry in TUN/TAP DRIVER um: Fix tgkill compile error on old host OSes um: stop using PCI port I/O um: Remove legacy network transport infrastructure um: vector: Eliminate the dependency on uml_net um: Remove obsolete legacy network transports um/asm: Replace "REP; NOP" with PAUSE mnemonic ...
2 parents e9e668c + e56a50f commit cfc4ca8

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

80 files changed

+2679
-4357
lines changed

Documentation/virt/uml/user_mode_linux_howto_v2.rst

Lines changed: 7 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -147,18 +147,12 @@ The image hostname will be set to the same as the host on which you
147147
are creating its image. It is a good idea to change that to avoid
148148
"Oh, bummer, I rebooted the wrong machine".
149149

150-
UML supports two classes of network devices - the older uml_net ones
151-
which are scheduled for obsoletion. These are called ethX. It also
152-
supports the newer vector IO devices which are significantly faster
153-
and have support for some standard virtual network encapsulations like
154-
Ethernet over GRE and Ethernet over L2TPv3. These are called vec0.
150+
UML supports vector I/O high performance network devices which have
151+
support for some standard virtual network encapsulations like
152+
Ethernet over GRE and Ethernet over L2TPv3. These are called vecX.
155153

156-
Depending on which one is in use, ``/etc/network/interfaces`` will
157-
need entries like::
158-
159-
# legacy UML network devices
160-
auto eth0
161-
iface eth0 inet dhcp
154+
When vector network devices are in use, ``/etc/network/interfaces``
155+
will need entries like::
162156

163157
# vector UML network devices
164158
auto vec0
@@ -219,44 +213,23 @@ remote UML and other VM instances.
219213
+-----------+--------+------------------------------------+------------+
220214
| vde | vector | dep. on VDE VPN: Virt.Net Locator | varies |
221215
+-----------+--------+------------------------------------+------------+
222-
| tuntap | legacy | none | ~ 500Mbit |
223-
+-----------+--------+------------------------------------+------------+
224-
| daemon | legacy | none | ~ 450Mbit |
225-
+-----------+--------+------------------------------------+------------+
226-
| socket | legacy | none | ~ 450Mbit |
227-
+-----------+--------+------------------------------------+------------+
228-
| ethertap | legacy | obsolete | ~ 500Mbit |
229-
+-----------+--------+------------------------------------+------------+
230-
| vde | legacy | obsolete | ~ 500Mbit |
231-
+-----------+--------+------------------------------------+------------+
232216

233217
* All transports which have tso and checksum offloads can deliver speeds
234218
approaching 10G on TCP streams.
235219

236220
* All transports which have multi-packet rx and/or tx can deliver pps
237221
rates of up to 1Mps or more.
238222

239-
* All legacy transports are generally limited to ~600-700MBit and 0.05Mps.
240-
241223
* GRE and L2TPv3 allow connections to all of: local machine, remote
242224
machines, remote network devices and remote UML instances.
243225

244-
* Socket allows connections only between UML instances.
245-
246-
* Daemon and bess require running a local switch. This switch may be
247-
connected to the host as well.
248-
249226

250227
Network configuration privileges
251228
================================
252229

253230
The majority of the supported networking modes need ``root`` privileges.
254-
For example, in the legacy tuntap networking mode, users were required
255-
to be part of the group associated with the tunnel device.
256-
257-
For newer network drivers like the vector transports, ``root`` privilege
258-
is required to fire an ioctl to setup the tun interface and/or use
259-
raw sockets where needed.
231+
For example, for vector transports, ``root`` privilege is required to fire
232+
an ioctl to setup the tun interface and/or use raw sockets where needed.
260233

261234
This can be achieved by granting the user a particular capability instead
262235
of running UML as root. In case of vector transport, a user can add the
@@ -610,12 +583,6 @@ connect to a local area cloud (all the UML nodes using the same
610583
multicast address running on hosts in the same multicast domain (LAN)
611584
will be automagically connected together to a virtual LAN.
612585

613-
Configuring Legacy transports
614-
=============================
615-
616-
Legacy transports are now considered obsolete. Please use the vector
617-
versions.
618-
619586
***********
620587
Running UML
621588
***********

MAINTAINERS

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25156,13 +25156,12 @@ L: [email protected]
2515625156
S: Orphan
2515725157
F: drivers/net/ethernet/dec/tulip/
2515825158

25159-
TUN/TAP driver
25159+
TUN/TAP DRIVER
2516025160
M: Willem de Bruijn <[email protected]>
2516125161
M: Jason Wang <[email protected]>
2516225162
S: Maintained
2516325163
W: http://vtun.sourceforge.net/tun
2516425164
F: Documentation/networking/tuntap.rst
25165-
F: arch/um/os-Linux/drivers/
2516625165
F: drivers/net/tap.c
2516725166
F: drivers/net/tun*
2516825167

arch/um/Kconfig

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -52,13 +52,7 @@ config NO_IOMEM
5252
config UML_IOMEM_EMULATION
5353
bool
5454
select INDIRECT_IOMEM
55-
select HAS_IOPORT
5655
select GENERIC_PCI_IOMAP
57-
select GENERIC_IOMAP
58-
select NO_GENERIC_PCI_IOPORT_MAP
59-
60-
config NO_IOPORT_MAP
61-
def_bool !UML_IOMEM_EMULATION
6256

6357
config ISA
6458
bool

arch/um/configs/i386_defconfig

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -52,13 +52,6 @@ CONFIG_PACKET=y
5252
CONFIG_UNIX=y
5353
CONFIG_INET=y
5454
# CONFIG_IPV6 is not set
55-
CONFIG_UML_NET=y
56-
CONFIG_UML_NET_ETHERTAP=y
57-
CONFIG_UML_NET_TUNTAP=y
58-
CONFIG_UML_NET_SLIP=y
59-
CONFIG_UML_NET_DAEMON=y
60-
CONFIG_UML_NET_MCAST=y
61-
CONFIG_UML_NET_SLIRP=y
6255
CONFIG_EXT4_FS=y
6356
CONFIG_QUOTA=y
6457
CONFIG_AUTOFS_FS=m

arch/um/configs/x86_64_defconfig

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -51,13 +51,6 @@ CONFIG_PACKET=y
5151
CONFIG_UNIX=y
5252
CONFIG_INET=y
5353
# CONFIG_IPV6 is not set
54-
CONFIG_UML_NET=y
55-
CONFIG_UML_NET_ETHERTAP=y
56-
CONFIG_UML_NET_TUNTAP=y
57-
CONFIG_UML_NET_SLIP=y
58-
CONFIG_UML_NET_DAEMON=y
59-
CONFIG_UML_NET_MCAST=y
60-
CONFIG_UML_NET_SLIRP=y
6154
CONFIG_EXT4_FS=y
6255
CONFIG_QUOTA=y
6356
CONFIG_AUTOFS_FS=m

arch/um/drivers/Kconfig

Lines changed: 12 additions & 192 deletions
Original file line numberDiff line numberDiff line change
@@ -124,206 +124,18 @@ endmenu
124124
menu "UML Network Devices"
125125
depends on NET
126126

127-
# UML virtual driver
128-
config UML_NET
129-
bool "Virtual network device"
130-
help
131-
While the User-Mode port cannot directly talk to any physical
132-
hardware devices, this choice and the following transport options
133-
provide one or more virtual network devices through which the UML
134-
kernels can talk to each other, the host, and with the host's help,
135-
machines on the outside world.
136-
137-
For more information, including explanations of the networking and
138-
sample configurations, see
139-
<http://user-mode-linux.sourceforge.net/old/networking.html>.
140-
141-
If you'd like to be able to enable networking in the User-Mode
142-
linux environment, say Y; otherwise say N. Note that you must
143-
enable at least one of the following transport options to actually
144-
make use of UML networking.
145-
146-
config UML_NET_ETHERTAP
147-
bool "Ethertap transport (obsolete)"
148-
depends on UML_NET
149-
help
150-
The Ethertap User-Mode Linux network transport allows a single
151-
running UML to exchange packets with its host over one of the
152-
host's Ethertap devices, such as /dev/tap0. Additional running
153-
UMLs can use additional Ethertap devices, one per running UML.
154-
While the UML believes it's on a (multi-device, broadcast) virtual
155-
Ethernet network, it's in fact communicating over a point-to-point
156-
link with the host.
157-
158-
To use this, your host kernel must have support for Ethertap
159-
devices. Also, if your host kernel is 2.4.x, it must have
160-
CONFIG_NETLINK_DEV configured as Y or M.
161-
162-
For more information, see
163-
<http://user-mode-linux.sourceforge.net/old/networking.html> That site
164-
has examples of the UML command line to use to enable Ethertap
165-
networking.
166-
167-
NOTE: THIS TRANSPORT IS DEPRECATED AND WILL BE REMOVED SOON!!! Please
168-
migrate to UML_NET_VECTOR.
169-
170-
If unsure, say N.
171-
172-
config UML_NET_TUNTAP
173-
bool "TUN/TAP transport (obsolete)"
174-
depends on UML_NET
175-
help
176-
The UML TUN/TAP network transport allows a UML instance to exchange
177-
packets with the host over a TUN/TAP device. This option will only
178-
work with a 2.4 host, unless you've applied the TUN/TAP patch to
179-
your 2.2 host kernel.
180-
181-
To use this transport, your host kernel must have support for TUN/TAP
182-
devices, either built-in or as a module.
183-
184-
NOTE: THIS TRANSPORT IS DEPRECATED AND WILL BE REMOVED SOON!!! Please
185-
migrate to UML_NET_VECTOR.
186-
187-
If unsure, say N.
188-
189-
config UML_NET_SLIP
190-
bool "SLIP transport (obsolete)"
191-
depends on UML_NET
192-
help
193-
The slip User-Mode Linux network transport allows a running UML to
194-
network with its host over a point-to-point link. Unlike Ethertap,
195-
which can carry any Ethernet frame (and hence even non-IP packets),
196-
the slip transport can only carry IP packets.
197-
198-
To use this, your host must support slip devices.
199-
200-
For more information, see
201-
<http://user-mode-linux.sourceforge.net/old/networking.html>.
202-
has examples of the UML command line to use to enable slip
203-
networking, and details of a few quirks with it.
204-
205-
NOTE: THIS TRANSPORT IS DEPRECATED AND WILL BE REMOVED SOON!!! Please
206-
migrate to UML_NET_VECTOR.
207-
208-
If unsure, say N.
209-
210-
config UML_NET_DAEMON
211-
bool "Daemon transport (obsolete)"
212-
depends on UML_NET
213-
help
214-
This User-Mode Linux network transport allows one or more running
215-
UMLs on a single host to communicate with each other, but not to
216-
the host.
217-
218-
To use this form of networking, you'll need to run the UML
219-
networking daemon on the host.
220-
221-
For more information, see
222-
<http://user-mode-linux.sourceforge.net/old/networking.html> That site
223-
has examples of the UML command line to use to enable Daemon
224-
networking.
225-
226-
NOTE: THIS TRANSPORT IS DEPRECATED AND WILL BE REMOVED SOON!!! Please
227-
migrate to UML_NET_VECTOR.
228-
229-
If unsure, say N.
230-
231-
config UML_NET_DAEMON_DEFAULT_SOCK
232-
string "Default socket for daemon transport"
233-
default "/tmp/uml.ctl"
234-
depends on UML_NET_DAEMON
235-
help
236-
This option allows setting the default socket for the daemon
237-
transport, normally it defaults to /tmp/uml.ctl.
238-
239127
config UML_NET_VECTOR
240128
bool "Vector I/O high performance network devices"
241-
depends on UML_NET
242129
select MAY_HAVE_RUNTIME_DEPS
243130
help
244131
This User-Mode Linux network driver uses multi-message send
245132
and receive functions. The host running the UML guest must have
246133
a linux kernel version above 3.0 and a libc version > 2.13.
247-
This driver provides tap, raw, gre and l2tpv3 network transports
248-
with up to 4 times higher network throughput than the UML network
249-
drivers.
250-
251-
config UML_NET_VDE
252-
bool "VDE transport (obsolete)"
253-
depends on UML_NET
254-
depends on !MODVERSIONS
255-
select MAY_HAVE_RUNTIME_DEPS
256-
help
257-
This User-Mode Linux network transport allows one or more running
258-
UMLs on a single host to communicate with each other and also
259-
with the rest of the world using Virtual Distributed Ethernet,
260-
an improved fork of uml_switch.
134+
This driver provides tap, raw, gre and l2tpv3 network transports.
261135

262-
You must have libvdeplug installed in order to build the vde
263-
transport into UML.
264-
265-
To use this form of networking, you will need to run vde_switch
266-
on the host.
267-
268-
For more information, see <http://wiki.virtualsquare.org/>
269-
That site has a good overview of what VDE is and also examples
270-
of the UML command line to use to enable VDE networking.
271-
272-
NOTE: THIS TRANSPORT IS DEPRECATED AND WILL BE REMOVED SOON!!! Please
273-
migrate to UML_NET_VECTOR.
274-
275-
If unsure, say N.
276-
277-
config UML_NET_MCAST
278-
bool "Multicast transport (obsolete)"
279-
depends on UML_NET
280-
help
281-
This Multicast User-Mode Linux network transport allows multiple
282-
UMLs (even ones running on different host machines!) to talk to
283-
each other over a virtual ethernet network. However, it requires
284-
at least one UML with one of the other transports to act as a
285-
bridge if any of them need to be able to talk to their hosts or any
286-
other IP machines.
287-
288-
To use this, your host kernel(s) must support IP Multicasting.
289-
290-
For more information, see
291-
<http://user-mode-linux.sourceforge.net/old/networking.html> That site
292-
has examples of the UML command line to use to enable Multicast
293-
networking, and notes about the security of this approach.
294-
295-
NOTE: THIS TRANSPORT IS DEPRECATED AND WILL BE REMOVED SOON!!! Please
296-
migrate to UML_NET_VECTOR.
297-
298-
If unsure, say N.
299-
300-
config UML_NET_SLIRP
301-
bool "SLiRP transport (obsolete)"
302-
depends on UML_NET
303-
help
304-
The SLiRP User-Mode Linux network transport allows a running UML
305-
to network by invoking a program that can handle SLIP encapsulated
306-
packets. This is commonly (but not limited to) the application
307-
known as SLiRP, a program that can re-socket IP packets back onto
308-
he host on which it is run. Only IP packets are supported,
309-
unlike other network transports that can handle all Ethernet
310-
frames. In general, slirp allows the UML the same IP connectivity
311-
to the outside world that the host user is permitted, and unlike
312-
other transports, SLiRP works without the need of root level
313-
privileges, setuid binaries, or SLIP devices on the host. This
314-
also means not every type of connection is possible, but most
315-
situations can be accommodated with carefully crafted slirp
316-
commands that can be passed along as part of the network device's
317-
setup string. The effect of this transport on the UML is similar
318-
that of a host behind a firewall that masquerades all network
319-
connections passing through it (but is less secure).
320-
321-
NOTE: THIS TRANSPORT IS DEPRECATED AND WILL BE REMOVED SOON!!! Please
322-
migrate to UML_NET_VECTOR.
323-
324-
If unsure, say N.
325-
326-
Startup example: "eth0=slirp,FE:FD:01:02:03:04,/usr/local/bin/slirp"
136+
For more information, including explanations of the networking
137+
and sample configurations, see
138+
<file:Documentation/virt/uml/user_mode_linux_howto_v2.rst>.
327139

328140
endmenu
329141

@@ -367,3 +179,11 @@ config UML_PCI_OVER_VIRTIO_DEVICE_ID
367179
There's no official device ID assigned (yet), set the one you
368180
wish to use for experimentation here. The default of -1 is
369181
not valid and will cause the driver to fail at probe.
182+
183+
config UML_PCI_OVER_VFIO
184+
bool "Enable VFIO-based PCI passthrough"
185+
select UML_PCI
186+
help
187+
This driver provides support for VFIO-based PCI passthrough.
188+
Currently, only MSI-X capable devices are supported, and it
189+
is assumed that drivers will use MSI-X.

0 commit comments

Comments
 (0)