opnsense-src/sys/conf
Doug Rabson 1ca2f5d1f7 Add an implementation of the 9P filesystem
This is derived from swills@ fork of the Juniper virtfs with many
changes by me including bug fixes, style improvements, clearer layering
and more consistent logging. The filesystem is renamed to p9fs to better
reflect its function and to prevent possible future confusion with
virtio-fs.

Several updates and fixes from Juniper have been integrated into this
version by Val Packett and these contributions along with the original
Juniper authors are credited below.

To use this with bhyve, add 'virtio_p9fs_load=YES' to loader.conf. The
bhyve virtio-9p device allows access from the guest to files on the host
by mapping a 'sharename' to a host path. It is possible to use p9fs as a
root filesystem by adding this to /boot/loader.conf:

	vfs.root.mountfrom="p9fs:sharename"

for non-root filesystems add something like this to /etc/fstab:

	sharename /mnt p9fs rw 0 0

In both examples, substitute the share name used on the bhyve command
line.

The 9P filesystem protocol relies on stateful file opens which map
protocol-level FIDs to host file descriptors. The FreeBSD vnode
interface doesn't really support this and we use heuristics to guess the
right FID to use for file operations.  This can be confused by privilege
lowering and does not guarantee that the FID created for a given file
open is always used for file operations, even if the calling process is
using the file descriptor from the original open call. Improving this
would involve changes to the vnode interface which is out-of-scope for
this import.

