opnsense-src/usr.sbin
Mark Johnston 649a910e34 bhyve: Avoid holding /dev/pci open unnecessarily
Some device models, LPC in particular, will call pci_host_read_config()
when probing for devices.  Currently this results in pcifd_init()
opening /dev/pci, and thus bhyve holds the fd open even when it's not
needed.

Modify pci_host_{read,write}_config() to open /dev/pci independent of
the global pcifd.  This means that these routines can only be used
during VM initialization, as capsicum will prevent further opens
afterward.  Introduce internal wrappers which use the global pcifd,
intended for the passthru code.

Reviewed by:	jhb
MFC after:	3 weeks
Fixes:		563fd2240e ("bhyve: export funcs for read/write pci config")
Differential Revision:	https://reviews.freebsd.org/D48908
2025-02-14 15:25:08 +00:00
..
ac Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
accton Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
acpi acpidump(8): add const qualifier to the known tables array 2024-10-23 23:00:10 +03:00
adduser pw: set the user's home directory mode if it existed 2024-12-01 13:08:31 -06:00
apm Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
apmd Update Makefile.depend files 2024-10-14 10:26:17 -07:00
arp arp(8): Complete libxo transition 2024-10-13 02:21:45 +08:00
audit package: move OpenBSM auditing into its own package 2024-04-28 22:33:06 -06:00
auditd package: move OpenBSM auditing into its own package 2024-04-28 22:33:06 -06:00
auditdistd package: move OpenBSM auditing into its own package 2024-04-28 22:33:06 -06:00
auditreduce package: move OpenBSM auditing into its own package 2024-04-28 22:33:06 -06:00
authpf Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
autofs ports/filesystems: Fix fallout 2025-01-27 15:03:10 -05:00
bhyve bhyve: Avoid holding /dev/pci open unnecessarily 2025-02-14 15:25:08 +00:00
bhyvectl bhyvectl: Convert to use vm_openf() 2024-11-05 01:40:41 +00:00
bhyveload Update Makefile.depend files 2024-10-14 10:26:17 -07:00
binmiscctl manuals: Fix typos in -offset for .Bd and .Bl 2024-10-03 14:49:31 -03:00
blacklistctl Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
blacklistd Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
bluetooth iwmbtfw(8): fix getopt flags, unify usage()/manual page contents 2025-01-30 00:56:41 +03:00
boot0cfg Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
bootparamd Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
boottrace spdx: The BSD-2-Clause-FreeBSD identifier is obsolete, drop -FreeBSD 2023-05-12 10:44:03 -06:00
bsdconfig Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
bsdinstall bsdinstall: Switched back to amended single-button finalconfig 2025-02-04 17:27:00 +00:00
bsnmpd libbsnmptools: avoid uninitialized snmptoolctx->passwd with empty password 2025-01-10 21:08:02 -08:00
btxld Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
camdd Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
cdcontrol Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
certctl certctl: Set METALOG ownership to root:wheel 2025-01-17 16:41:02 -05:00
chkgrp Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
chown Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
chroot Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
ckdist Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
clear_locks Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
config config(5): Fix display of includeoptions 2025-02-10 21:05:26 -08:00
cpucontrol Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
crashinfo Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
cron Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
crunch Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
ctladm ctladm: Use nvlist instead of home-rolled name-value lists 2025-02-05 14:55:16 -05:00
ctld ctld: Fix parsing of text values for DSCP in UCL parser 2025-02-12 14:27:53 -05:00
cxgbetool cxgbetool.8: Consistently use .Cm for loader tunables 2024-12-10 15:34:10 -05:00
daemon daemon: tests: add a test for missed SIGTERM 2024-11-19 13:51:27 -06:00
dconschat dconschat: Increase WARNS to 2 2024-11-03 15:18:39 -05:00
devctl Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
devinfo devinfo.8: Bump Dd for addition of -v to -u mode 2025-01-29 15:36:36 -05:00
diskinfo Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
dumpcis Remove $FreeBSD$: two-line nroff pattern 2023-08-16 11:55:10 -06:00
editmap Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
edquota Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
efibootmgr manuals: Fix "unusual .Xr" warnings with a script 2024-10-15 17:18:14 -03:00
efidp Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
efitable Update Makefile.depend files 2024-10-14 10:26:17 -07:00
efivar Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
efiwake Update Makefile.depend files 2024-10-14 10:26:17 -07:00
etcupdate etcupdate: Restrict access to the conflicts directory 2025-01-28 14:23:06 +00:00
extattr Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
extattrctl Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
fdcontrol Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
fdformat Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
fdread Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
fdwrite fdwrite.c: initialize pointers to NULL and a few other cleanups 2024-04-11 12:24:36 -06:00
fifolog Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
flowctl Purge more stray embedded $FreeBSD$ strings 2023-09-25 07:54:56 -07:00
freebsd-update freebsd-update: improve pkgbase check 2024-11-02 15:24:39 -04:00
fstyp fstyp: search for file system headers with the largest offset first 2024-12-03 23:45:09 -09:00
ftp-proxy Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
fwcontrol fwcontrol: Allocate full fw_asyreq structures passed to the kernel 2024-07-19 13:09:32 -04:00
fwget fwget: Add needed firmware for Radeon 740M GPU 2025-01-12 12:50:13 +01:00
getfmac Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
getpmac Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
gpioctl Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
gssd gssd: use netlink(4) RPC service to talk to kernel GSS 2025-02-01 01:00:26 -08:00
gstat gstat: Sync usage/synopsis + tag SPDX 2025-02-03 10:06:59 -05:00
hyperv Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
i2c manuals: Remove trailing spaces 2024-11-04 11:26:14 -04:00
ifmcstat Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
inetd Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
iostat Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
iovctl Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
ip6addrctl ip6addrctl(8): Teach ip6addrctl to attach and run itself in a jail 2025-01-29 18:00:07 +08:00
ipfwpcap Remove $FreeBSD$: two-line nroff pattern 2023-08-16 11:55:10 -06:00
iscsid Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
jail jail: Let a couple of parameter types be specified as lists 2024-11-19 21:05:24 +00:00
jexec jail: only chdir to user's home directory when user is specified 2024-08-12 15:23:28 -07:00
jls jls: fix the -q option to put quotes around all whitespace 2025-02-13 07:48:18 -08:00
kbdcontrol kbdcontrol: correct bell frequency for vt(4) 2024-11-01 11:54:40 -04:00
kbdmap Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
kldxref libkldelf: add a private library for kernel/kld-related ELF parsing 2024-10-18 20:20:13 +00:00
lastlogin manuals: Fix "unusual .Xr" warnings with a script 2024-10-15 17:18:14 -03:00
lpr pac: Consistently use item count as the first argument to calloc 2025-01-03 10:44:27 -05:00
lptcontrol Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
mailstats Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
mailwrapper manuals: Fix "unusual .Xr" warnings with a script 2024-10-15 17:18:14 -03:00
makefs src: Use gnu17 as the default C standard for userland instead of gnu99 2025-02-11 09:16:25 -05:00
makemap Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
manctl Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
memcontrol Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
mfiutil manuals: Misc macro typos 2024-09-21 05:25:15 -06:00
mixer mixer: Fix a bogus free() call in the main loop 2024-10-23 22:12:45 +00:00
mld6query usr.sbin: Automated cleanup of cdefs and other formatting 2023-11-26 22:24:01 -07:00
mlx5tool manuals: Misc macro typos 2024-09-21 05:25:15 -06:00
mlxcontrol Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
mount_smbfs Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
mountd mountd: Promote missing netmask log to LOG_ERR 2025-02-04 11:58:41 -05:00
moused Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
mpsutil mpsutil: Clean up libutil deps 2024-01-24 17:10:24 -05:00
mptable Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
mptutil mptutil: Capture CAM errors from bus rescan 2025-02-04 20:54:26 -07:00
mtest Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
ndp ndp: Bring back the -A option for the netlink implementation 2024-11-01 00:32:14 +08:00
newsyslog newsyslog.conf(5): Remove duplicate word 2024-11-29 13:00:54 +08:00
nfscbd Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
nfsd nfsd.c: Synchronize error handling 2024-09-29 13:11:54 -07:00
nfsdumpstate Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
nfsrevoke Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
nfsuserd Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
ngctl usr.sbin: Automated cleanup of cdefs and other formatting 2023-11-26 22:24:01 -07:00
nghook Remove $FreeBSD$: two-line nroff pattern 2023-08-16 11:55:10 -06:00
nmtree Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
nologin Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
nscd Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
ntp ntp: Switch to upstream man pages 2024-11-11 19:10:04 -08:00
nvmfd nvmf: Switch several ioctls to using nvlists 2024-12-30 13:52:21 -05:00
nvram Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
ofwdump Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
pciconf pciconf(8): dump AMD IOMMU Base Capability 2024-04-10 08:28:24 +03:00
periodic periodic: set _localbase for periodic scripts from within periodic.conf 2025-01-21 22:14:41 +01:00
pkg pkg: Fix Coverity warnings 2025-01-16 16:45:15 +00:00
pmc pmc: Fix some problems with the makefile 2024-02-16 09:50:43 -05:00
pmcannotate pmcannotate: Add a '-m' mode option to control per-line annotations. 2025-01-14 10:39:53 -05:00
pmccontrol usr.sbin: Automated cleanup of cdefs and other formatting 2023-11-26 22:24:01 -07:00
pmcstat usr.sbin: Remove repeated words 2024-04-11 11:53:37 -06:00
pmcstudy Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
pnfsdscopymr Update Makefile.depend files 2024-10-14 10:26:17 -07:00
pnfsdsfile Update Makefile.depend files 2024-10-14 10:26:17 -07:00
pnfsdskill Update Makefile.depend files 2024-10-14 10:26:17 -07:00
pnpinfo Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
powerd powerd: use snl_get_genl_mcast_group() API 2025-01-15 23:20:57 -08:00
ppp man: Remove references to classful networks 2025-02-04 22:27:21 +01:00
pppctl Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
praliases Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
praudit praudit: correct test case 2024-11-04 08:57:13 -05:00
prometheus_sysctl_exporter Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
pstat Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
pw pw: tests: add a test for -M with a pre-existing home directory 2024-12-01 13:10:35 -06:00
pwd_mkdb manuals: Fix typos in -offset for .Bd and .Bl 2024-10-03 14:49:31 -03:00
pwm Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
quot Standardize the definition of a UFS dinode. 2025-01-27 17:39:45 -08:00
quotaon Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
rarpd Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
repquota Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
rip6query Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
rmt Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
route6d Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
rpc.lockd Add man page for nfslockd. 2024-05-10 11:23:13 +02:00
rpc.statd Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
rpc.tlsclntd rpcsec_tls: cleanup the rpctls_syscall() 2025-02-01 01:00:28 -08:00
rpc.tlsservd rpcsec_tls: cleanup the rpctls_syscall() 2025-02-01 01:00:28 -08:00
rpc.umntall Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
rpc.yppasswdd Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
rpc.ypupdated Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
rpc.ypxfrd Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
rpcbind rpcbind: run netlink(4) service 2025-02-01 01:00:26 -08:00
rrenumd Remove $FreeBSD$: two-line nroff pattern 2023-08-16 11:55:10 -06:00
rtadvctl rtadvctl: Use nitems(foo) instead of sizeof(foo)/sizeof(foo[0]) 2024-04-28 21:24:46 -06:00
rtadvd rtadvd(8): support PREF64 (RFC 8781) 2024-05-23 14:40:48 -06:00
rtprio Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
rtsold rtsold: Further usage message updates 2025-01-24 14:06:59 +00:00
rwhod Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
sa Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
sendmail Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
service manuals: Fix typos in -offset for .Bd and .Bl 2024-10-03 14:49:31 -03:00
services_mkdb services: fix typo ucp -> udp 2024-12-01 00:53:47 +03:00
sesutil sesutil(8): Complete libxo transition 2024-10-13 02:21:46 +08:00
setfib Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
setfmac Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
setpmac Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
smbmsg Remove $FreeBSD$: two-line nroff pattern 2023-08-16 11:55:10 -06:00
snapinfo man filesystems: fix xrefs after move to section 4 2024-05-16 10:25:29 -06:00
spi Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
spkrtest Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
spray Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
syslogd syslogd: Fix tests when if_epair is not loaded 2025-02-12 14:42:09 +00:00
sysrc Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
tcpdchk Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
tcpdmatch Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
tcpdrop usr.sbin: Automated cleanup of cdefs and other formatting 2023-11-26 22:24:01 -07:00
tcpdump tcpdump: Update to 4.99.5 2024-09-23 20:23:25 +01:00
tcpsso tcpsso: remove support for some IPPROTO_TCP-level socket option names 2024-08-30 09:32:50 +02:00
tests Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
traceroute tcp: extend the use of the th_flags accessor function 2024-11-29 09:48:23 +01:00
traceroute6 tcp: extend the use of the th_flags accessor function 2024-11-29 09:48:23 +01:00
trim Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
tzsetup tzsetup: correct timezone symlink target 2024-09-30 10:22:34 -04:00
uathload Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
uefisign Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
ugidfw Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
uhsoctl usr.sbin/uhsoctl: correct SIOCDIFADDR calls to use ifreq 2024-07-22 14:58:19 +00:00
unbound Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
usbconfig usbconfig: Use nitems(foo) instead of sizeof(foo)/sizeof(foo[0]) 2024-04-28 21:30:55 -06:00
usbdump Give usbdump a '-u' option for unbuffered output. 2024-10-21 11:21:05 +00:00
utx Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
valectl Update Makefile.depend files 2024-10-14 10:26:17 -07:00
vidcontrol Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
vigr Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
vipw Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
wake Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
watch Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
watchdogd Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
wlandebug Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
wpa wpa_supplicant: xref relevant wpa_passphrase(8) 2024-10-15 17:18:02 -03:00
yp_mkdb Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
ypbind Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
ypldap ypldap(8): Fix grammar in ypldap.c 2024-02-13 14:11:07 +08:00
yppoll Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
yppush Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
ypserv Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
ypset Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
zdump Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
zic Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
zonectl Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
zzz Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
Makefile Remove publickey(5) stuff 2025-01-22 18:04:26 +01:00
Makefile.aarch64 bhyvectl: Add arm64 bits and hook it up to the build 2024-05-01 08:33:23 -04:00
Makefile.amd64 Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
Makefile.i386 Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
Makefile.inc Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
Makefile.powerpc Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
Makefile.riscv bhyve/riscv: Initial import. 2024-10-31 20:24:12 +00:00