freebsd-dev/sys
Kyle Evans 251a32b5b2 tun/tap: merge and rename to tuntap
tun(4) and tap(4) share the same general management interface and have a lot
in common. Bugs exist in tap(4) that have been fixed in tun(4), and
vice-versa. Let's reduce the maintenance requirements by merging them
together and using flags to differentiate between the three interface types
(tun, tap, vmnet).

This fixes a couple of tap(4)/vmnet(4) issues right out of the gate:
- tap devices may no longer be destroyed while they're open [0]
- VIMAGE issues already addressed in tun by kp

[0] emaste had removed an easy-panic-button in r240938 due to devdrn
blocking. A naive glance over this leads me to believe that this isn't quite
complete -- destroy_devl will only block while executing d_* functions, but
doesn't block the device from being destroyed while a process has it open.
The latter is the intent of the condvar in tun, so this is "fixed" (for
certain definitions of the word -- it wasn't really broken in tap, it just
wasn't quite ideal).

ifconfig(8) also grew the ability to map an interface name to a kld, so
that `ifconfig {tun,tap}0` can continue to autoload the correct module, and
`ifconfig vmnet0 create` will now autoload the correct module. This is a
low overhead addition.

(MFC commentary)

This may get MFC'd if many bugs in tun(4)/tap(4) are discovered after this,
and how critical they are. Changes after this are likely easily MFC'd
without taking this merge, but the merge will be easier.

I have no plans to do this MFC as of now.

Reviewed by:	bcr (manpages), tuexen (testing, syzkaller/packetdrill)
Input also from:	melifaro
Relnotes:	yes
Differential Revision:	https://reviews.freebsd.org/D20044
2019-05-08 02:32:11 +00:00
..
amd64 tun/tap: merge and rename to tuntap 2019-05-08 02:32:11 +00:00
arm tun/tap: merge and rename to tuntap 2019-05-08 02:32:11 +00:00
arm64 tun/tap: merge and rename to tuntap 2019-05-08 02:32:11 +00:00
bsm Create new EINTEGRITY error with message "Integrity check failed". 2019-01-17 06:35:45 +00:00
cam Drop periph lock around cam_periph_unmapmem(). 2019-05-06 19:08:03 +00:00
cddl Add mutex_destroy() missed in r334844. 2019-04-26 19:02:21 +00:00
compat make sysent after r347228 2019-05-07 18:10:21 +00:00
conf tun/tap: merge and rename to tuntap 2019-05-08 02:32:11 +00:00
contrib Left justify a function header brace as it should be. 2019-04-28 04:05:43 +00:00
crypto Embedded chacha: Add 0-bit iv + 128-bit counter mode 2019-03-01 23:30:23 +00:00
ddb ddb: Print the thread's pcb in 'show thread' 2019-02-09 21:08:19 +00:00
dev random: x86 driver: Prefer RDSEED over RDRAND when available 2019-05-08 00:45:16 +00:00
dts arm64: Add support for NanoPI NEO2 2019-05-02 12:56:13 +00:00
fs Do not flush NFS node from NFS VOP_SET_TEXT(). 2019-05-06 08:49:43 +00:00
gdb
geom List-ify kernel dump device configuration 2019-05-06 18:24:07 +00:00
gnu Import DTS files from Linux 5.0 2019-04-10 18:15:36 +00:00
i386 tun/tap: merge and rename to tuntap 2019-05-08 02:32:11 +00:00
isa
kern make sysent after r347228 2019-05-07 18:10:21 +00:00
kgssapi * Handle SIGPIPE in gssd 2019-02-21 01:30:37 +00:00
libkern Revert r346410 and r346411 2019-04-19 22:08:17 +00:00
mips tun/tap: merge and rename to tuntap 2019-05-08 02:32:11 +00:00
modules tun/tap: merge and rename to tuntap 2019-05-08 02:32:11 +00:00
net tun/tap: merge and rename to tuntap 2019-05-08 02:32:11 +00:00
net80211 net80211: correct check for SMPS node flags updates 2019-03-18 02:40:22 +00:00
netgraph Remove 'dir' argument in ng_ipfw_input, since ip_fw_args now has this info. 2019-03-14 22:30:05 +00:00
netinet List-ify kernel dump device configuration 2019-05-06 18:24:07 +00:00
netinet6 Track TCP connection's NUMA domain in the inpcb 2019-04-25 15:37:28 +00:00
netipsec Replace read_random(9) with more appropriate arc4rand(9) KPIs 2019-04-04 01:02:50 +00:00
netpfil Add IPv6 support for O_IPLEN opcode. 2019-04-29 09:33:16 +00:00
netsmb Remove unused argument to priv_check_cred. 2018-12-11 19:32:16 +00:00
nfs
nfsclient
nfsserver
nlm
ofed Mechanical cleanup of epoch(9) usage in network stack. 2019-01-09 01:11:19 +00:00
opencrypto Don't panic for empty CCM requests. 2019-04-24 23:27:39 +00:00
powerpc tun/tap: merge and rename to tuntap 2019-05-08 02:32:11 +00:00
riscv tun/tap: merge and rename to tuntap 2019-05-08 02:32:11 +00:00
rpc Fix malloc stats for the RPCSEC_GSS server code when DEBUG is enabled. 2019-04-04 01:23:06 +00:00
security When MAC is enabled and a policy module is loaded, don't unconditionally 2019-05-03 20:38:43 +00:00
sparc64 tun/tap: merge and rename to tuntap 2019-05-08 02:32:11 +00:00
sys make sysent after r347228 2019-05-07 18:10:21 +00:00
teken Attempt to complete fixing programmable function keys for syscons. 2019-02-20 02:14:41 +00:00
tests Regularize the Netflix copyright 2019-02-04 21:28:25 +00:00
tools Use @generated tag in generated files 2019-05-07 13:04:26 +00:00
ufs Ensure that error is initialized in ufs_bmap_seekdata(). 2019-05-05 16:57:03 +00:00
vm Noted by: alc 2019-05-06 08:46:11 +00:00
x86 amd64: fix BUS_SPACE_MAXSIZE to 64bit max value. 2019-05-07 01:18:57 +00:00
xdr
xen xen: introduce a new way to setup event channel upcall 2019-01-30 11:34:52 +00:00
Makefile