Differential Revision: https://reviews.freebsd.org/D41844
Reviewed by: kib, emaste, dch
MFC after: 3 months
Co-authored-by: Val Packett <val@packett.cool>
Co-authored-by: Ka Ho Ng <kahon@juniper.net>
Co-authored-by: joyu <joyul@juniper.net>
Co-authored-by: Kumara Babu Narayanaswamy <bkumara@juniper.net>
2025-06-20 09:54:02 +02:00
..
config.mk sys: Remove $FreeBSD$: one-line sh pattern 2023-08-16 11:54:58 -06:00
dtb.build.mk sys: Remove $FreeBSD$: one-line sh pattern 2023-08-16 11:54:58 -06:00
dtb.mk sys: Remove $FreeBSD$: one-line sh pattern 2023-08-16 11:54:58 -06:00
files Add an implementation of the 9P filesystem 2025-06-20 09:54:02 +02:00
files.amd64 ice_ddp: Update to 1.3.41.0 2024-10-30 13:51:47 -07:00
files.arm dtrace: Avoid including dtrace_isa.c directly into dtrace.c 2024-08-08 15:53:50 +00:00
files.arm64 conf: Add acpi_pci.c to the arm64 build 2025-04-01 10:43:58 -07:00
files.i386 files.x86: Pull in some more duplicate lines from files.{amd64,i386} 2024-07-18 13:20:41 -04:00
files.powerpc zfs: enable FPU on powerpc* 2025-04-04 22:57:57 +02:00
files.riscv riscv: Convert local interrupt controller to a newbus PIC 2024-09-07 01:00:28 +01:00
files.x86 AMD IOMMU driver 2024-11-09 21:04:18 +02:00
kern.mk kern.mk: Update SSP comment (not limited to GCC) 2025-03-26 14:36:13 -04:00
kern.opts.mk Enable kernel reproducible builds on stable branch 2024-05-03 15:22:16 -07:00
kern.post.mk Add the BBR and RACK stacks to the LINT kernel. 2024-01-16 10:32:07 -08:00
kern.pre.mk LinuxKPI: always include linux/kconfig.h 2024-10-16 21:49:45 +00:00
kmod.mk LinuxKPI: always include linux/kconfig.h 2024-10-16 21:49:45 +00:00
kmod.opts.mk sys: Remove $FreeBSD$: one-line sh pattern 2023-08-16 11:54:58 -06:00
kmod_syms.awk sys: Remove $FreeBSD$: one-line sh pattern 2023-08-16 11:54:58 -06:00
kmod_syms_prefix.awk sys: Remove $FreeBSD$: one-line sh pattern 2023-08-16 11:54:58 -06:00
ldscript.amd64 kernel: Fix defining of .init_array and .fini_array sections 2024-09-22 22:45:36 +08:00
ldscript.arm arm: align data section to the supersection. 2024-12-08 11:36:38 +01:00
ldscript.arm64 kernel: Add defination of .init_array and .fini_array for all other platforms 2024-09-22 22:45:36 +08:00
ldscript.i386 kernel: Fix defining of .init_array and .fini_array sections 2024-09-22 22:45:36 +08:00
ldscript.kmod.amd64 sys: Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:11 -06:00
ldscript.kmod.i386 sys: Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:11 -06:00
ldscript.powerpc kernel: Add defination of .init_array and .fini_array for all other platforms 2024-09-22 22:45:36 +08:00
ldscript.powerpc64 kernel: Add defination of .init_array and .fini_array for all other platforms 2024-09-22 22:45:36 +08:00
ldscript.powerpc64le kernel: Add defination of .init_array and .fini_array for all other platforms 2024-09-22 22:45:36 +08:00
ldscript.powerpcspe kernel: Add defination of .init_array and .fini_array for all other platforms 2024-09-22 22:45:36 +08:00
ldscript.riscv kernel: Add defination of .init_array and .fini_array for all other platforms 2024-09-22 22:45:36 +08:00
Makefile.amd64 sys: Remove $FreeBSD$: one-line sh pattern 2023-08-16 11:54:58 -06:00
Makefile.arm arm: remove accidentally added -Map switch to linker 2025-05-05 00:02:29 -07:00
Makefile.arm64 arm: Improve the creation of kernel.bin 2025-05-05 00:01:44 -07:00
Makefile.i386 sys: Remove $FreeBSD$: one-line sh pattern 2023-08-16 11:54:58 -06:00
Makefile.powerpc sys: Remove $FreeBSD$: one-line sh pattern 2023-08-16 11:54:58 -06:00
Makefile.riscv sys: Remove $FreeBSD$: one-line sh pattern 2023-08-16 11:54:58 -06:00
newvers.sh Update in preparation for 14.3-RELEASE 2025-06-06 00:00:00 +00:00
NOTES mpi3mr: Broadcom's MPT-Fusion version 4 is amd64 and aarch64 only 2025-04-30 11:06:54 -06:00
options Add an implementation of the 9P filesystem 2025-06-20 09:54:02 +02:00
options.amd64 sys: Remove $FreeBSD$: one-line sh pattern 2023-08-16 11:54:58 -06:00
options.arm sys: Remove $FreeBSD$: one-line sh pattern 2023-08-16 11:54:58 -06:00
options.arm64 sys: Remove $FreeBSD$: one-line sh pattern 2023-08-16 11:54:58 -06:00
options.i386 i386: Use DEV_HYPERV to enable HyperV APIC vector 2024-07-18 13:31:50 -04:00
options.powerpc sys: Remove $FreeBSD$: one-line sh pattern 2023-08-16 11:54:58 -06:00
options.riscv sys: Remove $FreeBSD$: one-line sh pattern 2023-08-16 11:54:58 -06:00
std.debug sys: add conf/std.debug, generic debugging options 2024-10-09 10:44:35 +02:00
std.nodebug std.nodebug: remove DIAGNOSTIC from debug configs 2023-08-18 16:39:22 +03:00
sysent.mk sys: Remove $FreeBSD$: one-line sh pattern 2023-08-16 11:54:58 -06:00
systags.sh sys: Remove $FreeBSD$: one-line sh pattern 2023-08-16 11:54:58 -06:00
vdso_amd64.ldscript spdx: The BSD-2-Clause-FreeBSD identifier is obsolete, drop -FreeBSD 2023-05-12 10:44:03 -06:00
vdso_amd64_ia32.ldscript spdx: The BSD-2-Clause-FreeBSD identifier is obsolete, drop -FreeBSD 2023-05-12 10:44:03 -06:00
WITHOUT_SOURCELESS sys: Remove $FreeBSD$: one-line sh pattern 2023-08-16 11:54:58 -06:00
WITHOUT_SOURCELESS_HOST sys: Remove $FreeBSD$: one-line sh pattern 2023-08-16 11:54:58 -06:00
WITHOUT_SOURCELESS_UCODE sys: Remove $FreeBSD$: one-line sh pattern 2023-08-16 11:54:58 -06:00