opnsense-src/sys
Vincenzo Maffione e2a431a0ff netmap: fix copyin/copyout of nmreq options list
The previous code unsuccesfully attempted to report a precise error for
each option in the user list. Moreover, commit 253b2ec199 broke some
ctrl-api-test (see https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=260547).

With this patch we bail out as soon as an unrecoverable error is detected and
we properly check for copy boundaries. EOPNOTSUPP no longer immediately
returns an error, so that any other option in the list may be examined
by the caller code and a precise report of the (un)supported options can
be returned to the user.

With this patch, all ctrl-api-test unit tests pass again.

PR:			260547
Submitted by:		giuseppe.lettieri@unipi.it
Reviewed by:		vmaffione
MFC after:		14 days
2023-03-21 23:23:18 +00:00
..
amd64 acpi_wakeup.c: apply the reviewer' editorial corrections to the comment text. 2023-03-18 17:47:19 +02:00
arm pmap_mapdev_attr() doesn't use any of its arguments. 2023-03-20 23:09:34 -07:00
arm64 arm64: nexus code tidy-up 2023-03-20 17:35:47 -03:00
bsm
cam CTL: Allow userland supply tags via ioctl frontend. 2022-12-03 12:05:05 -05:00
cddl dtrace/powerpc: Remove accidental commented out line 2023-03-13 11:37:40 -04:00
compat linuxkpi: Define pat_enabled() 2023-03-21 23:36:40 +01:00
conf arm: Rename hdmi_if.m to crtc_if.m 2023-03-17 13:34:57 +01:00
contrib zfs: Use .section .rodata instead of .rodata on FreeBSD 2023-03-13 13:48:05 +00:00
crypto OpenSSL: Regen an assembly file for arm 2023-03-21 15:13:51 -04:00
ddb ddb: ansify 2023-02-08 00:09:23 +00:00
dev netmap: fix copyin/copyout of nmreq options list 2023-03-21 23:23:18 +00:00
dts arm64/rockchip: Remove rk3328-dwc3 overlays 2022-11-16 11:58:32 +01:00
fs Fix compilation issue, when DTRACE is not defined 2023-03-20 23:06:57 +03:00
gdb ddb: use _FLAGS command macros where appropriate 2022-07-05 11:56:55 -03:00
geom gvinum: correct assertions 2023-03-21 10:03:12 -04:00
gnu bwn: eliminate dead writes in BWN_GPL_PHY 2022-05-04 09:32:59 -04:00
i386 linux(4): Reduce code duplication between MD files 2023-03-04 12:11:38 +03:00
isa Adjust function definition in isa's pnp.c to avoid clang 15 warning 2022-07-27 21:13:59 +02:00
kern ktls: Fix interlocking between ktls_enable_rx() and listen(2) 2023-03-21 16:04:00 -04:00
kgssapi nfsd: Enable the NFSD_VNET vnet front end macros 2023-02-18 14:59:36 -08:00
libkern ashldi3: Use C89-style function definition 2022-11-27 13:23:25 -07:00
modules powerpc: enable ZFS on 32 bit powerpc/powerpcspe 2023-03-12 03:20:11 -03:00
net pf: distinguish forwarding and output cases for pf_refragment6() 2023-03-16 10:59:04 +01:00
net80211 net80211: make ieee80211_scan_dump_channels private 2023-03-14 22:17:03 +00:00
netgraph ng_atmllc: remove 2023-03-09 18:04:21 +00:00
netinet carp: use if_name() 2023-03-20 14:37:10 +01:00
netinet6 pf: distinguish forwarding and output cases for pf_refragment6() 2023-03-16 10:59:04 +01:00
netipsec ipsec: only update lastused when it changes 2023-02-16 07:33:51 +00:00
netlink netlink: reduce the default debugging levels 2023-03-21 18:55:00 +00:00
netpfil pfsync: fix pfsync_undefer_state() locking 2023-03-20 16:39:14 +01:00
netsmb smb_smb_treedisconnect: eliminate write only variable mbp 2022-04-04 22:30:57 -06:00
nfs Allow any user to read the NFS stats, for example with nfsstat(1). 2022-12-01 22:21:14 -07:00
nfsclient
nfsserver
nlm nlm: only access refcounts using dedicated primitives 2022-11-24 19:46:43 +00:00
ofed infiniband: Convert BPF handling for IfAPI 2023-03-14 15:51:32 -04:00
opencrypto Complete removal of opt_compat.h 2023-02-13 19:07:38 +03:00
powerpc powerpc/pmap: Account for a potential NULL pmap in pmap_sync_icache 2023-03-21 09:56:26 -04:00
riscv riscv: nexus code tidy-up 2023-03-20 17:35:47 -03:00
rpc svc_rpcsec_gss.c: Separate out the non-vnet initialization 2023-03-01 15:29:25 -08:00
security vfs: retire KERN_VNODE 2023-03-17 16:21:45 +00:00
sys kern_reboot(9): describe event handlers 2023-03-20 17:12:12 -03:00
teken teken: color #3 is yellow not brown - use TC_YELLOW as the name 2022-03-12 09:17:29 -05:00
tests
tools Improve debuggability of VOP_* locking assertions 2023-01-18 22:11:05 -06:00
ufs Fix syntax error in 0697670. 2023-03-18 17:03:32 -07:00
vm vm: consistently prefix fault helpers with vm_fault_ 2023-03-13 11:00:28 +00:00
x86 x86/pci_early_quirks: Support Intel 11th+ gen 2023-03-20 21:47:36 +01:00
xdr xdr: ansify 2023-02-13 18:37:31 +00:00
xen xen: bump used interface version 2023-03-09 17:13:17 +01:00
Makefile Remove dead code in the cscope target 2022-11-11 15:53:57 +00:00
README.md note that some arch independent code can live in dev (e.g. SMBios) 2023-03-03 01:54:07 -08:00

