freebsd-nq/lib
Mark Johnston 3e9b4532d1 libvmmapi: Provide an interface for limiting rights on the device fd
Currently libvmmapi provides a way to get a list of the allowed ioctls
on the vmm device file, so that bhyve can limit rights on the device
file fd.  The interface is rather strange: it allocates a copy of the
list but returns a const pointer, so the caller has to cast away the
const in order to free it without aggravating the compiler.

As far as I can see, there's no reason to make a copy of the array, but
changing vm_get_ioctls() to not do that would break compatibility.  So
this change just introduces a better interface: move all rights-limiting
logic into libvmmapi.

Any new operations on the fd should be wrapped by libvmmapi, so also
discourage use of vm_get_device_fd().  Currently bhyve uses it only when
limiting rights on the device fd.

No functional change intended.

Reviewed by:	jhb
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D37098
2022-10-24 17:33:13 -04:00
..
atf Do not build libatf-c++ when WITHOUT_CXX 2021-10-29 10:08:24 -04:00
clang Revert "Avoid using TARGET_ARCH in llvm.build.mk" 2022-10-13 22:04:47 -05:00
csu Revert "csu: test: explicitly add libm as build parameter" 2022-07-28 11:23:26 -03:00
flua flua: Fix a typo in a source code comment 2022-09-15 10:25:54 +02:00
geom Add information on how to load gmirror on boot to auto activate mirrors 2022-10-05 16:44:31 +00:00
googletest googletest: Silence warnings about deprecated implicit copy constructors 2021-08-26 22:06:53 +02:00
lib9p lib9p: fix building on systems without capser 2021-01-04 20:48:48 +01:00
lib80211 lib80211: Start adding 11ac ETSI bits to regdomain.xml 2021-03-18 11:09:10 +00:00
libalias Rename NO_WERROR -> MK_WERROR=no 2021-01-07 09:31:03 +00:00
libarchive libarchive: fix zstd compression support 2022-04-08 10:11:25 +02:00
libauditd
libbe bectl: push space-in-name check down into libbe 2022-04-02 21:04:31 -05:00
libbearssl Revert that! 2020-07-19 23:56:19 +00:00
libbegemot libbegemot: Disable -Wuse-after-free. 2022-10-03 16:10:43 -07:00
libblacklist
libblocksruntime
libbluetooth bluetooth: Remove one more h4 reference. 2021-09-29 22:02:25 -06:00
libbsddialog contrib/bsddialog: Import version 0.4 2022-09-25 15:09:16 +02:00
libbsdstat
libbsm
libbsnmp pkgbase: Put the mibs and defs in the bnsmp package 2021-06-19 17:50:03 +02:00
libbz2
libc libc: Make elf_aux_info() return an error if AT_USRSTACK* is undefined 2022-10-18 18:11:26 -04:00
libc_nonshared
libc++ Apply libc++ fix for <ranges> not compiling at all 2022-05-14 13:46:39 +02:00
libc++experimental Merge llvm-project release/13.x llvmorg-13.0.0-rc1-97-g23ba3732246a 2021-11-13 21:42:03 +01:00
libcalendar
libcam cam_get_device: resolve path links before parsing device name 2022-01-26 11:25:31 +02:00
libcapsicum Add missing FreeBSD functions to -legacy when building on macOS/Linux 2020-08-25 13:23:31 +00:00
libcasper cap_netdb: Fix description style 2022-09-29 19:51:42 +02:00
libcbor Add libcbor to the build 2021-10-15 15:10:24 -04:00
libclang_rt libclang_rt: Trim a few more MIPSisms. 2022-06-30 10:02:37 -07:00
libcom_err pkgbase: Create a FreeBSD-kerberos package 2021-09-07 10:23:14 +02:00
libcompat
libcompiler_rt Build compiler-rt against libunwind, not libcxxrt 2022-03-09 22:23:35 +01:00
libcrypt libcrypt: Drop inclusion of libutil.h 2021-12-07 00:24:19 +00:00
libcuse cuse(3): Make some clarifications in the manual page. 2022-07-20 10:41:11 +02:00
libcxxrt Sort SRCS in libcxxrt's Makefile, and use += to list sources 2022-01-22 21:08:55 +01:00
libdevctl libdevctl: Add devctl_getpath 2022-03-01 08:06:41 -07:00
libdevdctl Fix race in case of device destruction. 2021-04-13 11:25:27 -04:00
libdevinfo devinfo: add man page links 2020-08-04 21:09:36 +00:00
libdevstat
libdl libc: include rtld.h into static implementations of rtld interface 2021-04-09 23:46:24 +03:00
libdpv Indicate the port where the referenced man pages come from. 2022-08-16 20:57:30 +02:00
libdwarf libdwarf: Add a weak uncompress() symbol 2021-12-13 18:47:15 -05:00
libedit libedit: Disable -Wuse-after-free for chartype.c. 2022-10-03 16:10:43 -07:00
libefivar libefivar: Fix a buffer overread. 2022-10-03 16:10:44 -07:00
libelf libelf: Link gelf_getchdr.3 to the build 2021-11-29 13:57:24 -05:00
libelftc
libevent1
libexecinfo
libexpat MFV 66082b6c88: libbsdxml (expat) 2.4.9 2022-09-21 00:02:38 -07:00
libfetch libfetch: Use memcpy in place of an odd strncpy. 2022-10-03 16:10:43 -07:00
libfido2 Add libfido2 to the build 2021-10-22 19:57:57 -04:00
libfigpar
libgcc_eh Merge llvm-project release/14.x llvmorg-14-init-18315-g190be5457c90 2022-05-14 13:45:25 +02:00
libgcc_s Export _Unwind_Complete and _Unwind_VRS_Pop from arm's libgcc_s 2022-04-27 11:04:10 +02:00
libgeom Reference correct section for free(3). 2022-09-17 13:12:44 +02:00
libgpio
libgssapi pkgbase: split kerberos binaries and libs 2022-08-03 11:02:28 +01:00
libiconv_modules libiconv VIQR: Fix a use after free. 2022-10-03 16:10:43 -07:00
libifconfig libifconfig: Correct some typos in source code comments 2022-09-04 12:53:58 +02:00
libipsec ipsec(4): Fix a typo in a source code comment 2022-06-04 12:28:20 +02:00
libipt
libiscsiutil iscsi: per-session timeouts and rapid teardown of session on reconnect 2022-02-25 10:35:47 +01:00
libjail
libkiconv libkiconv: address memory leak in not-found cases 2021-04-22 19:32:34 -04:00
libkvm kvm_close(3): Check kd->sparse_map != NULL before munmap 2022-10-16 16:49:16 +00:00
libldns ldns: Disable -Warray-parameter warnings from GCC 12 on sha2.c. 2022-09-28 14:02:30 -07:00
liblua contrib/lua: update to 5.4.2 2021-01-13 23:56:18 -06:00
liblutok
liblzma Install working pkgconfig .pc files for compat libraries 2022-08-11 23:18:34 +01:00
libmagic file: upgrade to 5.43. 2022-09-24 19:16:39 -07:00
libmd src.conf: Introduce WITHOUT_MACHDEP knob. 2022-09-09 09:54:28 +03:00
libmemstat sys/bitset.h: reduce visibility of BIT_* macros 2021-12-05 23:00:25 +01:00
libmilter
libmixer mixer.4 and mixer.8: Fix mandoc -Tlint errors. 2022-03-20 20:21:03 +01:00
libmp
libmt mt(3): Fix a typo in the manual page 2022-04-06 18:41:08 +02:00
libnetbsd libnetbsd: Fix a typo in a source code comment 2022-04-02 14:53:56 +02:00
libnetgraph Retire synchronous PPP kernel driver sppp(4). 2021-10-22 11:41:36 -07:00
libnetmap libnetmap: reset errno in nmreq_register_decode() 2021-04-02 14:31:57 +00:00
libngatm
libnv libnv: bump library version 2022-07-22 00:23:08 +02:00
libomp Merge llvm-project release/14.x llvmorg-14-init-18315-g190be5457c90 2022-05-14 13:45:25 +02:00
libopenbsd Only set WARNS if not defined 2020-09-11 13:28:37 +00:00
libopencsd Update opencsd to 0.14.2 2020-06-17 10:42:20 +00:00
libpam Put OPIE to rest. 2022-10-02 03:37:29 +02:00
libpathconv libpathconv: bump man page dates 2022-08-09 10:05:31 +02:00
libpcap
libpe
libpfctl pf: use time_to for timestamps 2022-10-05 17:52:27 +02:00
libpjdlog
libpmc pmc.sandybridge(3): Fix a few EVENT_ vs Event inconsistencies 2022-10-11 00:50:58 +01:00
libpmcstat libpmcstat: Fix a few ARM-specific issues with function symbols. 2022-03-10 15:39:53 -08:00
libproc libproc: retire now-unused MIPS support 2022-10-17 14:17:25 -04:00
libprocstat libprocstat: forward declare struct kinfo_proc 2022-08-26 23:20:32 +01:00
libradius libradius: fix WITHOUT_OPENSSL build 2021-10-28 17:05:53 -04:00
libregex pkgbase: Put more binaries/lib in runtime 2021-12-21 10:17:27 +01:00
librpcsec_gss Correct a typo in man page references: rpcset_gss -> rpcsec_gss. 2022-09-16 22:38:42 +02:00
librpcsvc pkgbase: Put more binaries/lib in runtime 2021-12-21 10:17:27 +01:00
librss
librt Fix aio_readv(2), aio_writev(2) with SIGEV_THREAD. 2021-08-22 23:49:23 +12:00
librtld_db librtld_db: Handle shlibs with discontiguous mappings. 2021-12-03 11:07:30 -08:00
libsbuf Do a sweep and remove most WARNS=6 settings 2020-10-01 01:10:51 +00:00
libsdp
libsecureboot Add -S option to veriexec 2022-07-19 08:59:53 -07:00
libsm Merge sendmail 8.16.1 to HEAD: See contrib/sendmail/RELEASE_NOTES for details 2020-07-15 18:28:54 +00:00
libsmb
libsmdb Merge sendmail 8.16.1 to HEAD: See contrib/sendmail/RELEASE_NOTES for details 2020-07-15 18:28:54 +00:00
libsmutil
libsqlite3 [PowerPC64LE] Pass our byte order to the sqlite3 build. 2020-09-23 02:17:44 +00:00
libssp
libssp_nonshared
libstats
libstdbuf
libstdthreads
libsysdecode Put OPIE to rest. 2022-10-02 03:37:29 +02:00
libtacplus
libtelnet
libthr libthr: extract code to get main stack base and size into helpers 2022-09-16 23:24:12 +03:00
libthread_db mips: Remove thread_db support 2021-12-31 00:14:53 -07:00
libucl Only set WARNS if not defined 2020-09-11 13:28:37 +00:00
libufs Move the ability to search for alternate UFS superblocks from fsck_ffs(8) 2022-08-13 12:43:40 -07:00
libugidfw
libulog
libunbound unbound: Reapply Vendor import 1.17.0 2022-10-16 14:08:33 -07:00
libusb libusb(3): Implement libusb_interrupt_event_handler() by exposing existing function. 2022-10-02 17:32:59 +02:00
libusbhid usbhid(3): Fix a typo in the manual page 2022-06-04 19:54:25 +02:00
libutil libutil: Fix mandoc warnings 2022-08-07 16:30:24 +02:00
libveriexec
libvgl
libvmmapi libvmmapi: Provide an interface for limiting rights on the device fd 2022-10-24 17:33:13 -04:00
libwrap pkgbase: Put more binaries/lib in runtime 2021-12-21 10:17:27 +01:00
libxo add blank line between variables (testing git commit) 2021-08-04 16:56:55 -04:00
liby
libypclnt pkgbase: Put more binaries/lib in runtime 2021-12-21 10:17:27 +01:00
libz Install working pkgconfig .pc files for compat libraries 2022-08-11 23:18:34 +01:00
libzstd Disable clang 14 warning about bitwise operators in zstd 2022-02-08 21:46:08 +01:00
msun msun: correct comment 2022-09-19 21:40:07 +03:00
ncurses Install working pkgconfig .pc files for compat libraries 2022-08-11 23:18:34 +01:00
ofed libirdma: Drop clang-specific -ferror-limit. 2022-10-03 16:10:42 -07:00
tests
Makefile Put OPIE to rest. 2022-10-02 03:37:29 +02:00
Makefile.inc build: provide a default WARNS for all in-tree builds 2020-09-18 17:17:46 +00:00