1
0
mirror of https://github.com/openbsd/src.git synced 2025-01-10 06:47:55 -08:00
openbsd-src/regress
dv 3c817da7c9 vmm(4)/vmd(8): switch to anonymous shared mappings.
While splitting out emulated virtio network and block devices into
separate processes, I originally used named mappings via shm_mkstemp(3).
While this functionally achieved the desired result, it had two
unintended consequences:

1) tearing down a vm process and its child processes required
excessive locking as the guest memory was tied into the VFS layer.

2) it was observed by mlarkin@ that actions in other parts of the
VFS layer could cause some of the guest memory to flush to storage,
possibly filling /tmp.

This commit adds a new vmm(4) ioctl dedicated to allowing a process
request the kernel share a mapping of guest memory into its own vm
space. This requires an open fd to /dev/vmm (requiring root) and
both the "vmm" and "proc" pledge(2) promises. In addition, the caller
must know enough about the original memory ranges to reconstruct them
to make the vm's ranges.

Tested with help from Mischa Peters.

ok mlarkin@
2023-05-13 23:15:28 +00:00
..
bin Cope with recent changes to alignment of command column. 2023-03-09 06:22:40 +00:00
etc Bring this regress into nicer shape. Add all recent architectures. 2021-09-27 18:27:14 +00:00
gnu Add subdir gnu/lib to regress. 2022-03-23 22:34:51 +00:00
include
lib Assert that test->want != NULL at this point 2023-05-13 07:17:32 +00:00
libexec Treat symlinks better in $ORIGIN determination in ld.so 2023-04-09 23:41:47 +00:00
misc Print skipped on non applicable architectures. 2022-12-08 12:14:11 +00:00
sbin remove duplicate includes 2023-04-19 12:58:15 +00:00
sys vmm(4)/vmd(8): switch to anonymous shared mappings. 2023-05-13 23:15:28 +00:00
usr.bin test ChrootDirectory in Match block 2023-05-12 06:37:42 +00:00
usr.sbin Make rpki-client choose the verification time of the time it is invoked 2023-04-27 08:37:53 +00:00
Makefile