FreeBSD Kernel Source:

This directory contains the source files and build glue that make up the FreeBSD kernel and its modules, including both original and contributed software.

Kernel configuration files are located in the conf/ subdirectory of each architecture. GENERIC is the configuration used in release builds. NOTES contains documentation of all possible entries. LINT is a compile-only configuration used to maximize build coverage and detect regressions.

Source Roadmap:

Directory Description
amd64 AMD64 (64-bit x86) architecture support
arm 32-bit ARM architecture support
arm64 64-bit ARM (AArch64) architecture support
cam Common Access Method storage subsystem - cam(4) and ctl(4)
cddl CDDL-licensed optional sources such as DTrace
conf kernel build glue
compat Linux compatibility layer, FreeBSD 32-bit compatibility
contrib 3rd-party imported software such as OpenZFS
crypto crypto drivers
ddb interactive kernel debugger - ddb(4)
fs most filesystems, excluding UFS, NFS, and ZFS
dev device drivers and other arch independent code
gdb kernel remote GDB stub - gdb(4)
geom GEOM framework - geom(4)
i386 i386 (32-bit x86) architecture support
kern main part of the kernel
libkern libc-like and other support functions for kernel use
modules kernel module infrastructure
net core networking code
net80211 wireless networking (IEEE 802.11) - net80211(4)
netgraph graph-based networking subsystem - netgraph(4)
netinet IPv4 protocol implementation - inet(4)
netinet6 IPv6 protocol implementation - inet6(4)
netipsec IPsec protocol implementation - ipsec(4)
netpfil packet filters - ipfw(4), pf(4), and ipfilter(4)
opencrypto OpenCrypto framework - crypto(7)
powerpc PowerPC/POWER (32 and 64-bit) architecture support
riscv 64-bit RISC-V architecture support
security security facilities - audit(4) and mac(4)
sys kernel headers
tests kernel unit tests
ufs Unix File System - ffs(7)
vm virtual memory system
x86 code shared by AMD64 and i386 architectures