diff options
Diffstat (limited to 'share/man')
124 files changed, 2154 insertions, 837 deletions
diff --git a/share/man/man3/snl.3 b/share/man/man3/snl.3 index 9a6eceb66a32..04bae46691bf 100644 --- a/share/man/man3/snl.3 +++ b/share/man/man3/snl.3 @@ -288,7 +288,7 @@ main(int ac, char *argv[]) struct nl_parsed_link link = {}; if (!snl_parse_nlmsg(&ss, hdr, &link_parser, &link)) continue; - printf("Link#%u %s mtu %u\n", link.ifi_index, link.ifla_ifname, link.ifla_mtu); + printf("Link#%u %s mtu %u\en", link.ifi_index, link.ifla_ifname, link.ifla_mtu); } return (0); diff --git a/share/man/man4/Makefile b/share/man/man4/Makefile index f93610631bb3..e94e832a3f94 100644 --- a/share/man/man4/Makefile +++ b/share/man/man4/Makefile @@ -1,13 +1,16 @@ .include <src.opts.mk> MANGROUPS= MAN -MANPACKAGE= kernel +MANPACKAGE= kernel-man # If you add a new file here, please consider adding an entry to the # hardware notes template (website/archetypes/release/hardware.adoc in # the doc repository); otherwise the automatically generated hardware # notes will not include your driver. +# If you enable a driver for a different architecture, please remember +# to update the arch specifier in the document title of the manual. + MAN= aac.4 \ aacraid.4 \ acpi.4 \ @@ -66,6 +69,12 @@ MAN= aac.4 \ audit.4 \ auditpipe.4 \ aue.4 \ + ${_aw_gpio.4} \ + ${_aw_mmc.4} \ + ${_aw_rtc.4} \ + ${_aw_sid.4} \ + ${_aw_spi.4} \ + ${_aw_syscon.4} \ axe.4 \ axge.4 \ axp.4 \ @@ -586,6 +595,7 @@ MAN= aac.4 \ tdfx.4 \ termios.4 \ textdump.4 \ + thunderbolt.4 \ ti.4 \ timecounters.4 \ tmpfs.4 \ @@ -594,6 +604,7 @@ MAN= aac.4 \ tty.4 \ tun.4 \ tws.4 \ + u2f.4 \ udp.4 \ udplite.4 \ ${_ufshci.4} \ @@ -957,6 +968,12 @@ _vmx.4= vmx.4 .if ${MACHINE_CPUARCH} == "arm" || ${MACHINE_CPUARCH} == "aarch64" || \ ${MACHINE_CPUARCH} == "riscv" +_aw_gpio.4= aw_gpio.4 +_aw_mmc.4= aw_mmc.4 +_aw_rtc.4= aw_rtc.4 +_aw_sid.4= aw_sid.4 +_aw_spi.4= aw_spi.4 +_aw_syscon.4= aw_syscon.4 _cgem.4= cgem.4 MLINKS+=cgem.4 if_cgem.4 .endif @@ -1061,6 +1078,7 @@ MAN+= \ ucom.4 \ ucycom.4 \ udav.4 \ + udbc.4 \ udbp.4 \ udl.4 \ uep.4 \ diff --git a/share/man/man4/aac.4 b/share/man/man4/aac.4 index 7a7d0350dcdb..f4b431cc6b4f 100644 --- a/share/man/man4/aac.4 +++ b/share/man/man4/aac.4 @@ -1,3 +1,6 @@ +.\" +.\" SPDX-License-Identifier: BSD-2-Clause +.\" .\" Copyright (c) 2000 Scott Long .\" All rights reserved. .\" @@ -21,7 +24,7 @@ .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. -.Dd July 10, 2009 +.Dd September 29, 2025 .Dt AAC 4 .Os .Sh NAME @@ -83,9 +86,10 @@ Linux-compatible interface for the management device will be enabled and will allow Linux-based management applications to control the card. .Sh HARDWARE -Controllers supported by the +The .Nm -driver include: +driver supports the following Parallel SCSI, SATA, and 3G SAS +RAID controllers from the Adaptec AAC family: .Pp .Bl -bullet -compact .It diff --git a/share/man/man4/aacraid.4 b/share/man/man4/aacraid.4 index 3bf683ac40c8..0f64f36c493a 100644 --- a/share/man/man4/aacraid.4 +++ b/share/man/man4/aacraid.4 @@ -1,3 +1,6 @@ +.\" +.\" SPDX-License-Identifier: BSD-2-Clause +.\" .\" Copyright (c) 2013 Achim Leubner .\" All rights reserved. .\" @@ -21,12 +24,12 @@ .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. -.Dd June 19, 2015 +.Dd September 29, 2025 .Dt AACRAID 4 .Os .Sh NAME .Nm aacraid -.Nd Adaptec AACRAID Controller driver +.Nd Adaptec Series 6/7/8 6G and 12G SAS+SATA RAID controller driver .Sh SYNOPSIS To compile this driver into the kernel, place the following lines in your @@ -78,9 +81,10 @@ Linux-compatible interface for the management device will be enabled and will allow Linux-based management applications to control the card. .Sh HARDWARE -Controllers supported by the +The .Nm -driver include: +driver supports the following +Adaptec 6G and 12G SAS/SATA RAID controllers: .Pp .Bl -bullet -compact .It diff --git a/share/man/man4/ahc.4 b/share/man/man4/ahc.4 index 38712c1f08b6..72a1e092f1bc 100644 --- a/share/man/man4/ahc.4 +++ b/share/man/man4/ahc.4 @@ -1,4 +1,6 @@ .\" +.\" SPDX-License-Identifier: BSD-3-Clause +.\" .\" Copyright (c) 1995, 1996, 1997, 1998, 2000 .\" Justin T. Gibbs. All rights reserved. .\" @@ -24,7 +26,7 @@ .\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF .\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. .\" -.Dd February 15, 2017 +.Dd September 29, 2025 .Dt AHC 4 .Os .Sh NAME @@ -172,11 +174,7 @@ adapter, defaults to enabled (0 -- disabled, 1 -- enabled). .Sh HARDWARE The .Nm -driver supports the following -.Tn SCSI -host adapter chips and -.Tn SCSI -controller cards: +driver supports the following VL/ISA/PCI parallel SCSI controllers and cards: .Pp .Bl -bullet -compact .It diff --git a/share/man/man4/ahd.4 b/share/man/man4/ahd.4 index c173a8cef619..7fa08c12b5b5 100644 --- a/share/man/man4/ahd.4 +++ b/share/man/man4/ahd.4 @@ -1,4 +1,6 @@ .\" +.\" SPDX-License-Identifer: BSD-3-Clause +.\" .\" Copyright (c) 1995, 1996, 1997, 1998, 2000 .\" Justin T. Gibbs. All rights reserved. .\" Copyright (c) 2002 @@ -26,7 +28,7 @@ .\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF .\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. .\" -.Dd July 4, 2004 +.Dd September 29, 2025 .Dt AHD 4 .Os .Sh NAME @@ -132,7 +134,7 @@ A hint to define whether the SCSI target mode is enabled (0 -- disabled, 1 -- en .Sh HARDWARE The .Nm -driver supports the following: +driver supports the following PCI/PCI-X parallel SCSI controllers: .Pp .Bl -bullet -compact .It diff --git a/share/man/man4/ata.4 b/share/man/man4/ata.4 index feea1dd3cc85..29b6bbef6838 100644 --- a/share/man/man4/ata.4 +++ b/share/man/man4/ata.4 @@ -155,7 +155,9 @@ The .Va hw.ata.ata_dma_check_80pin tunable can be set to 0 to disable this check. .Sh HARDWARE -The currently supported ATA/SATA controller chips are: +The +.Nm +driver supports the IDE interface on the following ATA/SATA controllers: .Pp .Bl -tag -width "Silicon Image:" -compact .It Acard: diff --git a/share/man/man4/man4.arm/aw_gpio.4 b/share/man/man4/aw_gpio.4 index 5cbc7562d9bd..5cbc7562d9bd 100644 --- a/share/man/man4/man4.arm/aw_gpio.4 +++ b/share/man/man4/aw_gpio.4 diff --git a/share/man/man4/man4.arm/aw_mmc.4 b/share/man/man4/aw_mmc.4 index eb7fc9ce020a..072835cce7c0 100644 --- a/share/man/man4/man4.arm/aw_mmc.4 +++ b/share/man/man4/aw_mmc.4 @@ -22,7 +22,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd Dec 25, 2017 +.Dd October 20, 2025 .Dt AW_MMC 4 .Os .Sh NAME @@ -48,6 +48,8 @@ allwinner,sun5i-a13-mmc allwinner,sun7i-a20-mmc .It allwinner,sun50i-a64-mmc +.It +allwinner,sun20i-d1-mmc .El .Sh SYSCTL VARIABLES The following read-only variables are available via diff --git a/share/man/man4/man4.arm/aw_rtc.4 b/share/man/man4/aw_rtc.4 index 1296cd41da68..1296cd41da68 100644 --- a/share/man/man4/man4.arm/aw_rtc.4 +++ b/share/man/man4/aw_rtc.4 diff --git a/share/man/man4/man4.arm/aw_sid.4 b/share/man/man4/aw_sid.4 index 5cd2f3d5e072..5cd2f3d5e072 100644 --- a/share/man/man4/man4.arm/aw_sid.4 +++ b/share/man/man4/aw_sid.4 diff --git a/share/man/man4/man4.arm/aw_spi.4 b/share/man/man4/aw_spi.4 index f8985e1c16bb..f8985e1c16bb 100644 --- a/share/man/man4/man4.arm/aw_spi.4 +++ b/share/man/man4/aw_spi.4 diff --git a/share/man/man4/man4.arm/aw_syscon.4 b/share/man/man4/aw_syscon.4 index e32f329e489a..e32f329e489a 100644 --- a/share/man/man4/man4.arm/aw_syscon.4 +++ b/share/man/man4/aw_syscon.4 diff --git a/share/man/man4/blackhole.4 b/share/man/man4/blackhole.4 index bb955fd4497d..777a38eedc86 100644 --- a/share/man/man4/blackhole.4 +++ b/share/man/man4/blackhole.4 @@ -10,15 +10,12 @@ .\" notice, this list of conditions and the following disclaimer in the .\" documentation and/or other materials provided with the distribution. .\" -.Dd May 25, 2024 +.Dd September 24, 2025 .Dt BLACKHOLE 4 .Os .Sh NAME .Nm blackhole -.Nd a -.Xr sysctl 8 -MIB for manipulating behaviour in respect of refused SCTP, TCP, or UDP connection -attempts +.Nd quietly drop refused SCTP, TCP, or UDP packets .Sh SYNOPSIS .Cd sysctl net.inet.sctp.blackhole Ns Op = Ns Brq "0 | 1 | 2" .Cd sysctl net.inet.tcp.blackhole Ns Op = Ns Brq "0 | 1 | 2 | 3" diff --git a/share/man/man4/bridge.4 b/share/man/man4/bridge.4 index 7048df4593bf..3af952256d3a 100644 --- a/share/man/man4/bridge.4 +++ b/share/man/man4/bridge.4 @@ -36,7 +36,7 @@ .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE .\" POSSIBILITY OF SUCH DAMAGE. .\" -.Dd July 28, 2025 +.Dd October 13, 2025 .Dt IF_BRIDGE 4 .Os .Sh NAME @@ -272,53 +272,149 @@ by setting the node using .Xr sysctl 8 . .Sh VLAN SUPPORT -The +Virtual LANs (VLANs), defined in the IEEE 802.1Q standard, allow traffic +on a bridge to be segregated into separate logical networks which cannot +communicate with each other. +For example, two interfaces in VLAN 10 would be able to communicate +with each other, but not with another interface in VLAN 20. +.Pp +Each VLAN is identified by a number between 1 and 4094 inclusive. +By default, all traffic on the bridge is assigned to "VLAN 0", +a pseudo-VLAN used for historical compatibility. +When VLANs are in use on a bridge, it is recommended to explicitly +assign all traffic to a VLAN rather than using VLAN 0. +.Pp +The bridge implements Independent VLAN Learning (IVL), meaning that +host addresses are learned separately for each VLAN, and the same host +address may exist on several different ports in different VLANs. +.Pp +If a +.Xr vlan 4 +interface is configured on an interface which is also an .Nm -driver has full support for virtual LANs (VLANs). -The bridge implements independent VLAN learning, i.e. MAC addresses are -learned on a per-VLAN basis, and the same MAC address may be learned on -multiple interfaces on different VLANs. -Incoming frames with an 802.1Q tag will be assigned to the appropriate -VLAN. -.Pp -Traffic sent to or from the host is not assigned to a VLAN by default. -To allow the host to communicate on a VLAN, configure a +member interface, all tagged frames will be processed by the .Xr vlan 4 -interface on the bridge and (if necessary) assign IP addresses there. -.Pp -By default no access control is enabled, so any interface may -participate in any VLAN. -.Pp -VLAN filtering may be enabled on a bridge using the +interface and will not be visible to the bridge. +This configuration is not recommended and may be unsupported in a +future release. +.Ss Tagged and untagged traffic +Incoming frames on a member interface may be either tagged or untagged. +Tagged frames contain an 802.1Q header indicating which VLAN the +frame belongs to, while untagged frames do not. +When a tagged frame is received, the frame is automatically assigned to +the VLAN in the tag (subject to any configured VLAN access list), +while untagged frames are assigned to the interface's configured +Port VLAN ID (PVID), or to VLAN 0 if no PVID is configured. +.Ss Assigning interfaces to VLANs +An interface's PVID may be configured using the .Xr ifconfig 8 -.Cm vlanfilter -option. -When VLAN filtering is enabled, an interface may only send and receive -frames based on its configured VLAN access list. +.Cm ifuntagged +command: +.Bd -literal -offset indent +ifconfig bridge0 ifuntagged ix0 10 +.Ed .Pp -The interface's untagged VLAN ID may be configured using the -.Xr ifconfig 8 +Or by using the .Cm untagged -option. -If an untagged VLAN ID is configured, incoming frames will be assigned -to that VLAN, and the interface may receive outgoing untagged frames -in that VLAN. -.Pp -The tagged VLAN access list may be configured using the -.Cm tagged , -.Cm +tagged -and -.Cm -tagged -options to -.Xr ifconfig 8 . -An interface may send and receive tagged frames for any VLAN in its -access list. +option to +.Cm addm : +.Bd -literal -offset indent +ifconfig bridge0 addm ix0 untagged 10 +.Ed .Pp -The bridge will automatically insert or remove 802.1q tags as needed, -based on the interface configuration, when forwarding frames between -interfaces. -This tag processing is only done for interfaces with VLAN filtering -enabled. +This will assign all untagged traffic received on the interface to the +specified VLAN, and any traffic transmitted on the interface in this +VLAN will have its VLAN tag (if present) removed. +Conversely, any traffic transmitted on the interface in a different +VLAN will have a tag added, to allow the remote system to assign the +traffic to the appropriate VLAN. +.Ss Host communication in a VLAN +Sometimes it is useful to allow the host itself to communicate in a VLAN, +for example to provide routing to other hosts in the VLAN. +To do this, create a +.Xr vlan 4 +interface on top of the +.Nm +interface with the appropriate VLAN tag. +For example, to allow the host to communicate in VLAN 10: +.Bd -literal -offset indent +ifconfig bridge0.10 create inet6 2001:db8::1/64 +.Ed +.Ss Configuring the VLAN access list (VLAN filtering) +For historical reasons, the default +.Nm +configuration allows all interfaces to send tagged traffic for any VLAN, +meaning that VLANs do not provide security separation. +To restrict which interfaces may communicate in which VLANs, +enable VLAN filtering on the bridge: +.Bd -literal -offset indent +ifconfig bridge0 vlanfilter +.Ed +.Pp +This has the following effects on bridge members: +.Bl -bullet -offset indent +.It +No untagged frames will be accepted from a member interface unless +the interface has a PVID configured. +.It +No tagged frames will be accepted from a member interface unless +the VLAN identifier is present in the interface's VLAN access list. +.It +Frames with stacked tags (Q-in-Q) will not be accepted from a +member interface unless the +.Cm qinq +option (see below) has been configured for that member. +.El +.Pp +To configure the VLAN access list, use the +.Xr ifconfig 8 +.Cm iftagged , +.Cm +iftagged +or +.Cm -iftagged +commands. +For example, to allow an interface to communicate in VLANs 10, 20, +and any VLAN from 100 to 199: +.Bd -literal -offset indent +ifconfig bridge0 iftagged ix0 10,20,100-199 +.Ed +.Ss IEEE 802.1ad (Q-in-Q) configuration +IEEE 802.1ad, also called Q-in-Q or +.Dq tag stacking , +allows a single Ethernet frame to contain multiple tags. +This allows one Ethernet network to transport traffic between endpoints +using its own VLAN tags without interfering with any pre-existing tags, +and is often used in service provider networks to provide +.Dq virtual wire +Ethernet services. +.Pp +When VLAN filtering is enabled, +.Nm +does not permit member interfaces to send Q-in-Q frames, because in +certain configuration this allows +.Dq VLAN-hopping +attacks on the bridge. +For example, consider a bridge with port ix0 configured as a tagged +port in VLAN 10, and port ix1 configured as untagged in VLAN 10 and +tagged in VLAN 20. +If ix0 is allowed to send Q-in-Q frames, then it can send a frame with +two tags: one for VLAN 10, followed by one for VLAN 20. +When the bridge forwards the frame to ix1, it will strip the VLAN tag +for VLAN 10, then forward the frame to ix1 with the tag for VLAN 20 +intact, effectively allowing ix1 to send traffic on VLAN 20 even +though the bridge configuration should not permit that. +.Pp +To permit an interface to send Q-in-Q frames, set the +.Xr ifconfig 8 +.Cm qinq +flag on the interface. +This is only required on the interface which will send Q-in-Q frames, +not the interface receiving the frames. +.Pp +Alternatively, set the +.Cm defqinq +flag on the bridge itself to enable Q-in-Q for all newly-added +interfaces by default. .Sh PACKET FILTERING Packet filtering can be used with any firewall package that hooks in via the .Xr pfil 9 @@ -537,6 +633,36 @@ ifconfig_wlan0="up ssid my_ap mode 11g" ifconfig_fxp0="up" .Ed .Pp +The following will cause a bridge to be created with two VLANs, +10 and 20, where the +.Dq Li em +interfaces can only communicate in their assigned VLANs, +while +.Dq Li ix0 +is a trunk port which can communicate in either VLAN: +.Bd -literal -offset indent +cloned_interfaces="bridge0" +ifconfig_bridge0="vlanfilter \e + addm em0 untagged 10 \e + addm em1 untagged 10 \e + addm em2 untagged 20 \e + addm em3 untagged 20 \e + addm ix0 tagged 10,20" +ifconfig_em0="up" +ifconfig_em1="up" +ifconfig_em2="up" +ifconfig_em3="up" +ifconfig_ix0="up" +.Ed +.Pp +The previous example could be extended to allow the host to +communicate in VLANs 10 and 20: +.Bd -literal -offset indent +vlans_bridge0="10 20" +ifconfig_bridge0_10_ipv6="inet6 2001:db8:0:10::1/64" +ifconfig_bridge0_20_ipv6="inet6 2001:db8:0:20::1/64" +.Ed +.Pp Consider a system with two 4-port Ethernet boards. The following will cause a bridge consisting of all 8 ports with Rapid Spanning Tree enabled to be created: diff --git a/share/man/man4/cdceem.4 b/share/man/man4/cdceem.4 index 6d8caf53cc02..c2a282027241 100644 --- a/share/man/man4/cdceem.4 +++ b/share/man/man4/cdceem.4 @@ -1,3 +1,6 @@ +.\" +.\" SPDX-License-Identifier: BSD-2-Clause +.\" .\" Copyright (c) 2019 Edward Tomasz Napierala <trasz@FreeBSD.org> .\" .\" Redistribution and use in source and binary forms, with or without @@ -20,12 +23,12 @@ .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. -.Dd November 7, 2019 +.Dd September 18, 2025 .Dt CDCEEM 4 .Os .Sh NAME .Nm cdceem -.Nd "USB Communication Device Class Ethernet Emulation Model (CDC EEM) driver" +.Nd USB Communication Device Class Ethernet Emulation Model driver .Sh SYNOPSIS To compile this driver into the kernel, place the following lines in your diff --git a/share/man/man4/cxgbe.4 b/share/man/man4/cxgbe.4 index bfba202d1fec..77465a3ae590 100644 --- a/share/man/man4/cxgbe.4 +++ b/share/man/man4/cxgbe.4 @@ -29,7 +29,7 @@ .\" .\" * Other names and brands may be claimed as the property of others. .\" -.Dd November 10, 2022 +.Dd September 29, 2025 .Dt CXGBE 4 .Os .Sh NAME @@ -73,6 +73,7 @@ driver uses different names for devices based on the associated ASIC: .It T4 Ta cxgbe Ta t4nex Ta vcxgbe .It T5 Ta cxl Ta t5nex Ta vcxl .It T6 Ta cc Ta t6nex Ta vcc +.It T7 Ta che Ta chnex Ta vche .El .Pp Loader tunables with the hw.cxgbe prefix apply to all cards. @@ -416,6 +417,8 @@ Support for T6 cards first appeared in .Fx 11.1 and .Fx 12.0 . +Support for T7 cards first appeared in +.Fx 15.0 . .Sh AUTHORS .An -nosplit The diff --git a/share/man/man4/dtrace_lockstat.4 b/share/man/man4/dtrace_lockstat.4 index e308ca6c22ce..448de91a375f 100644 --- a/share/man/man4/dtrace_lockstat.4 +++ b/share/man/man4/dtrace_lockstat.4 @@ -22,12 +22,12 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd August 20, 2019 +.Dd September 3, 2025 .Dt DTRACE_LOCKSTAT 4 .Os .Sh NAME .Nm dtrace_lockstat -.Nd a DTrace provider for tracing CPU scheduling events +.Nd a DTrace provider for tracing kernel locking events .Sh SYNOPSIS .Fn lockstat:::adaptive-acquire "struct mtx *" .Fn lockstat:::adaptive-release "struct mtx *" diff --git a/share/man/man4/epair.4 b/share/man/man4/epair.4 index 342b15b5612a..b406c423361b 100644 --- a/share/man/man4/epair.4 +++ b/share/man/man4/epair.4 @@ -25,7 +25,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd August 12, 2025 +.Dd September 4, 2025 .Dt EPAIR 4 .Os .Sh NAME @@ -108,6 +108,29 @@ As with any other Ethernet interface, can have a .Xr vlan 4 configured on top of it. +.Pp +The +.Nm +has RXCSUM and RXCSUM6 enabled because it may receive a packet where the +checksum has already been validated by a physical interface. +The +.Nm +supports TXCSUM and TXCSUM6 for TCP and UDP, but only by forwarding the order +to compute the checksum. +Thus, when using an +.Nm +interface, a TCP or UDP sender can offload checksum computation +to a physical interface. +Note that, in case the packet does not leave the host, the checksum is +unnecessary and will be ignored if offloaded. +Such packets contain an incorrect checksum, since it is not computed yet. +TXCSUM and TXCSUM6 are synchronized between the +.Nm +interface pair (i.e., enabling/disabling the capability on one end +enables/disables it on the other end). +In case one end is in a bridge and the bridge disabled TXCSUM or TXCSUM6, +this avoids a sender to send packets with checksum offloading into the +bridge by using the other end. .Sh SEE ALSO .Xr ioctl 2 , .Xr altq 4 , diff --git a/share/man/man4/gif.4 b/share/man/man4/gif.4 index ad33d5d21e81..cc12d91b72ea 100644 --- a/share/man/man4/gif.4 +++ b/share/man/man4/gif.4 @@ -28,7 +28,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd July 14, 2025 +.Dd August 27, 2025 .Dt GIF 4 .Os .Sh NAME @@ -55,6 +55,16 @@ does not perform GRE encapsulation; use .Xr gre 4 for GRE encapsulation. .Pp +The +.Nm +interface can also tunnel Ethernet traffic over IPv4 or IPv6 +when combined with a +.Xr if_bridge 4 +interface using EtherIP protocol. +See +.Xr if_bridge 4 +for detailed setup. +.Pp Each .Nm interface is created at runtime using interface cloning. @@ -316,6 +326,13 @@ to the desired level of nesting. .%D December 1999 .%O draft-ietf-ipsec-ecn-02.txt .Re +.Rs +.%A R. Housley +.%A S. Hollenbeck +.%T EtherIP: Tunneling Ethernet Frames in IP Datagrams +.%R RFC 3378 +.%D September 2002 +.Re .\" .Sh HISTORY The diff --git a/share/man/man4/gpio.4 b/share/man/man4/gpio.4 index 9a629ff402fd..b84bfb01de51 100644 --- a/share/man/man4/gpio.4 +++ b/share/man/man4/gpio.4 @@ -1,3 +1,6 @@ +.\" +.\" SPDX-License-Identifier: BSD-2-Clause +.\" .\" Copyright (c) 2013, Sean Bruno <sbruno@freebsd.org> .\" All rights reserved. .\" @@ -22,7 +25,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd June 27, 2019 +.Dd August 28, 2025 .Dt GPIO 4 .Os .Sh NAME @@ -33,7 +36,6 @@ To compile these devices into your kernel and use the device hints, place the following lines in your kernel configuration file: .Bd -ragged -offset indent .Cd "device gpio" -.Cd "device gpioc" .Cd "device gpioiic" .Cd "device gpioled" .Ed diff --git a/share/man/man4/gpioled.4 b/share/man/man4/gpioled.4 index 646e2ff2a8f0..45457d20d298 100644 --- a/share/man/man4/gpioled.4 +++ b/share/man/man4/gpioled.4 @@ -70,7 +70,20 @@ Which pin on the GPIO interface to map to this instance. Please note that this mask should only ever have one bit set (any other bits - i.e., pins - will be ignored). .It Va hint.gpioled.%d.invert -If set to 1, the pin will be set to 0 to light the LED, and 1 to clear it. +Use pin inversion. If set to 1, the pin will be set to 0 to light the LED, and 1 +to clear it. +.It Va hint.gpioled.%d.invmode +Whether or not to use hardware support when pin inversion is requested. Must be +one of: +.Bl -tag +.It Va auto +Use hardware pin inversion if available, else fallback to software pin +inversion. This is the default. +.It Va hw +Use hardware pin inversion. +.It Va sw +Use software pin inversion. +.El .It Va hint.gpioled.%d.state The initial state of the LED when the driver takes control over it. If set to 1 or 0, the LED will be on or off correspondingly. diff --git a/share/man/man4/ice.4 b/share/man/man4/ice.4 index 3f7a9017756d..c7675e627726 100644 --- a/share/man/man4/ice.4 +++ b/share/man/man4/ice.4 @@ -1,4 +1,4 @@ -.\"- +.\" .\" SPDX-License-Identifier: BSD-3-Clause .\" .\" Copyright (c) 2019-2020, Intel Corporation @@ -32,25 +32,35 @@ .\" .\" * Other names and brands may be claimed as the property of others. .\" -.Dd March 28, 2025 +.Dd October 3, 2025 .Dt ICE 4 .Os .Sh NAME .Nm ice -.Nd "Intel\(rg Ethernet 800 Series Driver" +.Nd Intel Ethernet 800 Series Driver .Sh SYNOPSIS -To compile this driver into the kernel, place the following lines in your -kernel configuration file: -.Bd -literal -offset indent .Cd device iflib .Cd device ice -.Ed .Pp -To load the driver as a module at boot time, place the following lines in +In .Xr loader.conf 5 : -.Bd -literal -offset indent -if_ice_load="YES" -.Ed +.Cd if_ice_load +.Cd hw.ice.enable_health_events +.Cd hw.ice.irdma +.Cd hw.ice.irdma_max_msix +.Cd hw.ice.debug.enable_tx_fc_filter +.Cd hw.ice.debug.enable_tx_lldp_filter +.Cd hw.ice.debug.ice_tx_balance_en +.Pp +In +.Xr sysctl.conf 5 +or +.Xr loader.conf 5 : +.Cd dev.ice.#.current_speed +.Cd dev.ice.#.fw_version +.Cd dev.ice.#.ddp_version +.Cd dev.ice.#.pba_number +.Cd dev.ice.#.hw.mac.* .Sh DESCRIPTION .Ss Features The @@ -86,7 +96,7 @@ Intel\(rg Ethernet Connection E830\-XXV .El .Pp For questions related to hardware requirements, refer to the documentation -supplied with your adapter. +supplied with the adapter. .Pp Support for Jumbo Frames is provided via the interface MTU setting. Selecting an MTU larger than 1500 bytes with the @@ -134,17 +144,16 @@ See the .Dq Intel\(rg Ethernet Adapters and Devices User Guide for more details on DDP and Safe Mode. .Pp -If you encounter issues with the DDP package file, you may need to download -an updated driver or +If issues are encountered with the DDP package file, an updated driver or .Sy ice_ddp -module. +module may need to be downloaded. See the log messages for more information. .Pp -You cannot update the DDP package if any PF drivers are already loaded. +The DDP package cannot be updated if any PF drivers are already loaded. To overwrite a package, unload all PFs and then reload the driver with the new package. .Pp -You can only use one DDP package per driver, even if you have more than one +Only one DDP package can be used per driver, even if more than one device installed that uses the driver. .Pp Only the first loaded PF per device can download a package for that device. @@ -164,9 +173,9 @@ each jumbo packet. This should help to avoid buffer starvation issues when allocating receive packets. .Pp -Packet loss may have a greater impact on throughput when you use jumbo -frames. -If you observe a drop in performance after enabling jumbo frames, enabling +Packet loss may have a greater impact on throughput when jumbo frames are in +use. +If a drop in performance is observed after enabling jumbo frames, enabling flow control may mitigate the issue. .Ss Remote Direct Memory Access Remote Direct Memory Access, or RDMA, allows a network device to transfer data @@ -184,14 +193,14 @@ operating in multiport mode with more than 4 ports. For detailed installation and configuration information for RDMA, see .Xr irdma 4 . .Ss RDMA Monitoring -For debugging/testing purposes, you can use sysctl to set up a mirroring +For debugging/testing purposes, a sysctl can be used to set up a mirroring interface on a port. The interface can receive mirrored RDMA traffic for packet analysis tools like .Xr tcpdump 1 . This mirroring may impact performance. .Pp -To use RDMA monitoring, you may need to reserve more MSI\-X interrupts. +To use RDMA monitoring, more MSI\-X interrupts may need to be reserved. Before the .Nm driver loads, configure the following tunable provided by @@ -200,7 +209,7 @@ driver loads, configure the following tunable provided by dev.ice.<interface #>.iflib.use_extra_msix_vectors=4 .Ed .Pp -You may need to adjust the number of extra MSI\-X interrupt vectors. +The number of extra MSI\-X interrupt vectors may need to be adjusted. .Pp To create/delete the interface: .Bd -literal -offset indent @@ -276,7 +285,7 @@ To enable/disable priority flow control in software\-based DCBX mode: sysctl dev.ice.<interface #>.pfc=1 (or 0 to disable) .Ed .Pp -Enhanced Transmission Selection (ETS) allows you to assign bandwidth to certain +Enhanced Transmission Selection (ETS) allows bandwidth to be assigned to certain TCs, to help ensure traffic reliability. To view the assigned ETS configuration, use the following: .Bd -literal -offset indent @@ -310,7 +319,7 @@ Use the following sysctl to enable or disable L3 QoS: sysctl dev.ice.<interface #>.pfc_mode=1 (or 0 to disable) .Ed .Pp -If you disable L3 QoS mode, it returns to L2 QoS mode. +If the L3 QoS mode is disabled, it returns to L2 QoS mode. .Pp To map a DSCP value to a traffic class, separate the values by commas. For example, to map DSCPs 0\-3 and DSCP 8 to DCB TCs 0\-3 and 4, respectively: @@ -329,7 +338,7 @@ sysctl dev.ice.<interface #>.dscp2tc_map .Pp L3 QoS mode is not available when FW\-LLDP is enabled. .Pp -You also cannot enable FW\-LLDP if L3 QoS mode is active. +FW\-LLDP cannot be enabled if L3 QoS mode is active. .Pp Disable FW\-LLDP before switching to L3 QoS mode. .Pp @@ -355,11 +364,11 @@ To check the current LLDP setting: sysctl dev.ice.<interface #>.fw_lldp_agent .Ed .Pp -You must enable the UEFI HII LLDP Agent attribute for this setting +The UEFI HII LLDP Agent attribute must be enabled for this setting to take effect. If the .Dq LLDP AGENT -attribute is set to disabled, you cannot enable the FW\-LLDP Agent from the +attribute is set to disabled, the FW\-LLDP Agent cannot be enabled from the driver. .Ss Link\-Level Flow Control (LFC) Ethernet Flow Control (IEEE 802.3x) can be configured with sysctl to enable @@ -416,11 +425,11 @@ provide a stable link without FEC. .Pp For devices to benefit from this feature, link partners must have FEC enabled. .Pp -If you enable the sysctl -.Em allow_no_fec_modules_in_auto -Auto FEC negotiation will include +If the +.Va allow_no_fec_modules_in_auto +sysctl is enabled Auto FEC negotiation will include .Dq No FEC -in case your link partner does not have FEC enabled or is not FEC capable: +in case the link partner does not have FEC enabled or is not FEC capable: .Bd -literal -offset indent sysctl dev.ice.<interface #>.allow_no_fec_modules_in_auto=1 .Ed @@ -443,16 +452,16 @@ To see the valid FEC modes for the link: sysctl \-d dev.ice.<interface #>.requested_fec .Ed .Ss Speed and Duplex Configuration -You cannot set duplex or autonegotiation settings. +The speed and duplex settings cannot be hard set. .Pp -To have your device change the speeds it will use in auto-negotiation or +To have the device change the speeds it will use in auto-negotiation or force link with: .Bd -literal -offset indent sysctl dev.ice.<interface #>.advertise_speed=<mask> .Ed .Pp Supported speeds will vary by device. -Depending on the speeds your device supports, valid bits used in a speed mask +Depending on the speeds the device supports, valid bits used in a speed mask could include: .Bd -literal -offset indent 0x0 \- Auto @@ -493,13 +502,13 @@ At a high level, to capture a firmware log: .It Set the configuration for the firmware log. .It -Perform the necessary steps to generate the issue you are trying to debug. +Perform the necessary steps to reproduce the issue. .It Capture the firmware log. .It Stop capturing the firmware log. .It -Reset your firmware log settings as needed. +Reset the firmware log settings as needed. .It Work with Customer Support to debug the issue. .El @@ -583,8 +592,8 @@ PF Registration (Bit 30) Module Version (Bit 31) .El .Pp -You can change the verbosity level of the firmware logs. -You can set only one log level per module, and each level includes the +The verbosity level of the firmware logs can be modified. +It is possible to set only one log level per module, and each level includes the verbosity levels lower than it. For instance, setting the level to .Dq normal @@ -640,8 +649,8 @@ dmesg > log_output NOTE: Logging a large number of modules or too high of a verbosity level will add extraneous messages to dmesg and could hinder debug efforts. .Ss Debug Dump -Intel\(rg Ethernet 800 Series devices support debug dump, which allows you to -obtain runtime register values from the firmware for +Intel\(rg Ethernet 800 Series devices support debug dump, which allows +gathering of runtime register values from the firmware for .Dq clusters of events and then write the results to a single dump file, for debugging complicated issues in the field. @@ -654,7 +663,7 @@ stateless snapshot of the whole device. .Pp NOTE: Like with firmware logs, the contents of the debug dump are not human\-readable. -You must work with Customer Support to decode the file. +Work with Customer Support to decode the file. .Pp Debug dump is per device, not per PF. .Pp @@ -717,20 +726,19 @@ sysctl dev.ice.0.debug.dump.clusters=0 .Pp NOTE: Using 0 will skip Manageability Transactions data. .Pp -If you don't specify a cluster, the driver will dump all clusters to a +If a single cluster is not specified, the driver will dump all clusters to a single file. Issue the debug dump command, using the following: .Bd -literal -offset indent sysctl \-b dev.ice.<interface #>.debug.dump.dump=1 > dump.bin .Ed .Pp -NOTE: The driver will not receive the command if you do not write -.Dq 1 -to the sysctl. +NOTE: The driver will not receive the command if the sysctl is not set to +.Dq 1 . .Pp Replace .Dq dump.bin -above with the file name you want to use. +above with the preferred file name. .Pp To clear the .Va clusters @@ -744,7 +752,7 @@ The ice driver supports the ability to obtain the values of the PHY registers from Intel(R) Ethernet 810 Series devices in order to debug link and connection issues during runtime. .Pp -The driver allows you to obtain information about: +The driver provides information about: .Bl -bullet .It Rx and Tx Equalization parameters @@ -758,12 +766,12 @@ sysctl dev.ice.<interface #>.debug.phy_statistics .Ed .Pp NOTE: The contents of the registers are not human\-readable. -Like with firmware logs and debug dump, you must work with Customer Support +Like with firmware logs and debug dump, work with Customer Support to decode the file. .Ss Transmit Balancing -Some Intel(R) Ethernet 800 Series devices allow you to enable a transmit +Some Intel(R) Ethernet 800 Series devices allow for enabling a transmit balancing feature to improve transmit performance under certain conditions. -When the feature is enabled, you should experience more consistent transmit +When enabled, the feature should provide more consistent transmit performance across queues and/or PFs and VFs. .Pp By default, transmit balancing is disabled in the NVM. @@ -784,7 +792,7 @@ configures the device accordingly. .Pp NOTE: The user selection for transmit balancing in EPCT or HII is persistent across reboots. -You must reboot the system for the selected setting to take effect. +The system must be rebooted for the selected setting to take effect. .Pp This setting is device wide. .Pp @@ -801,7 +809,7 @@ sysctl dev.ice.<interface #>.temp may have a low number of network memory buffers (mbufs) by default. If the number of mbufs available is too low, it may cause the driver to fail to initialize and/or cause the system to become unresponsive. -You can check to see if the system is mbuf\-starved by running +Check to see if the system is mbuf\-starved by running .Ic netstat Fl m . Increase the number of mbufs by editing the lines below in .Pa /etc/sysctl.conf : @@ -813,7 +821,7 @@ kern.ipc.nmbjumbo16 kern.ipc.nmbufs .Ed .Pp -The amount of memory that you allocate is system specific, and may require some +The amount of memory that should be allocated is system specific, and may require some trial and error. Also, increasing the following in .Pa /etc/sysctl.conf @@ -908,8 +916,8 @@ link partner's switch ports. Some PCIe x8 slots are actually configured as x4 slots. These slots have insufficient bandwidth for full line rate with dual port and quad port devices. -In addition, if you put a PCIe v4.0 or v3.0\-capable adapter into a PCIe v2.x -slot, you cannot get full bandwidth. +In addition, if a PCIe v4.0 or v3.0\-capable adapter is placed into a PCIe v2.x +slot, full bandwidth will not be possible. .Pp The driver detects this situation and writes the following message in the system log: @@ -920,7 +928,7 @@ Please move the device to a different PCI\-e link with more lanes and/or higher transfer rate. .Ed .Pp -If this error occurs, moving your adapter to a true PCIe x8 or x16 slot will +If this error occurs, moving the adapter to a true PCIe x8 or x16 slot will resolve the issue. For best performance, install devices in the following PCI slots: .Bl -bullet diff --git a/share/man/man4/iflib.4 b/share/man/man4/iflib.4 index 0114263e6ca2..2040698f0087 100644 --- a/share/man/man4/iflib.4 +++ b/share/man/man4/iflib.4 @@ -1,4 +1,4 @@ -.Dd September 27, 2018 +.Dd August 20, 2025 .Dt IFLIB 4 .Os .Sh NAME @@ -64,6 +64,18 @@ If this is zero or not set, an RX and TX queue pair will be assigned to each core. When set to a non-zero value, TX queues are assigned to cores following the last RX queue. +.It Va simple_tx +When set to one, iflib uses a simple transmit routine with no queuing at all. +By default, iflib uses a highly optimized, lockless, transmit queue called +mp_ring. +This performs well when there are more CPU cores than NIC +queues and prevents lock contention for transmit resources. +Unfortunately, mp_ring incurs unneeded overheads on workloads where +resource contention is not a problem (well behaved applications on +systems where there are as many NIC queues as CPU cores). +Note that when this is enabled, the tx_abdicate sysctl is no longer +applicable and is ignored. +Defaults to zero. .El .Pp These diff --git a/share/man/man4/ioat.4 b/share/man/man4/ioat.4 index deef466c0ae0..1c0e1dd49fd1 100644 --- a/share/man/man4/ioat.4 +++ b/share/man/man4/ioat.4 @@ -23,7 +23,7 @@ .\" SUCH DAMAGE. .\" .Dd May 3, 2016 -.Dt IOAT 4 +.Dt IOAT 4 amd64 .Os .Sh NAME .Nm I/OAT diff --git a/share/man/man4/ip.4 b/share/man/man4/ip.4 index c52715a43380..fb5ea398c840 100644 --- a/share/man/man4/ip.4 +++ b/share/man/man4/ip.4 @@ -575,7 +575,7 @@ is the following structure: .Bd -literal struct ip_mreqn { struct in_addr imr_multiaddr; /* IP multicast address of group */ - struct in_addr imr_interface; /* local IP address of interface */ + struct in_addr imr_address; /* local IP address of interface */ int imr_ifindex; /* interface index */ } .Ed diff --git a/share/man/man4/iwlwifi.4 b/share/man/man4/iwlwifi.4 index 4a251f239a55..660f6a9bf57c 100644 --- a/share/man/man4/iwlwifi.4 +++ b/share/man/man4/iwlwifi.4 @@ -27,7 +27,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd June 13, 2025 +.Dd August 19, 2025 .Dt IWLWIFI 4 .Os .Sh NAME @@ -331,7 +331,7 @@ driver first appeared in 802.11n and 802.11ac support for the 22000 and later chipsets first appeared in .Fx 14.3 . .Sh BUGS -Certainly. +.Lk https://bugs.freebsd.org/bugzilla/showdependencytree.cgi?id=iwlwifi "iwlwifi known bugs" .Pp While .Nm diff --git a/share/man/man4/iwx.4 b/share/man/man4/iwx.4 index 7cd54d61b920..295a5f318afa 100644 --- a/share/man/man4/iwx.4 +++ b/share/man/man4/iwx.4 @@ -18,7 +18,7 @@ .\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. .\" .Dd May 2, 2025 -.Dt IWX 4 +.Dt IWX 4 amd64 .Os .Sh NAME .Nm iwx diff --git a/share/man/man4/linprocfs.4 b/share/man/man4/linprocfs.4 index 53940d7c02b0..dcd1c642b409 100644 --- a/share/man/man4/linprocfs.4 +++ b/share/man/man4/linprocfs.4 @@ -9,7 +9,7 @@ .Nd Linux process file system .Sh SYNOPSIS .Bd -literal -linproc /compat/linux/proc linprocfs rw 0 0 +linprocfs /compat/linux/proc linprocfs rw 0 0 .Ed .Sh DESCRIPTION The Linux process file system, or @@ -138,7 +138,7 @@ To mount a file system on .Pa /compat/linux/proc : .Pp -.Dl "mount -t linprocfs linproc /compat/linux/proc" +.Dl "mount -t linprocfs linprocfs /compat/linux/proc" .Sh SEE ALSO .Xr mount 2 , .Xr unmount 2 , diff --git a/share/man/man4/linsysfs.4 b/share/man/man4/linsysfs.4 index 12729a814085..045e1af89173 100644 --- a/share/man/man4/linsysfs.4 +++ b/share/man/man4/linsysfs.4 @@ -9,7 +9,7 @@ .Nd Linux kernel objects file system .Sh SYNOPSIS .Bd -literal -linsys /compat/linux/sys linsysfs rw 0 0 +linsysfs /compat/linux/sys linsysfs rw 0 0 .Ed .Sh DESCRIPTION The @@ -66,7 +66,7 @@ The PCI device hierarchy node. .Sh EXAMPLES The most common usage follows: .Pp -.Dl "mount -t linsysfs linsys /compat/linux/sys" +.Dl "mount -t linsysfs linsysfs /compat/linux/sys" .Pp where .Pa /compat/linux/sys diff --git a/share/man/man4/mac_do.4 b/share/man/man4/mac_do.4 index 4dcb54c89673..39bfafd95474 100644 --- a/share/man/man4/mac_do.4 +++ b/share/man/man4/mac_do.4 @@ -94,8 +94,10 @@ i.e., one of the literal strings or .Ql gid . .Li Aq id -must be the numerical ID of a user or group, and is matched with the current -process real ID of the corresponding type. +must be the numerical ID of a user or group and is matched against the current +process real ID of the corresponding type, and on type +.Ql gid +additionally against the supplementary groups. .Ss Rule's Ao to Ac Part The second part of a rule, .Li Aq to , @@ -377,8 +379,8 @@ Same as the first example, but lifting any constraints on groups, allowing the process to become part of any groups it sees fit. .El .Pp -Here are several examples of single rules matching processes having a real group -ID of 10001: +Here are several examples of single rules matching processes having 10001 as +their real group IDs or in their supplementary groups: .Bl -tag -width indent .It Li gid=10001>uid=0 Makes 10001 a more powerful diff --git a/share/man/man4/man4.aarch64/Makefile b/share/man/man4/man4.aarch64/Makefile index 0e85aab8b770..f35558d69a33 100644 --- a/share/man/man4/man4.aarch64/Makefile +++ b/share/man/man4/man4.aarch64/Makefile @@ -14,12 +14,6 @@ MAN= \ # for all architectures, otherwise arm takes care of installing them. .if !empty(MAN_ARCH) && ${MAN_ARCH} != "all" MAN+= \ - aw_gpio.4 \ - aw_mmc.4 \ - aw_rtc.4 \ - aw_sid.4 \ - aw_spi.4 \ - aw_syscon.4 \ bcm283x_pwm.4 \ .endif diff --git a/share/man/man4/man4.aarch64/armv8crypto.4 b/share/man/man4/man4.aarch64/armv8crypto.4 index 7b8704395daf..0f763adc5766 100644 --- a/share/man/man4/man4.aarch64/armv8crypto.4 +++ b/share/man/man4/man4.aarch64/armv8crypto.4 @@ -25,7 +25,7 @@ .\" SUCH DAMAGE. .\" .Dd July 29, 2020 -.Dt ARMV8CRYPTO 4 +.Dt ARMV8CRYPTO 4 aarch64 .Os .Sh NAME .Nm armv8crypto diff --git a/share/man/man4/man4.aarch64/enetc.4 b/share/man/man4/man4.aarch64/enetc.4 index 33f796347f96..e7cfcb7ebe0e 100644 --- a/share/man/man4/man4.aarch64/enetc.4 +++ b/share/man/man4/man4.aarch64/enetc.4 @@ -25,7 +25,7 @@ .\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. .\" .Dd June 11, 2021 -.Dt ENETC 4 +.Dt ENETC 4 aarch64 .Os .Sh NAME .Nm enetc diff --git a/share/man/man4/man4.aarch64/felix.4 b/share/man/man4/man4.aarch64/felix.4 index 15caef6d274f..b97f3c2168e8 100644 --- a/share/man/man4/man4.aarch64/felix.4 +++ b/share/man/man4/man4.aarch64/felix.4 @@ -26,7 +26,7 @@ .\" SUCH DAMAGE. .\" .Dd June 21, 2021 -.Dt FELIX 4 +.Dt FELIX 4 aarch64 .Os .Sh NAME .Nm felix diff --git a/share/man/man4/man4.aarch64/rk_gpio.4 b/share/man/man4/man4.aarch64/rk_gpio.4 index b5648662cf5e..b2767dd66dce 100644 --- a/share/man/man4/man4.aarch64/rk_gpio.4 +++ b/share/man/man4/man4.aarch64/rk_gpio.4 @@ -23,7 +23,7 @@ .\" SUCH DAMAGE. .\" .Dd Apr 26, 2018 -.Dt RK_GPIO 4 +.Dt RK_GPIO 4 aarch64 .Os .Sh NAME .Nm rk_gpio diff --git a/share/man/man4/man4.aarch64/rk_grf.4 b/share/man/man4/man4.aarch64/rk_grf.4 index 64ed468c1983..b01a93091ecb 100644 --- a/share/man/man4/man4.aarch64/rk_grf.4 +++ b/share/man/man4/man4.aarch64/rk_grf.4 @@ -23,7 +23,7 @@ .\" SUCH DAMAGE. .\" .Dd Apr 26, 2018 -.Dt RK_GRF 4 +.Dt RK_GRF 4 aarch64 .Os .Sh NAME .Nm rk_grf diff --git a/share/man/man4/man4.aarch64/rk_grf_gpio.4 b/share/man/man4/man4.aarch64/rk_grf_gpio.4 index 6a5ebbe19e3b..2bfbebce1b76 100644 --- a/share/man/man4/man4.aarch64/rk_grf_gpio.4 +++ b/share/man/man4/man4.aarch64/rk_grf_gpio.4 @@ -4,7 +4,7 @@ .\" SPDX-License-Identifier: BSD-2-Clause .\" .Dd March 18, 2025 -.Dt RK_GRF_GPIO 4 +.Dt RK_GRF_GPIO 4 aarch64 .Os .Sh NAME .Nm rk_grf_gpio diff --git a/share/man/man4/man4.aarch64/rk_i2c.4 b/share/man/man4/man4.aarch64/rk_i2c.4 index be1a0fab943e..363cdeac7f72 100644 --- a/share/man/man4/man4.aarch64/rk_i2c.4 +++ b/share/man/man4/man4.aarch64/rk_i2c.4 @@ -25,7 +25,7 @@ .\" SUCH DAMAGE. .\" .Dd June 14, 2018 -.Dt RK_I2C 4 +.Dt RK_I2C 4 aarch64 .Os .Sh NAME .Nm rk_i2c diff --git a/share/man/man4/man4.aarch64/rk_pinctrl.4 b/share/man/man4/man4.aarch64/rk_pinctrl.4 index 519b3e793cd1..2be5f363498d 100644 --- a/share/man/man4/man4.aarch64/rk_pinctrl.4 +++ b/share/man/man4/man4.aarch64/rk_pinctrl.4 @@ -23,7 +23,7 @@ .\" SUCH DAMAGE. .\" .Dd Apr 26, 2018 -.Dt RK_PINCTRL 4 +.Dt RK_PINCTRL 4 aarch64 .Os .Sh NAME .Nm rk_pinctrl diff --git a/share/man/man4/man4.arm/Makefile b/share/man/man4/man4.arm/Makefile index 6b046a1002a2..2be255ad913f 100644 --- a/share/man/man4/man4.arm/Makefile +++ b/share/man/man4/man4.arm/Makefile @@ -1,11 +1,5 @@ MAN= \ ar40xx.4 \ - aw_gpio.4 \ - aw_mmc.4 \ - aw_rtc.4 \ - aw_sid.4 \ - aw_spi.4 \ - aw_syscon.4 \ bcm283x_pwm.4 \ devcfg.4 \ imx6_ahci.4 \ diff --git a/share/man/man4/man4.arm/am335x_dmtpps.4 b/share/man/man4/man4.arm/am335x_dmtpps.4 index d565c65e2cf1..bec5ff7726a0 100644 --- a/share/man/man4/man4.arm/am335x_dmtpps.4 +++ b/share/man/man4/man4.arm/am335x_dmtpps.4 @@ -24,7 +24,7 @@ .\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. .\" .Dd August 12, 2015 -.Dt AM335X_DMTPPS 4 +.Dt AM335X_DMTPPS 4 arm .Os .Sh NAME .Nm am335x_dmtpps diff --git a/share/man/man4/man4.arm/bcm283x_pwm.4 b/share/man/man4/man4.arm/bcm283x_pwm.4 index 1fb5a830ace7..71d7f0cc3cca 100644 --- a/share/man/man4/man4.arm/bcm283x_pwm.4 +++ b/share/man/man4/man4.arm/bcm283x_pwm.4 @@ -25,7 +25,7 @@ .\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. .\" .Dd September 10, 2018 -.Dt BCM283X_PWM 4 +.Dt BCM283X_PWM 4 arm .Os .Sh NAME .Nm bcm283x_pwm diff --git a/share/man/man4/man4.arm/devcfg.4 b/share/man/man4/man4.arm/devcfg.4 index ddf368a85f24..cbc205814c69 100644 --- a/share/man/man4/man4.arm/devcfg.4 +++ b/share/man/man4/man4.arm/devcfg.4 @@ -23,7 +23,7 @@ .\" SUCH DAMAGE. .\" .Dd February 28, 2013 -.Dt DEVCFG 4 +.Dt DEVCFG 4 arm .Os .Sh NAME .Nm devcfg diff --git a/share/man/man4/man4.arm/imx6_ahci.4 b/share/man/man4/man4.arm/imx6_ahci.4 index 9979cef50d79..50689e323db8 100644 --- a/share/man/man4/man4.arm/imx6_ahci.4 +++ b/share/man/man4/man4.arm/imx6_ahci.4 @@ -24,7 +24,7 @@ .\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. .\" .Dd July 7, 2018 -.Dt IMX6_AHCI 4 +.Dt IMX6_AHCI 4 arm .Os .Sh NAME .Nm imx6_ahci diff --git a/share/man/man4/man4.arm/imx6_snvs.4 b/share/man/man4/man4.arm/imx6_snvs.4 index b36c3ddd91c1..2c1db97b231c 100644 --- a/share/man/man4/man4.arm/imx6_snvs.4 +++ b/share/man/man4/man4.arm/imx6_snvs.4 @@ -24,7 +24,7 @@ .\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. .\" .Dd July 8, 2018 -.Dt IMX6_SNVS 4 +.Dt IMX6_SNVS 4 arm .Os .Sh NAME .Nm imx6_snvs diff --git a/share/man/man4/man4.arm/imx_spi.4 b/share/man/man4/man4.arm/imx_spi.4 index e7555ed20d94..54a5339e3276 100644 --- a/share/man/man4/man4.arm/imx_spi.4 +++ b/share/man/man4/man4.arm/imx_spi.4 @@ -24,7 +24,7 @@ .\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. .\" .Dd July 9, 2018 -.Dt IMX_SPI 4 +.Dt IMX_SPI 4 arm .Os .Sh NAME .Nm imx_spi diff --git a/share/man/man4/man4.arm/imx_wdog.4 b/share/man/man4/man4.arm/imx_wdog.4 index 4b993e1d066b..cb4d0e13865b 100644 --- a/share/man/man4/man4.arm/imx_wdog.4 +++ b/share/man/man4/man4.arm/imx_wdog.4 @@ -24,7 +24,7 @@ .\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. .\" .Dd July 7, 2018 -.Dt IMX_WDOG 4 +.Dt IMX_WDOG 4 arm .Os .Sh NAME .Nm imx_wdog diff --git a/share/man/man4/man4.arm/mge.4 b/share/man/man4/man4.arm/mge.4 index e949b36f4307..cba9327eadcf 100644 --- a/share/man/man4/man4.arm/mge.4 +++ b/share/man/man4/man4.arm/mge.4 @@ -24,7 +24,7 @@ .\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. .\" .Dd November 27, 2008 -.Dt MGE 4 +.Dt MGE 4 arm .Os .Sh NAME .Nm mge diff --git a/share/man/man4/man4.arm/ti_adc.4 b/share/man/man4/man4.arm/ti_adc.4 index d71547231e4c..fb59e1d3e57c 100644 --- a/share/man/man4/man4.arm/ti_adc.4 +++ b/share/man/man4/man4.arm/ti_adc.4 @@ -23,7 +23,7 @@ .\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. .\" .Dd June 1, 2014 -.Dt TI_ADC 4 +.Dt TI_ADC 4 arm .Os .Sh NAME .Nm ti_adc diff --git a/share/man/man4/man4.powerpc/abtn.4 b/share/man/man4/man4.powerpc/abtn.4 index 92d643d5cf32..7421d0a0b5a6 100644 --- a/share/man/man4/man4.powerpc/abtn.4 +++ b/share/man/man4/man4.powerpc/abtn.4 @@ -25,7 +25,7 @@ .\" POSSIBILITY OF SUCH DAMAGE. .\" .Dd October 16, 2011 -.Dt ABTN 4 +.Dt ABTN 4 powerpc .Os .Sh NAME .Nm abtn diff --git a/share/man/man4/man4.powerpc/adb.4 b/share/man/man4/man4.powerpc/adb.4 index a781787995ab..6041484b5e33 100644 --- a/share/man/man4/man4.powerpc/adb.4 +++ b/share/man/man4/man4.powerpc/adb.4 @@ -24,7 +24,7 @@ .\" POSSIBILITY OF SUCH DAMAGE. .\" .Dd December 3, 2009 -.Dt ADB 4 +.Dt ADB 4 powerpc .Os .Sh NAME .Nm adb diff --git a/share/man/man4/man4.powerpc/akbd.4 b/share/man/man4/man4.powerpc/akbd.4 index 44af08961122..3406f5a1aa76 100644 --- a/share/man/man4/man4.powerpc/akbd.4 +++ b/share/man/man4/man4.powerpc/akbd.4 @@ -24,7 +24,7 @@ .\" POSSIBILITY OF SUCH DAMAGE. .\" .Dd December 3, 2009 -.Dt AKBD 4 +.Dt AKBD 4 powerpc .Os .Sh NAME .Nm akbd diff --git a/share/man/man4/man4.powerpc/ams.4 b/share/man/man4/man4.powerpc/ams.4 index 21be3c098920..d7fa922e7307 100644 --- a/share/man/man4/man4.powerpc/ams.4 +++ b/share/man/man4/man4.powerpc/ams.4 @@ -24,7 +24,7 @@ .\" POSSIBILITY OF SUCH DAMAGE. .\" .Dd December 3, 2009 -.Dt AMS 4 +.Dt AMS 4 powerpc .Os .Sh NAME .Nm ams diff --git a/share/man/man4/man4.powerpc/cuda.4 b/share/man/man4/man4.powerpc/cuda.4 index 7171ebb42373..a52b9a447c9d 100644 --- a/share/man/man4/man4.powerpc/cuda.4 +++ b/share/man/man4/man4.powerpc/cuda.4 @@ -24,7 +24,7 @@ .\" POSSIBILITY OF SUCH DAMAGE. .\" .Dd December 3, 2009 -.Dt CUDA 4 +.Dt CUDA 4 powerpc .Os .Sh NAME .Nm cuda diff --git a/share/man/man4/man4.powerpc/dtsec.4 b/share/man/man4/man4.powerpc/dtsec.4 index 4a60dd0b8824..f18de90c4757 100644 --- a/share/man/man4/man4.powerpc/dtsec.4 +++ b/share/man/man4/man4.powerpc/dtsec.4 @@ -24,7 +24,7 @@ .\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. .\" .Dd October 31, 2017 -.Dt DTSEC 4 +.Dt DTSEC 4 powerpc .Os .Sh NAME .Nm dtsec diff --git a/share/man/man4/man4.powerpc/llan.4 b/share/man/man4/man4.powerpc/llan.4 index c32ddbca6a00..b78109cac626 100644 --- a/share/man/man4/man4.powerpc/llan.4 +++ b/share/man/man4/man4.powerpc/llan.4 @@ -24,7 +24,7 @@ .\" POSSIBILITY OF SUCH DAMAGE. .\" .Dd February 19, 2015 -.Dt LLAN 4 +.Dt LLAN 4 powerpc .Os .Sh NAME .Nm llan diff --git a/share/man/man4/man4.powerpc/pmu.4 b/share/man/man4/man4.powerpc/pmu.4 index 6eac20cfa6b7..4dfb31f175bd 100644 --- a/share/man/man4/man4.powerpc/pmu.4 +++ b/share/man/man4/man4.powerpc/pmu.4 @@ -24,7 +24,7 @@ .\" POSSIBILITY OF SUCH DAMAGE. .\" .Dd December 6, 2008 -.Dt PMU 4 +.Dt PMU 4 powerpc .Os .Sh NAME .Nm pmu diff --git a/share/man/man4/man4.powerpc/smu.4 b/share/man/man4/man4.powerpc/smu.4 index ef2654746e62..852a08abaa9e 100644 --- a/share/man/man4/man4.powerpc/smu.4 +++ b/share/man/man4/man4.powerpc/smu.4 @@ -24,7 +24,7 @@ .\" POSSIBILITY OF SUCH DAMAGE. .\" .Dd February 22, 2010 -.Dt SMU 4 +.Dt SMU 4 powerpc .Os .Sh NAME .Nm smu diff --git a/share/man/man4/man4.powerpc/snd_ai2s.4 b/share/man/man4/man4.powerpc/snd_ai2s.4 index 3880751e65c9..7a3cd9cb94af 100644 --- a/share/man/man4/man4.powerpc/snd_ai2s.4 +++ b/share/man/man4/man4.powerpc/snd_ai2s.4 @@ -24,7 +24,7 @@ .\" POSSIBILITY OF SUCH DAMAGE. .\" .Dd January 20, 2009 -.Dt SND_AI2S 4 +.Dt SND_AI2S 4 powerpc .Os .Sh NAME .Nm snd_ai2s diff --git a/share/man/man4/man4.powerpc/snd_davbus.4 b/share/man/man4/man4.powerpc/snd_davbus.4 index 6958ebd4b4b5..028225accf52 100644 --- a/share/man/man4/man4.powerpc/snd_davbus.4 +++ b/share/man/man4/man4.powerpc/snd_davbus.4 @@ -24,7 +24,7 @@ .\" POSSIBILITY OF SUCH DAMAGE. .\" .Dd January 20, 2009 -.Dt SND_DAVBUS 4 +.Dt SND_DAVBUS 4 powerpc .Os .Sh NAME .Nm snd_davbus diff --git a/share/man/man4/man4.powerpc/tsec.4 b/share/man/man4/man4.powerpc/tsec.4 index b3ccae648ab8..09510e329ff0 100644 --- a/share/man/man4/man4.powerpc/tsec.4 +++ b/share/man/man4/man4.powerpc/tsec.4 @@ -24,7 +24,7 @@ .\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. .\" .Dd February 20, 2015 -.Dt TSEC 4 +.Dt TSEC 4 powerpc .Os .Sh NAME .Nm tsec diff --git a/share/man/man4/mmcsd.4 b/share/man/man4/mmcsd.4 index 7466bc546b91..07d7e963b596 100644 --- a/share/man/man4/mmcsd.4 +++ b/share/man/man4/mmcsd.4 @@ -1,4 +1,6 @@ .\" +.\" SPDX-License-Identifier: BSD-2-Clause +.\" .\" Copyright (c) 2007 M. Warner Losh <imp@FreeBSD.org> .\" .\" Redistribution and use in source and binary forms, with or without @@ -21,7 +23,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd June 10, 2021 +.Dd October 2, 2025 .Dt MMCSD 4 .Os .Sh NAME @@ -29,7 +31,7 @@ .Nd MMC and SD memory card driver .Sh SYNOPSIS .Cd device mmcsd -.Sh DESCRIPTION +.Sh HARDWARE The .Nm driver implements direct access block device for MMC and SD memory cards. @@ -42,3 +44,8 @@ driver implements direct access block device for MMC and SD memory cards. .Rs .%T "The MultiMediaCard System Specification" .Re +.Sh HISTORY +The +.Nm +driver appeared in +.Fx 7.0 . diff --git a/share/man/man4/mpr.4 b/share/man/man4/mpr.4 index e114ecfd077b..cce21113e5c2 100644 --- a/share/man/man4/mpr.4 +++ b/share/man/man4/mpr.4 @@ -65,9 +65,9 @@ Fusion-MPT 3/3.5 IT/IR .Tn SAS/PCIe controllers. .Sh HARDWARE -These controllers are supported by the +The .Nm -driver: +driver supports the following SATA/SAS/NVMe RAID controllers: .Pp .Bl -bullet -compact .It diff --git a/share/man/man4/mrsas.4 b/share/man/man4/mrsas.4 index 36e9a7b5c7e7..5f7a0e6e45ea 100644 --- a/share/man/man4/mrsas.4 +++ b/share/man/man4/mrsas.4 @@ -1,3 +1,6 @@ +.\" +.\" SPDX-License-Identifier: BSD-3-Clause +.\" .\" Copyright (c) 2014 LSI Corp .\" All rights reserved. .\" Author: Kashyap Desai @@ -32,43 +35,42 @@ .\" are those of the authors and should not be interpreted as representing .\" official policies, either expressed or implied, of the FreeBSD Project. .\" -.Dd February 4, 2021 +.Dd August 22, 2025 .Dt MRSAS 4 .Os .Sh NAME .Nm mrsas -.Nd "LSI MegaRAID 6Gb/s and 12Gb/s SAS+SATA RAID controller driver" +.Nd Broadcom/LSI MegaRAID 6/12Gb/s SAS+SATA RAID controller driver .Sh SYNOPSIS -To compile this driver into the kernel, -place the following lines in your -kernel configuration file: -.Bd -ragged -offset indent .Cd "device pci" .Cd "device mrsas" -.Ed .Pp -Alternatively, to load the driver as a -module at boot time, place the following line in +In .Xr loader.conf 5 : -.Bd -literal -offset indent -mrsas_load="YES" -.Ed +.Cd mrsas_load="YES" +.Pp +In +.Xr sysctl.conf 5 : +.Cd dev.mrsas.X.disable_ocr +.Cd dev.mrsas.X.fw_outstanding +.Cd dev.mrsas.X.mrsas_fw_fault_check_delay +.Cd dev.mrsas.X.mrsas_io_timeout +.Cd hw.mrsas.X.debug_level .Sh DESCRIPTION The .Nm -driver will detect LSI's next generation (6Gb/s and 12Gb/s) PCI Express -SAS/SATA RAID controllers. -See the -.Nm HARDWARE -section for the supported devices list. -A disk (virtual disk/physical disk) attached to the +driver will detect Broadcom/LSI's 6Gb/s and 12Gb/s +PCI Express SAS/SATA/NVMe RAID controllers. +A disk +.Pq virtual disk/physical disk +attached to the .Nm driver will be visible to the user through .Xr camcontrol 8 as .Pa /dev/da? device nodes. -A simple management interface is also provided on a per-controller basis via the +A simple management interface is also provided per-controller via the .Pa /dev/mrsas? device node. .Pp @@ -77,8 +79,7 @@ The name is derived from the phrase "MegaRAID SAS HBA", which is substantially different than the old "MegaRAID" Driver .Xr mfi 4 -which does not connect targets -to the +which does not connect targets to the .Xr cam 4 layer and thus requires a new driver which attaches targets to the .Xr cam 4 @@ -91,8 +92,8 @@ but both the .Xr mfi 4 and .Nm -drivers can detect and manage the LSI MegaRAID SAS 2208/2308/3008/3108 series of -controllers. +drivers can detect and manage the +Broadcom/LSI MegaRAID SAS 2208/2308/3008/3108 series of controllers. .Pp The .Xr device.hints 5 @@ -103,7 +104,7 @@ By default, the .Xr mfi 4 driver will detect these controllers. See the -.Nm PRIORITY +.Sx PRIORITY section to know more about driver priority for MR-Fusion devices. .Pp .Nm @@ -124,46 +125,32 @@ rather then JBOD virtual mode. .Sh HARDWARE The .Nm -driver supports the following hardware: -.Pp -[ Thunderbolt 6Gb/s MR controller ] -.Bl -bullet -compact -.It -LSI MegaRAID SAS 9265 -.It -LSI MegaRAID SAS 9266 -.It -LSI MegaRAID SAS 9267 -.It -LSI MegaRAID SAS 9270 -.It -LSI MegaRAID SAS 9271 -.It -LSI MegaRAID SAS 9272 -.It -LSI MegaRAID SAS 9285 -.It -LSI MegaRAID SAS 9286 -.It -DELL PERC H810 -.It -DELL PERC H710/P -.El +driver supports the following LSI/Broadcom SATA/SAS RAID controllers: .Pp -[ Invader/Fury 12Gb/s MR controller ] -.Bl -bullet -compact -.It -LSI MegaRAID SAS 9380 -.It -LSI MegaRAID SAS 9361 -.It -LSI MegaRAID SAS 9341 -.It -DELL PERC H830 -.It -DELL PERC H730/P -.It -DELL PERC H330 +.Bl -column -compact "LSI MegaRAID SAS 9380" "Invader/Fury" "12Gb/s" +.It Controller Ta Chip Ta Speed +.It Broadcom SAS3916 Ta Aero Ta 12Gb/s +.It Broadcom SAS3908 Ta Aero Ta 12Gb/s +.It LSI MegaRAID SAS 9380 Ta Invader/Fury Ta 12Gb/s +.It LSI MegaRAID SAS 9361 Ta Invader/Fury Ta 12Gb/s +.It LSI MegaRAID SAS 9341 Ta Invader/Fury Ta 12Gb/s +.It LSI MegaRAID SAS 9286 Ta Thunderbolt Ta 6Gb/s +.It LSI MegaRAID SAS 9285 Ta Thunderbolt Ta 6Gb/s +.It LSI MegaRAID SAS 9272 Ta Thunderbolt Ta 6Gb/s +.It LSI MegaRAID SAS 9271 Ta Thunderbolt Ta 6Gb/s +.It LSI MegaRAID SAS 9270 Ta Thunderbolt Ta 6Gb/s +.It LSI MegaRAID SAS 9267 Ta Thunderbolt Ta 6Gb/s +.It LSI MegaRAID SAS 9266 Ta Thunderbolt Ta 6Gb/s +.It LSI MegaRAID SAS 9265 Ta Thunderbolt Ta 6Gb/s +.It LSI SAS 3108 Ta Ta 12Gb/s +.It LSI SAS 3008 Ta Ta 12Gb/s +.It LSI SAS 2308 Ta Ta 6Gb/s +.It LSI SAS 2208 Ta Ta 6Gb/s +.It DELL PERC H830 Ta Invader/Fury Ta 12Gb/s +.It DELL PERC H810 Ta Thunderbolt Ta 6Gb/s +.It DELL PERC H730/P Ta Invader/Fury Ta 12Gb/s +.It DELL PERC H710/P Ta Thunderbolt Ta 6Gb/s +.It DELL PERC H330 Ta Invader/Fury Ta 12Gb/s .El .Sh CONFIGURATION To disable Online Controller Reset(OCR) for a specific @@ -171,9 +158,8 @@ To disable Online Controller Reset(OCR) for a specific driver instance, set the following tunable value in .Xr loader.conf 5 : -.Bd -literal -offset indent -dev.mrsas.X.disable_ocr=1 -.Ed +.Pp +.Dl Va dev.mrsas.X.disable_ocr=1 .Pp where X is the adapter number. .Pp @@ -181,9 +167,8 @@ To change the I/O timeout value for a specific .Nm driver instance, set the following tunable value in .Xr loader.conf 5 : -.Bd -literal -offset indent -dev.mrsas.X.mrsas_io_timeout=NNNNNN -.Ed +.Pp +.Dl Va dev.mrsas.X.mrsas_io_timeout=NNNNNN .Pp where NNNNNN is the timeout value in milli-seconds. .Pp @@ -191,9 +176,8 @@ To change the firmware fault check timer value for a specific .Nm driver instance, set the following tunable value in .Xr loader.conf 5 : -.Bd -literal -offset indent -dev.mrsas.X.mrsas_fw_fault_check_delay=NN -.Ed +.Pp +.Dl Va dev.mrsas.X.mrsas_fw_fault_check_delay=NN .Pp where NN is the fault check delay value in seconds. .Pp @@ -248,7 +232,8 @@ or subsystem for selection of MR-Fusion cards. With the above design in place, the .Xr mfi 4 -driver will attach to a MR-Fusion card given that it has a higher priority than +driver will attach to a MR-Fusion card +given that it has a higher priority than .Nm . .Pp Using @@ -267,45 +252,48 @@ At boot time, the .Xr mfi 4 driver will get priority to detect MR-Fusion controllers by default. Before -changing this default driver selection policy, LSI advises users to understand -how the driver selection policy works. +changing this default driver selection policy, +LSI advises users to understand how the driver selection policy works. LSI's policy is to provide priority to the .Xr mfi 4 -driver to detect MR-Fusion cards, but allow for the ability to choose the +driver to detect MR-Fusion cards, +but allow for the ability to choose the .Nm driver to detect MR-Fusion cards. .Pp -LSI recommends setting hw.mfi.mrsas_enable="0" for customers who are using the -older +LSI recommends setting +.Va hw.mfi.mrsas_enable="0" +for customers who are using the older .Xr mfi 4 driver and do not want to switch to .Nm . -For those customers who are using a MR-Fusion controller for the first time, LSI -recommends using the +For those using a MR-Fusion controller for the first time, +LSI recommends using the .Nm -driver and setting hw.mfi.mrsas_enable="1". +driver and setting +.Va hw.mfi.mrsas_enable="1". .Pp -Changing the default behavior is well tested under most conditions, but -unexpected behavior may pop up if more complex and unrealistic operations are -executed by switching between the +Changing the default behavior is well tested under most conditions, +but unexpected behavior may pop up +if more complex and unrealistic operations are executed +by switching between the .Xr mfi 4 and .Nm drivers for MR-Fusion. Switching drivers is designed to happen only one time. -Although multiple -switching is possible, it is not recommended. +Although multiple switching is possible, it is not recommended. The user should decide from -.Nm Start of Day +.Sy boot which driver they want to use for the MR-Fusion card. .Pp The user may see different device names when switching from .Xr mfi 4 to .Nm . -This behavior is -.Nm Functions As Designed +This behavior +.Sy works as intended and the user needs to change the .Xr fstab 5 entry manually if they are doing any experiments with @@ -314,7 +302,7 @@ and .Nm interoperability. .Sh FILES -.Bl -tag -width ".Pa /dev/mrsas?" -compact +.Bl -tag -width "/dev/mrsas?" -compact .It Pa /dev/da? array/logical disk interface .It Pa /dev/mrsas? @@ -337,7 +325,8 @@ driver first appeared in is the old .Fx driver which started with support for Gen-1 Controllers and -was extended to support up to MR-Fusion (Device ID = 0x005B, 0x005D, 0x005F). +was extended to support up to MR-Fusion +.Pq Device ID = 0x005B, 0x005D, 0x005F . .Ed .Bd -ragged .Cd "mrsas Driver:" @@ -348,12 +337,12 @@ The SAS+SATA RAID controller with device id 0x005b is referred to as the Thunderbolt controller throughout this man page. .Ed .Bd -ragged -.Nm cam aware HBA drivers: +.Sy cam aware HBA drivers: .Fx has a .Xr cam 4 -layer which attaches storage devices and provides a common access mechanism to -storage controllers and attached devices. +layer which attaches storage devices and provides a +common access mechanism to storage controllers and attached devices. The .Nm driver is @@ -368,13 +357,13 @@ driver does not understand the .Xr cam 4 layer and it directly associates storage disks to the block layer. .Pp -.Nm Thunderbolt Controller: +.Sy Thunderbolt Controller: This is the 6Gb/s MegaRAID HBA card which has device id 0x005B. .Pp -.Nm Invader Controller: +.Sy Invader Controller: This is 12Gb/s MegaRAID HBA card which has device id 0x005D. .Pp -.Nm Fury Controller: +.Sy Fury Controller: This is the 12Gb/s MegaRAID HBA card which has device id 0x005F. .Ed .Sh AUTHORS @@ -382,12 +371,7 @@ The .Nm driver and this manual page were written by .An Kashyap Desai Aq Mt Kashyap.Desai@lsi.com . -.Sh TODO -The driver does not support alias for device name (it is required when the user -switches between two drivers and does not want to edit -.Pa /etc/fstab -manually). -.Pp +.Sh CAVEATS The .Nm driver exposes devices as @@ -398,8 +382,7 @@ exposes devices as .Pa /dev/mfid? . .Pp .Nm -does not support the Linux Emulator interface. -.Pp -.Nm -will not work with -.Xr mfiutil 8 . +does not support the Linux Emulator Interface, +.Xr mfiutil 8 , +or device name aliases for switching drivers without editing +.Xr fstab 5 . diff --git a/share/man/man4/nda.4 b/share/man/man4/nda.4 index c4fa157af851..e45b2905462e 100644 --- a/share/man/man4/nda.4 +++ b/share/man/man4/nda.4 @@ -1,4 +1,6 @@ .\" +.\" SPDX-License-Identifier: BSD-2-Clause +.\" .\" Copyright (c) 2017 Netflix, Inc. .\" .\" Redistribution and use in source and binary forms, with or without @@ -23,7 +25,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd June 6, 2020 +.Dd October 2, 2025 .Dt NDA 4 .Os .Sh NAME @@ -39,6 +41,14 @@ driver provides support for direct access devices, implementing the .Tn NVMe command protocol, that are attached to the system through a host adapter supported by the CAM subsystem. +.Sh HARDWARE +The +.Nm +driver supports NVMe +.Pq Non-Volatile Memory Express +storage devices connected via PCIe or over NVMF +.Pq NVMe over Fabric +via the CAM subsystem. .Sh SYSCTL VARIABLES The following variables are available as both .Xr sysctl 8 diff --git a/share/man/man4/nvd.4 b/share/man/man4/nvd.4 index d5145939e409..1861fabc91d0 100644 --- a/share/man/man4/nvd.4 +++ b/share/man/man4/nvd.4 @@ -31,7 +31,7 @@ .\" .\" Author: Jim Harris <jimharris@FreeBSD.org> .\" -.Dd May 18, 2019 +.Dd October 2, 2025 .Dt NVD 4 .Os .Sh NAME @@ -72,6 +72,10 @@ Note that device nodes from the driver are not .Xr GEOM 4 disks and cannot be partitioned. +.Sh HARDWARE +The +.Nm +driver supports NVMe storage devices using NVMe namespaces. .Sh CONFIGURATION The .Nm diff --git a/share/man/man4/nvdimm.4 b/share/man/man4/nvdimm.4 index 5b7dbe435c46..2bec51b42d72 100644 --- a/share/man/man4/nvdimm.4 +++ b/share/man/man4/nvdimm.4 @@ -26,7 +26,7 @@ .\" SUCH DAMAGE. .\" .Dd September 5, 2019 -.Dt NVDIMM 4 +.Dt NVDIMM 4 amd64 .Os .Sh NAME .Nm nvdimm diff --git a/share/man/man4/pci.4 b/share/man/man4/pci.4 index 91fbb557f644..b99747969035 100644 --- a/share/man/man4/pci.4 +++ b/share/man/man4/pci.4 @@ -22,7 +22,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd April 2, 2025 +.Dd August 31, 2025 .Dt PCI 4 .Os .Sh NAME @@ -235,6 +235,17 @@ revision ID. Driver name. .It pd_unit Driver unit number. +.It pd_numa_domain +Driver NUMA domain. +.It pc_reported_len +Length of the valid portion of the encompassing +.Vt pci_conf +structure. +This should always be equivalent to the offset of the +.Va pc_spare +member. +.It pc_spare +Reserved for future use. .El .It offset The offset is passed in by the user to tell the kernel where it should diff --git a/share/man/man4/pfsync.4 b/share/man/man4/pfsync.4 index cc9c350ea875..c12bad74831f 100644 --- a/share/man/man4/pfsync.4 +++ b/share/man/man4/pfsync.4 @@ -162,6 +162,8 @@ FreeBSD releases 13.2 and older. Compatibility with FreeBSD 13.1 has been verified. .It Cm 1400 FreeBSD release 14.0. +.It Cm 1500 +FreeBSD release 15.0. .El .Sh SYSCTL VARIABLES The following variables can be entered at the diff --git a/share/man/man4/puc.4 b/share/man/man4/puc.4 index a29376d3f2d5..624c215027af 100644 --- a/share/man/man4/puc.4 +++ b/share/man/man4/puc.4 @@ -257,6 +257,8 @@ Sunix SER5xxxx 8/4/2 port serial .It Syba Tech Ltd PCI-4S2P-550-ECP .It +Systembase SB16C1054/8 4/8 port serial +.It Titan PCI-800H/PCI-200H .It VScom: diff --git a/share/man/man4/qlnxe.4 b/share/man/man4/qlnxe.4 index f545235ec1ff..70bad789add1 100644 --- a/share/man/man4/qlnxe.4 +++ b/share/man/man4/qlnxe.4 @@ -24,7 +24,7 @@ .\" SUCH DAMAGE. .\" .Dd May 9, 2017 -.Dt QLNXE 4 +.Dt QLNXE 4 amd64 .Os .Sh NAME .Nm qlnxe diff --git a/share/man/man4/qlxgb.4 b/share/man/man4/qlxgb.4 index 4bf8000d15da..cc97cd060a3f 100644 --- a/share/man/man4/qlxgb.4 +++ b/share/man/man4/qlxgb.4 @@ -24,7 +24,7 @@ .\" SUCH DAMAGE. .\" .Dd November 3, 2011 -.Dt QLXGB 4 +.Dt QLXGB 4 amd64 .Os .Sh NAME .Nm qlxgb diff --git a/share/man/man4/qlxgbe.4 b/share/man/man4/qlxgbe.4 index 486a5ec0f682..465e4fc018ad 100644 --- a/share/man/man4/qlxgbe.4 +++ b/share/man/man4/qlxgbe.4 @@ -24,7 +24,7 @@ .\" SUCH DAMAGE. .\" .Dd April 1, 2013 -.Dt QLXGBE 4 +.Dt QLXGBE 4 amd64 .Os .Sh NAME .Nm qlxgbe diff --git a/share/man/man4/qlxge.4 b/share/man/man4/qlxge.4 index 4723c56ff68b..14a1e1284fab 100644 --- a/share/man/man4/qlxge.4 +++ b/share/man/man4/qlxge.4 @@ -24,7 +24,7 @@ .\" SUCH DAMAGE. .\" .Dd June 21, 2013 -.Dt QLXGE 4 +.Dt QLXGE 4 amd64 .Os .Sh NAME .Nm qlxge diff --git a/share/man/man4/random.4 b/share/man/man4/random.4 index 840bc0c3234b..04d46e4d32aa 100644 --- a/share/man/man4/random.4 +++ b/share/man/man4/random.4 @@ -21,7 +21,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd April 19, 2019 +.Dd August 28, 2025 .Dt RANDOM 4 .Os .Sh NAME @@ -132,6 +132,17 @@ are listed in square brackets. See .Xr random_harvest 9 for more on the harvesting of entropy. +.Pp +The +.Va kern.random.nist_healthtest_enabled +tunable can be used to enable the entropy source health tests outlined +in section 4 of NIST Special Publication 800-90B. +When enabled, all entropy sources will be subject to the repetition +count and adaptive proportion tests described in that document. +If one of the tests fails, the source will be disabled, i.e., all +subsequent entropy samples from that source will be discarded. +The implementation performs startup testing, during which entropy +sources are discarded. .Sh FILES .Bl -tag -width ".Pa /dev/urandom" .It Pa /dev/random diff --git a/share/man/man4/sdhci.4 b/share/man/man4/sdhci.4 index 4a4e02539acd..1608d9c2fe1a 100644 --- a/share/man/man4/sdhci.4 +++ b/share/man/man4/sdhci.4 @@ -1,4 +1,6 @@ .\" +.\" SPDX-License-Identifier: BSD-2-Clause +.\" .\" Copyright (c) 2008 Alexander Motin <mav@FreeBSD.org> .\" All rights reserved. .\" @@ -22,7 +24,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd August 25, 2020 +.Dd October 3, 2025 .Dt SDHCI 4 .Os .Sh NAME @@ -56,21 +58,28 @@ detaches it on card removing. .Sh HARDWARE The .Nm -driver supports different specification compatible chips. -The following chips have been verified to work: +driver supports the SD Host Controller Specification. +When attaching via the PCI bus, +the controller is automatically configured. +Many SoC chips provide a SDHCI controller directly mapped to I/O memory. +For those, the controller may be configured using +.Xr fdt 4 +or +.Xr acpi 4 +methods, supplied by your board's vendor. .Pp -.Bl -bullet -compact -.It -ENE CB712 -.It -ENE CB714 -.It -RICOH R5C822 -.It -RICOH R5CE823 -.It -TI PCIXX21/XX11/XX12 -.El +Unlike most other drivers that support a generic standard, +.Nm +requires a large number of quirks to cope with hardware bugs, +proprietary registers and poorly specified power management. +While many chipsets from +Intel, Xilinx, Rockchip, Frescale, Ricoh, and TI have these entries, +suboptimal performance may result when using some controllers. +Quirks and custom configuration are most often required +when the device is configured via +.Xr fdt 4 +or +.Xr acpi 4 . .Sh SEE ALSO .Xr mmc 4 , .Xr mmcsd 4 @@ -79,8 +88,3 @@ TI PCIXX21/XX11/XX12 .Re .Sh AUTHORS .An Alexander Motin Aq Mt mav@FreeBSD.org -.Sh BUGS -Many of existing SD controller chips have some nonstandard requirements, -proprietary registers and hardware bugs, requiring additional handling. -ENE chips are handled to work fine, while some revisions of RICOH and TI -controllers still do not see cards without some additional initialization. diff --git a/share/man/man4/sfxge.4 b/share/man/man4/sfxge.4 index a9724074581e..ea35cf3e573c 100644 --- a/share/man/man4/sfxge.4 +++ b/share/man/man4/sfxge.4 @@ -27,7 +27,7 @@ .\" policies, either expressed or implied, of the FreeBSD Project. .\" .Dd February 22, 2015 -.Dt SFXGE 4 +.Dt SFXGE 4 amd64 .Os .Sh NAME .Nm sfxge diff --git a/share/man/man4/smartpqi.4 b/share/man/man4/smartpqi.4 index 5b7ea923e13e..f5fab85d13bd 100644 --- a/share/man/man4/smartpqi.4 +++ b/share/man/man4/smartpqi.4 @@ -25,7 +25,7 @@ .\" SUCH DAMAGE. .\" .Dd August 24, 2023 -.Dt SMARTPQI 4 +.Dt SMARTPQI 4 amd64 .Os .Sh NAME .Nm smartpqi diff --git a/share/man/man4/sume.4 b/share/man/man4/sume.4 index 219328a4f4c4..b36f924875e6 100644 --- a/share/man/man4/sume.4 +++ b/share/man/man4/sume.4 @@ -25,7 +25,7 @@ .\" POSSIBILITY OF SUCH DAMAGE. .\" .Dd August 30, 2020 -.Dt SUME 4 +.Dt SUME 4 amd64 .Os .Sh NAME .Nm sume diff --git a/share/man/man4/syncache.4 b/share/man/man4/syncache.4 index e92502fd15ff..f83e9b083e45 100644 --- a/share/man/man4/syncache.4 +++ b/share/man/man4/syncache.4 @@ -10,7 +10,7 @@ .\" notice, this list of conditions and the following disclaimer in the .\" documentation and/or other materials provided with the distribution. .\" -.Dd April 12, 2021 +.Dd August 30, 2025 .Dt SYNCACHE 4 .Os .Sh NAME @@ -39,6 +39,8 @@ MIBs for controlling TCP SYN caching .Nm sysctl Cm net.inet.tcp.syncache.count .It .Nm sysctl Cm net.inet.tcp.syncache.see_other +.It +.Nm sysctl Cm net.inet.tcp.syncache.rst_on_sock_fail .El .Sh DESCRIPTION The @@ -107,6 +109,18 @@ and run only with set .Va net.inet.tcp.syncookies_only to 1. +To use +.Nm syncookies +to handle bucket overflows in the +.Nm syncache +set +.Va net.inet.tcp.syncookies +to 1. +The default value for +.Va net.inet.tcp.syncookies_only +is 0 and the default value for +.Va net.inet.tcp.syncookies +is 1. .Pp The .Nm @@ -169,6 +183,9 @@ However, extra .Xr ucred 9 referencing is required on every incoming SYN packet processed. The default is off. +.It Va rst_on_sock_fail +Send a TCP RST segment if the socket allocation fails. +The default is on. .El .Pp Statistics on the performance of the @@ -206,8 +223,16 @@ Entries dropped due to ICMP unreachable messages. Failures to allocate new .Nm entry. +.It Li "cookies sent" +SYN cookies sent in SYN ACK segments. .It Li "cookies received" -Connections created from segment containing ACK. +ACK segments with valid syncookies which resulted in TCP connection +establishment. +.It Li "spurious cookies rejected" +Received ACKs, for which the syncache lookup failed and also no syncookie was +recently sent. +.It Li "failed cookies rejected" +Received ACKs for which the syncookie validation failed. .El .Sh SEE ALSO .Xr netstat 1 , diff --git a/share/man/man4/tap.4 b/share/man/man4/tap.4 index 95a681a923d2..a4fe98cdfecf 100644 --- a/share/man/man4/tap.4 +++ b/share/man/man4/tap.4 @@ -203,6 +203,21 @@ The argument should be a pointer to a The interface name will be returned in the .Va ifr_name field. +.It Dv TAPSTRANSIENT +The argument should be a pointer to an +.Va int ; +this sets the transient flag on +the +.Nm +device. +A transient +.Nm +will be destroyed upon last close. +.It Dv TAPGTRANSIENT +The argument should be a pointer to an +.Va int ; +this stores the current state (enabled or disabled) of the transient flag into +it. .It Dv FIONBIO Turn non-blocking I/O for reads off or on, according as the argument .Va int Ns 's diff --git a/share/man/man4/tcp.4 b/share/man/man4/tcp.4 index fcfda42908d8..3c9f4ff83f3d 100644 --- a/share/man/man4/tcp.4 +++ b/share/man/man4/tcp.4 @@ -31,7 +31,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd June 27, 2025 +.Dd September 5, 2025 .Dt TCP 4 .Os .Sh NAME @@ -940,9 +940,6 @@ maximum segment size. This helps throughput in general, but particularly affects short transfers and high-bandwidth large propagation-delay connections. -.It Va rfc6675_pipe -Deprecated and superseded by -.Va sack.revised .It Va sack.enable Enable support for RFC 2018, TCP Selective Acknowledgment option, which allows the receiver to inform the sender about all successfully @@ -974,6 +971,11 @@ recovery, the trailing segment is immediately resent, rather than waiting for a Retransmission timeout. Finally, SACK loss recovery is also engaged, once two segments plus one byte are SACKed - even if no traditional duplicate ACKs were observed. +.Va sack.revised +is deprecated and will be removed in +.Fx 16 . +.Va sack.enable +will always follow RFC6675. .It Va sendbuf_auto Enable automatic send buffer sizing. .It Va sendbuf_auto_lowat diff --git a/share/man/man4/thunderbolt.4 b/share/man/man4/thunderbolt.4 new file mode 100644 index 000000000000..fd7cb1f3f338 --- /dev/null +++ b/share/man/man4/thunderbolt.4 @@ -0,0 +1,22 @@ +.\" +.\" Copyright (c) 2025 Alexander Ziaee +.\" +.\" SPDX-License-Identifier: BSD-2-Clause +.\" +.Dd October 2, 2025 +.Dt THUNDERBOLT 4 +.Os +.Sh NAME +.Nm thunderbolt +.Nd USB4 controller driver +.Sh SYNOPSIS +.Cd device thunderbolt +.Sh HARDWARE +The +.Nm +driver supports Thunderbolt 3 and USB4 controllers. +.Sh HISTORY +The +.Nm +driver appeared in +.Fx 15.0 . diff --git a/share/man/man4/tun.4 b/share/man/man4/tun.4 index 58f67cb20acb..1c5bd35f0ab8 100644 --- a/share/man/man4/tun.4 +++ b/share/man/man4/tun.4 @@ -282,6 +282,21 @@ The argument should be a pointer to an the ioctl sets the value to one if the device is in .Dq multi-af mode, and zero otherwise. +.It Dv TUNSTRANSIENT +The argument should be a pointer to an +.Va int ; +this sets the transient flag on +the +.Nm +device. +A transient +.Nm +will be destroyed upon last close. +.It Dv TUNGTRANSIENT +The argument should be a pointer to an +.Va int ; +this stores the current state (enabled or disabled) of the transient flag into +it. .It Dv FIONBIO Turn non-blocking I/O for reads off or on, according as the argument .Vt int Ns 's diff --git a/share/man/man4/u2f.4 b/share/man/man4/u2f.4 new file mode 100644 index 000000000000..4c51e140242e --- /dev/null +++ b/share/man/man4/u2f.4 @@ -0,0 +1,96 @@ +.\" +.\" SPDX-License-Identifier: ISC +.\" +.\" $OpenBSD: fido.4,v 1.4 2020/08/21 19:02:46 mglocker Exp $ +.\" +.\" Copyright (c) 2019 Reyk Floeter <reyk@openbsd.org> +.\" Copyright (c) 2023 Vladimir Kondratyev <wulf@FreeBSD.org> +.\" +.\" Permission to use, copy, modify, and distribute this software for any +.\" purpose with or without fee is hereby granted, provided that the above +.\" copyright notice and this permission notice appear in all copies. +.\" +.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF +.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. +.\" +.Dd August 21, 2023 +.Dt U2F 4 +.Os +.Sh NAME +.Nm u2f +.Nd FIDO/U2F USB security keys +.Sh SYNOPSIS +.Cd "device u2f" +.Pp +In +.Xr loader.conf 5 : +.Cd u2f_load="YES" +.Pp +In +.Xr sysctl.conf 5 : +.Cd hw.hid.u2f.debug +.Sh DESCRIPTION +The +.Nm +driver provides support for FIDO/U2F-compatible USB security keys. +They are Human Interface Devices (HID) which can be accessed via the +.Pa /dev/u2f/N +interface. +.Pp +The driver is compatible with the +.Xr read 2 , +.Xr write 2 , +and +.Xr ioctl 2 +operations of the generic +.Xr uhid 4 +device but only accepts the optional HID +.Xr ioctl 2 +calls from u2f group users. +.Sh HARDWARE +The +.Nm +driver supports FIDO/U2F-compatible USB security keys. +.Sh SYSCTL VARIABLES +The following variables are available as both +.Xr sysctl 8 +variables and +.Xr loader 8 +tunables: +.Bl -tag -width indent +.It Va hw.hid.u2f.debug +Debug output level, where 0 is debugging disabled and larger values increase +debug message verbosity. +Default is 0. +.El +.Sh FILES +.Bl -tag -width /dev/u2f/* -compact +.It Pa /dev/u2f/* +.El +.Sh SEE ALSO +.Xr uhid 4 , +.Xr usbhid 4 , +.Xr usb 4 +.Sh HISTORY +The +.Nm +driver first appeared in +.Fx 15.0 . +.Sh AUTHORS +.An -nosplit +The +.Nm +driver was written by +.An Vladimir Kondratyev Aq Mt wulf@FreeBSD.org . +.Pp +This manual page was written by +.An Vladimir Kondratyev Aq Mt wulf@FreeBSD.org +based on the +.Ox +.Xr fido 4 +manual page. diff --git a/share/man/man4/udbc.4 b/share/man/man4/udbc.4 new file mode 100644 index 000000000000..c8fa02ec18f1 --- /dev/null +++ b/share/man/man4/udbc.4 @@ -0,0 +1,132 @@ +.\" +.\" Copyright (c) 2025 The FreeBSD Foundation +.\" +.\" This documentation was written by Tom Jones <thj@freebsd.org> under +.\" sponsorship from the FreeBSD Foundation. +.\" +.\" SPDX-License-Identifier: BSD-2-Clause +.\" +.\" +.Dd September 3, 2025 +.Dt UDBC 4 +.Os +.Sh NAME +.Nm udbc +.Nd USB Debug Class device driver +.Sh SYNOPSIS +.Cd "device usb" +.Cd "device ucom" +.Cd "device udbc" +.Pp +In +.Xr rc.conf 5 : +.Cd kld_list="udbc" +.Sh DESCRIPTION +The +.Nm +driver provides support for USB Debug Class devices whose +interface class is Diagnostic Class and the subclass is DbC.GP. +.Pp +The USB Debug Class is defined in the USB 3.1 Device Class +Specification for Debug Devices. +This is designed to provide a general-purpose communication channel +for debugging. +It has also been widely implemented in USB xHCs +.Pq USB eXtensible Host Controllers , +which can be found on many commodity computers, +as an optional feature. +Once this feature is enabled on a USB xHC, one of the USB ports will +behave as a USB Debug Class device, +not a host port, +when a USB debug cable is connected. +The supported class in USB xHCs is typically DbC.GP, +while the specification defines several types of Debug Class devices. +The DbC.GP uses IN and OUT endpoint pairs and realizes a single +bidirectional serial communication channel. +On most systems, +including +.Fx , +the DbC.GP is seen as a simple serial device. +.Pp +Most systems with USB xHC can be configured to provide DbC.GP access. +The +.Nm +is a driver that connects to DbC.GP-supported devices, +offering +.Xr tty 4 +devices to connect to them via the +.Xr ucom 4 +device driver. +.Sh HARDWARE CONFIGURATION +A native DbC.GP device can be attached using the +.Nm +driver in a straightforward way. +.Pp +A USB xHC DbC.GP device on a target system needs a special hardware +configuration because all of the ports are supposed to be a USB Host. +There is one method to expose DbC.GP is to use a USB 3.1 A-to-A cable +.Pq section 5.5.2 in USB 3.1 Legacy Cable and Connector Specification . +When this cable is connected to a USB 3.1 port on the target system, +the DbC-enabled USB xHC automatically switches the port as a USB Device. +The +.Nm +driver can find a DbC.GP device on that port. +.Pp +Note that a USB xHC with USB 3.2 support +.Pq USB Type-C connectors +is not compatible with the USB 3.1 A-to-A cable. +Connecting a USB 3.2 C-to-C cable or A-to-C cable does not automatically work, +either, +because it needs role configuration of the port, which is not supported on +.Fx +yet. +.Sh FILES +.Bl -tag -width "/dev/ttyU*.*.init" -compact +.It Pa /dev/ttyU*.* +for callin ports +.It Pa /dev/ttyU*.*.init +.It Pa /dev/ttyU*.*.lock +corresponding callin initial-state and lock-state devices +.Pp +.It Pa /dev/cuaU*.* +for callout ports +.It Pa /dev/cuaU*.*.init +.It Pa /dev/cuaU*.*.lock +corresponding callout initial-state and lock-state devices +.El +.Sh SEE ALSO +.Xr tty 4 , +.Xr ucom 4 , +.Xr usb 4 , +.Xr xhci 4 +.Sh STANDARDS +.Rs +.%T eXtensible Host Controller Interface for Universal Serial Bus (XHCI) +.%U https://www.intel.com/content/dam/www/public/us/en/documents/technical-specifications/extensible-host-controler-interface-usb-xhci.pdf +.Re +.Rs +.%T USB 3.1 Device Class Specification for Debug Devices +.%U https://www.usb.org/sites/default/files/documents/usb_debug_class_rev_1_0_final_0.pdf +.Re +.Rs +.%T USB 3.1 Legacy Cable and Connector Specification +.%U https://www.usb.org/document-library/usb-31-legacy-cable-and-connector-revision-10 +.Re +.Sh HISTORY +The +.Nm +driver first appeared +.Fx +15.0. +.Sh AUTHORS +.An -nosplit +The +.Nm +driver was written by +.An Hiroki Sato Aq Mt hrs@FreeBSD.org . +.Sh BUGS +According to the XHCI specification the host side of USB Debug should work with +any USB 3.0 port, +whether connected directly to a controller or with a hub in between. +Testing on some controllers has encountered issues when using a hub rather than +a directly connected port on the controller. diff --git a/share/man/man4/umass.4 b/share/man/man4/umass.4 index 03e8b6ff6ef1..8c6b03a3afea 100644 --- a/share/man/man4/umass.4 +++ b/share/man/man4/umass.4 @@ -1,3 +1,6 @@ +.\" +.\" SPDX-License-Identifier: BSD-2-Clause +.\" .\" Copyright (c) 1999 .\" Nick Hibma <n_hibma@FreeBSD.org>. All rights reserved. .\" @@ -22,44 +25,44 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd January 27, 2020 +.Dd October 9, 2025 .Dt UMASS 4 .Os .Sh NAME .Nm umass .Nd USB Mass Storage Devices driver .Sh SYNOPSIS -To compile this driver into the kernel, -place the following line in your -kernel configuration file: -.Bd -ragged -offset indent +.Cd "device da" .Cd "device scbus" +.Cd "device pass" .Cd "device usb" .Cd "device umass" -.Ed .Pp -Alternatively, to load the driver as a -module at boot time, place the following line in +In .Xr loader.conf 5 : -.Bd -literal -offset indent -umass_load="YES" -.Ed +.Cd umass_load .Sh DESCRIPTION The .Nm driver provides support for Mass Storage devices that attach to the USB -port. +interface. .Pp -To use the -.Nm -driver, +If the appropriate hardware is detected, +the driver will be loaded automatically by +.Xr devmatch 8 . +To load the driver manually at boot time, use the +.Cm umass_load +command at the +.Xr loader 8 +prompt, or add it to +.Xr loader.conf 5 . +.Pp +To use the driver in a custom kernel, .Xr usb 4 -and one of -.Xr uhci 4 -or -.Xr ohci 4 -or -.Xr ehci 4 +and at least one of +.Xr uhci 4 , +.Xr ohci 4 , +.Xr ehci 4 , or .Xr xhci 4 must be configured in the kernel. @@ -71,17 +74,22 @@ requires and .Xr scbus 4 to be included in the kernel. -.Sh EXAMPLES -.Bd -literal -offset indent -device umass -device scbus -device da -device pass -.Ed -.Pp -Add the +.Sh HARDWARE +The .Nm -driver to the kernel. +driver supports USB Mass Storage devices such as: +.Pp +.Bl -bullet -compact +.It +USB thumb drives +.It +USB hard disk drives +.It +USB floppy drives +.El +.Sh EXAMPLES +Rescan all slots on a multi-slot flash reader, +where the slots map to separate LUNs on a single SCSI ID: .Bd -literal -offset indent camcontrol rescan 0:0:0 camcontrol rescan 0:0:1 @@ -89,10 +97,9 @@ camcontrol rescan 0:0:2 camcontrol rescan 0:0:3 .Ed .Pp -Rescan all slots on a multi-slot flash reader, where the slots map to separate -LUNs on a single SCSI ID. Typically only the first slot will be enabled at boot time. -This assumes that the flash reader is the first SCSI bus in the system and has 4 slots. +This assumes that +the flash reader is the first SCSI bus in the system and has 4 slots. .Sh SEE ALSO .Xr cfumass 4 , .Xr ehci 4 , @@ -101,7 +108,11 @@ This assumes that the flash reader is the first SCSI bus in the system and has 4 .Xr usb 4 , .Xr xhci 4 , .Xr camcontrol 8 -.\".Sh HISTORY +.Sh HISTORY +The +.Nm +driver appeared in +.Fx 4.3 . .Sh AUTHORS .An -nosplit The diff --git a/share/man/man4/umb.4 b/share/man/man4/umb.4 index 7ecc9a39c1ca..37c86b3074f5 100644 --- a/share/man/man4/umb.4 +++ b/share/man/man4/umb.4 @@ -17,34 +17,33 @@ .\" .\" $NetBSD: umb.4,v 1.4 2019/08/30 09:22:17 wiz Exp $ .\" -.Dd May 11, 2025 +.Dd September 3, 2025 .Dt UMB 4 .Os .Sh NAME .Nm umb .Nd USB Mobile Broadband Interface Model (MBIM) cellular modem driver .Sh SYNOPSIS -To compile this driver into the kernel, -place the following lines in your -kernel configuration file: -.Bd -ragged -offset indent .Cd "device usb" .Cd "device umb" -.Ed .Pp -Alternatively, to load the driver as a -module at boot time, place the following line in +In .Xr loader.conf 5 : -.Bd -literal -offset indent -umb_load="YES" -.Ed -.Pp -If neither of the above is done, the driver will automatically be loaded -by devd(8) when the device is connected. +.Cd umb_load="YES" .Sh DESCRIPTION The .Nm driver provides support for USB MBIM devices. +If the appropriate hardware is detected, +the driver will be loaded automatically by +.Xr devmatch 8 . +To load the driver manually, +.Cm load +it in +.Xr loader.conf 5 +or at the +.Xr loader 8 +prompt. .Pp MBIM devices establish connections via cellular networks such as GPRS, UMTS, and LTE. diff --git a/share/man/man4/usbhid.4 b/share/man/man4/usbhid.4 index e5ba370cd025..0b2e7230e3f4 100644 --- a/share/man/man4/usbhid.4 +++ b/share/man/man4/usbhid.4 @@ -21,7 +21,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd July 30, 2025 +.Dd October 2, 2025 .Dt USBHID 4 .Os .Sh NAME @@ -67,9 +67,13 @@ Default is 1. Debug output level, where 0 is debugging disabled and larger values increase debug message verbosity. Default is 0. +Debug messages are printed on the system console and can be viewed using +.Xr dmesg 8 . .El .Sh SEE ALSO .Xr ehci 4 , +.Xr hkbd 4 , +.Xr hms 4 , .Xr ohci 4 , .Xr uhci 4 , .Xr usb 4 , @@ -80,6 +84,8 @@ The .Nm driver first appeared in .Fx 13.0 . +It was enabled by default in +.Fx 15.0 . .Sh AUTHORS .An -nosplit The diff --git a/share/man/man4/vtnet.4 b/share/man/man4/vtnet.4 index 8b99cd9f17b9..fd41b36882a6 100644 --- a/share/man/man4/vtnet.4 +++ b/share/man/man4/vtnet.4 @@ -22,7 +22,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd July 29, 2025 +.Dd September 30, 2025 .Dt VTNET 4 .Os .Sh NAME @@ -54,6 +54,20 @@ TCP segmentation offload (TSO), TCP large receive offload (LRO), hardware VLAN tag stripping/insertion features, a multicast hash filter, as well as Jumbo Frames (up to 9216 bytes), which can be configured via the interface MTU setting. +.Pp +Two flavors of TCP LRO are supported: +Hardware TCP LRO, which is performed by the host providing TCP segments larger +than the MTU to the guest, and Software TCP LRO, which is performed by the +network stack of the guest processing TCP segments in an optimized way. +Only one flavour of TCP LRO should be used. +Since hardware TCP LRO can have bad interactions with IP forwarding and +software TCP LRO mitigates several drawbacks of hardware TCP LRO, the default +setting is to disable hardware TCP LRO. +See the loader tunable +.Va hw.vtnet. Ns Ar X Ns Va .lro_disable . +.Pp +TCP/UDP receive checksum offload cannot be configured independently for IPv4 +and IPv6. Selecting an MTU larger than 1500 bytes with the .Xr ifconfig 8 utility configures the adapter to receive and transmit Jumbo Frames. @@ -68,21 +82,32 @@ prompt before booting the kernel or stored in .Bl -tag -width "xxxxxx" .It Va hw.vtnet.csum_disable .It Va hw.vtnet. Ns Ar X Ns Va .csum_disable -This tunable disables receive and send checksum offload. +This tunable disables receive and transmit checksum offloading for TCP and +UDP. +This also implies that TCP segmentation offloading and large receive offload +are disabled. The default value is 0. .It Va hw.vtnet.fixup_needs_csum .It Va hw.vtnet. Ns Ar X Ns Va .fixup_needs_csum -This tunable enforces the calculation of a valid checksum for NEEDS_CSUM -packets. +This tunable enforces the calculation of a valid TCP or UDP checksum for +packets received with +.Dv VIRTIO_NET_HDR_F_NEEDS_CSUM +being set in the +.Va flags +field of the structure +.Vt struct virtio_net_hdr . +It also marks the checksum as being correct in the mbuf packet header. The default value is 0. +This tunable is deprecated and will be removed in +.Fx 16 . .It Va hw.vtnet.tso_disable .It Va hw.vtnet. Ns Ar X Ns Va .tso_disable -This tunable disables TSO. +This tunable disables TCP segmentation offloading. The default value is 0. .It Va hw.vtnet.lro_disable .It Va hw.vtnet. Ns Ar X Ns Va .lro_disable -This tunable disables LRO. -The default value is 0. +This tunable disables hardware TCP LRO. +The default value is 1. .It Va hw.vtnet.mq_disable .It Va hw.vtnet. Ns Ar X Ns Va .mq_disable This tunable disables multiqueue. @@ -106,17 +131,147 @@ This tunable sets the number of RX segments processed in one pass. The default value is 1024. .It Va hw.vtnet.lro_entry_count .It Va hw.vtnet. Ns Ar X Ns Va .lro_entry_count -This tunable sets the software LRO entry count. +This tunable sets the software TCP LRO entry count. The default value is 128, the minimum value is 8. .It Va hw.vtnet.lro_mbufq_depth .It Va hw.vtnet. Ns Ar X Ns Va .lro_mbufq_depth -This tunable sets the depth of the software LRO mbuf queue. +This tunable sets the depth of the software TCP LRO mbuf queue. The default value is 0. .It Va hw.vtnet.altq_disable This tunable disables ALTQ support, allowing the use of multiqueue instead. This option applies to all interfaces. The default value is 0. .El +.Sh TRANSMIT QUEUE STATISTICS +For each transmit queue of each interface the following read-only statistics +are provided: +.Bl -tag -width "xxxxxx" +.It Va dev.vtnet. Ns Ar X Ns Va .txq Ns Ar Y Ns Va .rescheduled +The number of times the transmit interrupt handler was rescheduled. +.It Va dev.vtnet. Ns Ar X Ns Va .txq Ns Ar Y Ns Va .tso +The number of times TCP segment offloading was performed. +.It Va dev.vtnet. Ns Ar X Ns Va .txq Ns Ar Y Ns Va .csum +The number of times transmit checksum offloading for UDP or TCP was +performed. +.It Va dev.vtnet. Ns Ar X Ns Va .txq Ns Ar Y Ns Va .omcasts +The number of multicast packets that were transmitted. +.It Va dev.vtnet. Ns Ar X Ns Va .txq Ns Ar Y Ns Va .obytes +The number of bytes that were transmitted (based on Ethernet frames). +.It Va dev.vtnet. Ns Ar X Ns Va .txq Ns Ar Y Ns Va .opackets +The number of packets that were transmitted (Ethernet frames). +.El +.Sh RECEIVE QUEUE STATISTICS +For each receive queue of each interface the following read-only statistics +are provided: +.Bl -tag -width "xxxxxx" +.It Va dev.vtnet. Ns Ar X Ns Va .rxq Ns Ar Y Ns Va .rescheduled +The number of times the receive interrupt handler was rescheduled. +.It Va dev.vtnet. Ns Ar X Ns Va .rxq Ns Ar Y Ns Va .host_lro +The number of times TCP large receive offload was performed. +.It Va dev.vtnet. Ns Ar X Ns Va .rxq Ns Ar Y Ns Va .csum_failed +The number of times a packet with a request for receive or transmit checksum +offloading was received and this request failed. +The different reasons for the failure are counted by +.Va dev.vtnet. Ns Ar X Ns Va .rx_csum_inaccessible_ipproto , +.Va dev.vtnet. Ns Ar X Ns Va .rx_csum_bad_ipproto , +.Va dev.vtnet. Ns Ar X Ns Va .rx_csum_bad_ethtype , +and +.Va dev.vtnet. Ns Ar X Ns Va .rx_csum_bad_offset . +.It Va dev.vtnet. Ns Ar X Ns Va .rxq Ns Ar Y Ns Va .csum +The number of times receive checksum offloading for UDP or TCP was performed. +.It Va dev.vtnet. Ns Ar X Ns Va .rxq Ns Ar Y Ns Va .ierrors +The number of times an error occurred during input processing. +.It Va dev.vtnet. Ns Ar X Ns Va .rxq Ns Ar Y Ns Va .iqdrops +The number of times a packet was dropped during input processing. +.It Va dev.vtnet. Ns Ar X Ns Va .rxq Ns Ar Y Ns Va .ibytes +The number of bytes that were received (based on Ethernet frames). +.It Va dev.vtnet. Ns Ar X Ns Va .rxq Ns Ar Y Ns Va .ipackets +The number of packets that were received (Ethernet frames). +.El +.Sh INTERFACE TRANSMIT STATISTICS +For each interface the following read-only transmit statistics are provided: +.Bl -tag -width "xxxxxx" +.It Va dev.vtnet. Ns Ar X Ns Va .tx_task_rescheduled +The sum of +.Va dev.vtnet. Ns Ar X Ns Va .txq Ns Ar Y Ns Va .rescheduled +over all transmit queues of the interface. +.It Va dev.vtnet. Ns Ar X Ns Va .tx_tso_offloaded +The sum of +.Va dev.vtnet. Ns Ar X Ns Va .txq Ns Ar Y Ns Va .tso +over all transmit queues of the interface. +.It Va dev.vtnet. Ns Ar X Ns Va .tx_csum_offloaded +The sum of +.Va dev.vtnet. Ns Ar X Ns Va .txq Ns Ar Y Ns Va .csum +over all transmit queues of the interface. +.It Va dev.vtnet. Ns Ar X Ns Va .tx_defrag_failed +The number of times an attempt to defragment an mbuf chain failed during a +transmit operation. +.It Va dev.vtnet. Ns Ar X Ns Va .tx_defragged +The number of times an mbuf chain was defragmented during a transmit operation. +.It Va dev.vtnet. Ns Ar X Ns Va .tx_tso_without_csum +The number of times TCP segment offloading was attempted without transmit +checksum offloading. +.It Va dev.vtnet. Ns Ar X Ns Va .tx_tso_not_tcp +The number of times TCP segment offloading was attempted for a non-TCP packet. +.It Va dev.vtnet. Ns Ar X Ns Va .tx_csum_proto_mismatch +The number of times the IP protocol version of the transmit checksum +offloading request did not match the IP protocol version of the packet. +.It Va dev.vtnet. Ns Ar X Ns Va .tx_csum_unknown_ethtype +The number of times a transmit offload operation was requested for an +ethernet frame for which the EtherType was neither IPv4 nor IPv6 +(considering simple VLAN tagging). +.El +.Sh INTERFACE RECEIVE STATISTICS +For each interface the following read-only receive statistics are provided: +.Bl -tag -width "xxxxxx" +.It Va dev.vtnet. Ns Ar X Ns Va .rx_task_rescheduled +The sum of +.Va dev.vtnet. Ns Ar X Ns Va .rxq Ns Ar Y Ns Va .rescheduled +over all receive queues of the interface. +.It Va dev.vtnet. Ns Ar X Ns Va .rx_csum_offloaded +The sum of +.Va dev.vtnet. Ns Ar X Ns Va .rxq Ns Ar Y Ns Va .csum +over all receive queues of the interface. +.It Va dev.vtnet. Ns Ar X Ns Va .rx_csum_failed +The sum of +.Va dev.vtnet. Ns Ar X Ns Va .rxq Ns Ar Y Ns Va .csum_failed +over all receive queues of the interface. +.It Va dev.vtnet. Ns Ar X Ns Va .rx_csum_inaccessible_ipproto +The number of times a packet with a request for receive or transmit checksum +offloading was received where the IP protocol was not accessible. +.It Va dev.vtnet. Ns Ar X Ns Va .rx_csum_bad_offset +The number of times fixing the checksum required by +.Va hw.vtnet.fixup_needs_csum +or +.Va hw.vtnet. Ns Ar X Ns Va .fixup_needs_csum +was attempted for a packet where the csum is not located in the first mbuf. +.It Va dev.vtnet. Ns Ar X Ns Va .rx_csum_bad_ipproto +The number of times a packet with a request for receive or transmit checksum +offloading was received where the IP protocol was neither TCP nor UDP. +.It Va dev.vtnet. Ns Ar X Ns Va .rx_csum_bad_ethtype +The number of times a packet with a request for receive or transmit checksum +offloading was received where the EtherType was neither IPv4 nor IPv6. +.It Va dev.vtnet. Ns Ar X Ns Va .rx_mergeable_failed +The number of times receiving a mergable buffer failed. +.It Va dev.vtnet. Ns Ar X Ns Va .rx_enq_replacement_failed +The number of times the enqueuing the replacement receive mbuf chain failed. +.It Va dev.vtnet. Ns Ar X Ns Va .rx_frame_too_large +The number of times the frame was loger than the mbuf chain during large +receive offload without mergeable buffers. +.It Va dev.vtnet. Ns Ar X Ns Va .mbuf_alloc_failed +The number of times an mbuf cluster allocation for the receive buffer failed. +.El +.Sh INTERFACE CONFIGURATION PARAMETER +For each interface the following read-only configuration parameters are +provided: +.Bl -tag -width "xxxxxx" +.It Va dev.vtnet. Ns Ar X Ns Va .act_vq_pairs +The number of active virtqueue pairs. +.It Va dev.vtnet. Ns Ar X Ns Va .req_vq_pairs +The number of requested virtqueue pairs. +.It Va dev.vtnet. Ns Ar X Ns Va .max_vq_pairs +The maximum number of supported virtqueue pairs. +.El .Sh SEE ALSO .Xr arp 4 , .Xr netintro 4 , diff --git a/share/man/man4/watchdog.4 b/share/man/man4/watchdog.4 index b74640de8469..fc2d600328dd 100644 --- a/share/man/man4/watchdog.4 +++ b/share/man/man4/watchdog.4 @@ -41,24 +41,22 @@ The device supports several optional .Xr ioctl 2 calls for configuration, and -responds to a single operational +responds to a set of operational .Xr ioctl 2 -call, -.Dv WDIOCPATPAT . -It takes a single argument which represents a timeout value specified as a -power of two nanoseconds, or-ed with a flag selecting active or passive control -of the watchdog. +calls: +.Bl -tag -width "WDIOC_CONTROL int " +.It Dv WDIOCPATPAT +Pat the watchdog. +.It Dv WDIOC_CONTROL +Enable, disable, or reset the watchdog. +.El .Pp -.Dv WD_ACTIVE -indicates that the -.Nm -will be kept from timing out from userland, for instance by the -.Xr watchdogd 8 -daemon. -.Dv WD_PASSIVE -indicates that the -.Nm -will be kept from timing out from the kernel. +The +.Dv WDIOCPATPAT +.Xr ioctl 2 +call takes a single argument which represents a timeout value specified as a +.Vt sbintime_t +of the timeout period for the watchdog. .Pp The .Dv WDIOCPATPAT @@ -77,27 +75,43 @@ none of implementations support the timeout length, all watchdogs are disabled and must be explicitly re-enabled. .Pp -To disable the watchdogs pass -.Dv WD_TO_NEVER . +To disable the watchdogs use the +.Dv WDIOC_CONTROL +.Xr ioctl 2 +call with the +.Dv WD_CTRL_DISABLE +flag. If disarming the watchdog(s) failed an error is returned. The watchdog might still be armed! +To reenable the watchdogs use the +.Dv WDIOC_CONTROL +.Xr ioctl 2 +call with the +.Dv WD_CTRL_ENABLE +flag. +Another way to pat the watchdog is with the +.Dv WDIOC_CONTROL +.Xr ioctl 2 +call passing the +.Dv WDIOC_CTRL_RESET +flag. .Pp The optional configuration .Xr ioctl 2 commands are listed here, along with the type of the parameter used. Examples of their use can be found in .Xr watchdogd 8 . -.Bl -tag -width "WDIOC_SETSOFTTIMEOUTACT int " -.It Dv WDIOC_SETTIMEOUT Fa int +.Bl -tag -width "WDIOC_GETPRETTIMEOUT sbintime_t" +.It Dv WDIOC_SETTIMEOUT Fa sbintime_t set/reset the timer -.It Dv WDIOC_GETTIMEOUT Fa int +.It Dv WDIOC_GETTIMEOUT Fa sbintime_t get total timeout -.It Dv WDIOC_GETTIMELEFT Fa int +.It Dv WDIOC_GETTIMELEFT Fa sbintime_t get time left -.It Dv WDIOC_GETPRETIMEOUT Fa int +.It Dv WDIOC_GETPRETIMEOUT Fa sbintime_t get the pre-timeout -.It Dv WDIOC_SETPRETIMEOUT Fa int +.It Dv WDIOC_SETPRETIMEOUT Fa sbintime_t set the pre-timeout .It Dv WDIOC_SETPRETIMEOUTACT Fa int Set the action when a pre-timeout occurs (see diff --git a/share/man/man5/Makefile b/share/man/man5/Makefile index 0f6559b236c6..c13a8b7afde2 100644 --- a/share/man/man5/Makefile +++ b/share/man/man5/Makefile @@ -73,9 +73,11 @@ MANGROUPS+= BOOTLOADER BOOTLOADER= device.hints.5 BOOTLOADERPACKAGE=bootloader -MANGROUPS+= CLANG -CLANG= ar.5 -CLANGPACKAGE= clang +.if ${MK_TOOLCHAIN} != "no" +MANGROUPS+= TOOLCHAIN +TOOLCHAIN= ar.5 +TOOLCHAINPACKAGE=toolchain +.endif MANGROUPS+= LP LP= hosts.lpd.5 diff --git a/share/man/man5/group.5 b/share/man/man5/group.5 index 044164a3c955..8f7c59c59d52 100644 --- a/share/man/man5/group.5 +++ b/share/man/man5/group.5 @@ -25,7 +25,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd February 8, 2013 +.Dd August 29, 2025 .Dt GROUP 5 .Os .Sh NAME @@ -145,6 +145,7 @@ may still have this limit. .Sh SEE ALSO .Xr newgrp 1 , .Xr passwd 1 , +.Xr setcred 2 , .Xr setgroups 2 , .Xr crypt 3 , .Xr getgrent 3 , diff --git a/share/man/man5/periodic.conf.5 b/share/man/man5/periodic.conf.5 index a2ed2b09d772..8910895d9b89 100644 --- a/share/man/man5/periodic.conf.5 +++ b/share/man/man5/periodic.conf.5 @@ -981,7 +981,7 @@ since yesterday's check. Space-separated list of additional anchors whose denied packets log entries to show. The main ruleset (i.e., the empty-string anchor) and any -.Xr blacklistd 8 +.Xr blocklistd 8 anchors, if present, are always shown. .It Va security_status_pfdenied_period .Pq Vt str diff --git a/share/man/man5/pf.conf.5 b/share/man/man5/pf.conf.5 index a9ae823257a4..41410d6bc0fa 100644 --- a/share/man/man5/pf.conf.5 +++ b/share/man/man5/pf.conf.5 @@ -27,7 +27,7 @@ .\" ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE .\" POSSIBILITY OF SUCH DAMAGE. .\" -.Dd July 30, 2025 +.Dd October 7, 2025 .Dt PF.CONF 5 .Os .Sh NAME @@ -92,14 +92,20 @@ keyword, for example: include "/etc/pf/sub.filter.conf" .Ed .Sh MACROS -Macros can be defined that will later be expanded in context. -Macro names must start with a letter, and may contain letters, digits -and underscores. -Macro names may not be reserved words (for example +A macro is defined with a command of the form +.Ar name Ns = Ns Ar value . +The macro +.Ar name +can contain letters, digits, and underscores and cannot be a reserved word +(for example, .Ar pass , .Ar in , +or .Ar out ) . -Macros are not expanded inside quotes. +Within unquoted arguments, the string +.Pf $ Ar name +is later expanded to +.Ar value . Ranges of network addresses used in macros that will be expanded in lists later on must be quoted with additional simple quotes. .Pp @@ -267,6 +273,10 @@ which corresponds to the connection state. Each packet which matches this state will reset the TTL. Tuning these values may improve the performance of the firewall at the risk of dropping valid idle connections. +Alternatively, these values may be adjusted collectively +in a manner suitable for a specific environment using +.Cm set optimization +(see above). .Pp .Bl -tag -width xxxx -compact .It Ar tcp.first @@ -274,6 +284,9 @@ The state after the first packet. .It Ar tcp.opening The state after the second packet but before both endpoints have acknowledged the connection. +.It Ar tcp.tsdiff +Maximum allowed time difference between RFC 1323 compliant packet timestamps. +30 seconds by default. .It Ar tcp.established The fully established state. .It Ar tcp.closing @@ -2245,6 +2258,13 @@ When the rate is exceeded, all ICMP is blocked until the rate falls below .It Ar max-pkt-size Aq Ar number Limit each packet to be no more than the specified number of bytes. This includes the IP header, but not any layer 2 header. +.It Ar once +Create a one shot rule. +The first matching packet marks the rule as expired. +Expired rules are skipped and hidden, unless +.Xr pfctl 8 +is used in debug or verbose mode. +.Pp .It Xo Ar queue Aq Ar queue .No \*(Ba ( Aq Ar queue , .Aq Ar queue ) @@ -2357,7 +2377,7 @@ packets matching the same connection. .It Ar route-to The .Ar route-to -option routes the packet to the specified interface with an optional address +option routes the packet to the specified interface with an address for the next hop. When a .Ar route-to @@ -2470,7 +2490,13 @@ NAT address and port. This feature implements "full-cone" NAT behavior. .El .Pp -Additionally, the +Additionally, options +.Ar sticky-address +and +.Ar prefer-ipv6-nexthop +can be specified to influence how IP addresses selected from pools. +.Pp +The .Ar sticky-address option can be specified to help ensure that multiple connections from the same source are mapped to the same redirection address. @@ -2486,6 +2512,14 @@ beyond the lifetime of the states, increase the global options with See .Sx STATEFUL TRACKING OPTIONS for more ways to control the source tracking. +.Pp +The +.Ar prefer-ipv6-nexthop +option allows for IPv6 addresses to be used as the nexthop +for IPv4 packets routed with the +.Ar route-to +rule option. If a table is used with IPv4 and IPv6 addresses, first the IPv6 addresses +will be used in round-robin fashion, then IPv4 addresses. .Sh STATE MODULATION Much of the security derived from TCP is attributable to how well the initial sequence numbers (ISNs) are chosen. @@ -3416,7 +3450,7 @@ filteropt = user | group | flags | icmp-type | icmp6-type | "tos" tos | [ "(" state-opts ")" ] | "fragment" | "no-df" | "min-ttl" number | "set-tos" tos | "max-mss" number | "random-id" | "reassemble tcp" | - fragmentation | "allow-opts" | + fragmentation | "allow-opts" | "once" | "label" string | "tag" string | [ "!" ] "tagged" string | "max-pkt-rate" number "/" seconds | "set prio" ( number | "(" number [ [ "," ] number ] ")" ) | @@ -3518,7 +3552,7 @@ hosts = "all" | ipspec = "any" | host | "{" host-list "}" host = [ "!" ] ( address [ "/" mask-bits ] | "<" string ">" ) redirhost = address [ "/" mask-bits ] -routehost = "(" interface-name [ address [ "/" mask-bits ] ] ")" +routehost = "(" interface-name address [ "/" mask-bits ] ")" address = ( interface-name | interface-group | "(" ( interface-name | interface-group ) ")" | hostname | ipv4-dotted-quad | ipv6-coloned-hex ) @@ -3566,7 +3600,7 @@ fragmentation = [ "fragment reassemble" ] timeout-list = timeout [ [ "," ] timeout-list ] timeout = ( "tcp.first" | "tcp.opening" | "tcp.established" | - "tcp.closing" | "tcp.finwait" | "tcp.closed" | + "tcp.closing" | "tcp.finwait" | "tcp.closed" | "tcp.tsdiff" | "sctp.first" | "sctp.opening" | "sctp.established" | "sctp.closing" | "sctp.closed" | "udp.first" | "udp.single" | "udp.multiple" | @@ -3580,7 +3614,7 @@ limit-item = ( "states" | "frags" | "src-nodes" ) number pooltype = ( "bitmask" | "random" | "source-hash" [ ( hex-key | string-key ) ] | - "round-robin" ) [ sticky-address ] + "round-robin" ) [ sticky-address | prefer-ipv6-nexthop ] subqueue = string | "{" queue-list "}" queue-list = string [ [ "," ] string ] diff --git a/share/man/man5/rc.conf.5 b/share/man/man5/rc.conf.5 index de2181d638d1..edbfa937f8df 100644 --- a/share/man/man5/rc.conf.5 +++ b/share/man/man5/rc.conf.5 @@ -22,7 +22,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd July 15, 2025 +.Dd October 5, 2025 .Dt RC.CONF 5 .Os .Sh NAME @@ -3867,27 +3867,6 @@ is set to these are the flags to pass to the .Xr sshd 8 daemon. -.It Va ftpd_program -.Pq Vt str -Path to the FTP server program -.Pa ( /usr/libexec/ftpd -is the default). -.It Va ftpd_enable -.Pq Vt bool -Set to -.Dq Li YES -to start -.Xr ftpd 8 -as a stand-alone daemon at system boot time. -.It Va ftpd_flags -.Pq Vt str -If -.Va ftpd_enable -is set to -.Dq Li YES , -these are the additional flags to pass to the -.Xr ftpd 8 -daemon. .It Va watchdogd_enable .Pq Vt bool If set to @@ -4584,20 +4563,16 @@ If set to .Dq Li YES , delays the start of network-reliant services until .Va netwait_if -is up and ICMP packets to a destination defined in +is up, duplicate address discovery (DAD) has completed, and ICMP +packets to a destination defined in .Va netwait_ip are flowing. -Link state is examined first, followed by +Link state is examined first, followed by DAD, then .Dq Li pinging an IP address to verify network usability. If no destination can be reached or timeouts are exceeded, network services are started anyway with no guarantee that the network is usable. -Use of this variable requires both -.Va netwait_ip -and -.Va netwait_if -to be set. .It Va netwait_ip .Pq Vt str Empty by default. @@ -4633,6 +4608,21 @@ interface if desired. Defines the total number of seconds to wait for link to become usable, polled at a 1-second interval. The default is 30. +.It Va netwait_dad +.Pq Vt str +Set to +.Dq Li NO +by default. +Set to +.Dq Li YES +to enable waiting for DAD to complete. +.It Va netwait_dad_timeout +.Pq Vt int +Unset by default. +Indicates the maximum number of seconds to wait for DAD to complete. +If zero or unset, the timeout will be one more than the value of the +.Va net.inet6.ip6.dad_count +sysctl variable. .It Va rctl_enable .Pq Vt bool If set to @@ -5116,7 +5106,6 @@ to .Xr cron 8 , .Xr devfs 8 , .Xr dhclient 8 , -.Xr ftpd 8 , .Xr geli 8 , .Xr hcsecd 8 , .Xr ifconfig 8 , diff --git a/share/man/man5/src.conf.5 b/share/man/man5/src.conf.5 index 2e694bfe3293..1bb609336532 100644 --- a/share/man/man5/src.conf.5 +++ b/share/man/man5/src.conf.5 @@ -1,5 +1,5 @@ .\" DO NOT EDIT-- this file is @generated by tools/build/options/makeman. -.Dd August 8, 2025 +.Dd October 1, 2025 .Dt SRC.CONF 5 .Os .Sh NAME @@ -29,8 +29,11 @@ variables that control the aspects of how the system builds. .Pp The default location of .Nm -is -.Pa /etc/src.conf , +is the top level of the source tree, or +.Pa /etc/src.conf +if no +.Nm +is found in the source tree itself, though an alternative location can be specified in the .Xr make 1 variable @@ -223,10 +226,15 @@ options provide "full" Relocation Read-Only (RELRO) support. With full RELRO the entire GOT is made read-only after performing relocation at startup, avoiding GOT overwrite attacks. .It Va WITHOUT_BLACKLIST -Set this if you do not want to build -.Xr blacklistd 8 -and -.Xr blacklistctl 8 . +This option has been renamed to +.Va WITHOUT_BLOCKLIST . +When set, it enforces these options: +.Pp +.Bl -item -compact +.It +.Va WITHOUT_BLOCKLIST +.El +.Pp When set, these options are also in effect: .Pp .Bl -inset -compact @@ -234,13 +242,38 @@ When set, these options are also in effect: (unless .Va WITH_BLACKLIST_SUPPORT is set explicitly) +.It Va WITHOUT_BLOCKLIST_SUPPORT +(unless +.Va WITH_BLOCKLIST_SUPPORT +is set explicitly) .El .It Va WITHOUT_BLACKLIST_SUPPORT +This option has been renamed to +.Va WITHOUT_BLOCKLIST_SUPPORT . +When set, it enforces these options: +.Pp +.Bl -item -compact +.It +.Va WITHOUT_BLOCKLIST_SUPPORT +.El +.It Va WITHOUT_BLOCKLIST +Set this if you do not want to build +.Xr blocklistd 8 +and +.Xr blocklistctl 8 . +When set, these options are also in effect: +.Pp +.Bl -inset -compact +.It Va WITHOUT_BLOCKLIST_SUPPORT +(unless +.Va WITH_BLOCKLIST_SUPPORT +is set explicitly) +.El +.It Va WITHOUT_BLOCKLIST_SUPPORT Build some programs without -.Xr libblacklist 3 +.Xr libblocklist 3 support, like -.Xr fingerd 8 , -.Xr ftpd 8 , +.Xr fingerd 8 and .Xr sshd 8 . .It Va WITHOUT_BLUETOOTH @@ -411,8 +444,11 @@ Build clang-format. .It Va WITHOUT_CLANG_FULL Avoid building the ARCMigrate, Rewriter and StaticAnalyzer components of the Clang C/C++ compiler. -.It Va WITHOUT_CLEAN -Do not clean before building world and/or kernel. +.It Va WITH_CLEAN +Clean before building world and/or kernel. +Note that recording a new epoch in +.Pa .clean_build_epoch +in the root of the source tree will also force a clean world build. .It Va WITHOUT_CPP Do not build .Xr cpp 1 . @@ -449,8 +485,6 @@ When set, it enforces these options: .It .Va WITHOUT_KERBEROS .It -.Va WITHOUT_KERBEROS_SUPPORT -.It .Va WITHOUT_LDNS .It .Va WITHOUT_LDNS_UTILS @@ -477,9 +511,9 @@ When set, it enforces these options: When set, these options are also in effect: .Pp .Bl -inset -compact -.It Va WITHOUT_GSSAPI +.It Va WITHOUT_KERBEROS_SUPPORT (unless -.Va WITH_GSSAPI +.Va WITH_KERBEROS_SUPPORT is set explicitly) .El .It Va WITH_CTF @@ -716,9 +750,7 @@ Do not build .Xr freebsd-update 8 . .It Va WITHOUT_FTP Do not build or install -.Xr ftp 1 -and -.Xr ftpd 8 . +.Xr ftp 1 . .It Va WITHOUT_GAMES Do not build games. .It Va WITHOUT_GNU_DIFF @@ -736,8 +768,6 @@ and dependent tests. Do not build .Xr gpioctl 8 as part of the base system. -.It Va WITHOUT_GSSAPI -Do not build libgssapi. .It Va WITHOUT_HAST Do not build .Xr hastd 8 @@ -837,14 +867,10 @@ Do not build and .Xr truss 1 . .It Va WITHOUT_KERBEROS -Set this to not build Kerberos 5 (KTH Heimdal). +Set this to not build Kerberos. When set, these options are also in effect: .Pp .Bl -inset -compact -.It Va WITHOUT_GSSAPI -(unless -.Va WITH_GSSAPI -is set explicitly) .It Va WITHOUT_KERBEROS_SUPPORT (unless .Va WITH_KERBEROS_SUPPORT @@ -1217,8 +1243,8 @@ is set explicitly) .It Va WITHOUT_MANCOMPRESS Do not install compressed man pages. Only the uncompressed versions will be installed. -.It Va WITHOUT_MANSPLITPKG -Do not split man pages into their own packages during make package. +.It Va WITH_MANSPLITPKG +Split man pages into their own packages during make package. .It Va WITHOUT_MAN_UTILS Do not build utilities for manual pages, .Xr apropos 1 , @@ -1430,8 +1456,6 @@ When set, it enforces these options: .It .Va WITHOUT_KERBEROS .It -.Va WITHOUT_KERBEROS_SUPPORT -.It .Va WITHOUT_LDNS .It .Va WITHOUT_LDNS_UTILS @@ -1456,9 +1480,9 @@ When set, it enforces these options: When set, these options are also in effect: .Pp .Bl -inset -compact -.It Va WITHOUT_GSSAPI +.It Va WITHOUT_KERBEROS_SUPPORT (unless -.Va WITH_GSSAPI +.Va WITH_KERBEROS_SUPPORT is set explicitly) .El .It Va WITHOUT_OPENSSL_KTLS @@ -1485,10 +1509,9 @@ When set, these options are also in effect: is set explicitly) .El .It Va WITHOUT_PAM_SUPPORT -Build some programs without PAM support, particularly -.Xr ftpd 8 -and -.Xr ppp 8 . +Build +.Xr ppp 8 +without PAM support. .It Va WITHOUT_PF Do not build PF firewall package. When set, it enforces these options: diff --git a/share/man/man7/Makefile b/share/man/man7/Makefile index 1e50242a1754..6a426cc29b15 100644 --- a/share/man/man7/Makefile +++ b/share/man/man7/Makefile @@ -1,5 +1,7 @@ .include <src.opts.mk> +MANGROUPS= MAN + #MISSING: eqnchar.7 ms.7 term.7 MAN= arch.7 \ ascii.7 \ @@ -21,6 +23,7 @@ MAN= arch.7 \ named_attribute.7 \ operator.7 \ orders.7 \ + freebsd-base.7 \ ports.7 \ release.7 \ sdoc.7 \ @@ -31,12 +34,12 @@ MAN= arch.7 \ stats.7 \ stdint.7 \ sticky.7 \ - tests.7 \ tracing.7 \ tuning.7 MLINKS= intro.7 miscellaneous.7 MLINKS+= growfs.7 growfs_fstab.7 +MLINKS+= freebsd-base.7 pkgbase.7 MLINKS+= security.7 securelevel.7 MLINKS+= c.7 c78.7 MLINKS+= c.7 c89.7 @@ -54,14 +57,21 @@ MLINKS+= networking.7 wifi.7 .endif .if ${MK_TESTS} != "no" -ATF= ${SRCTOP}/contrib/atf -.PATH: ${ATF}/doc -MAN+= atf.7 +MANGROUPS+= ATF TESTS + +TESTS= tests.7 +TESTSPACKAGE= tests + +ATF= atf.7 +ATFPACKAGE= atf + +ATFPATH= ${SRCTOP}/contrib/atf +.PATH: ${ATFPATH}/doc CLEANFILES+= atf.7 atf.7: atf.7.in sed -e 's,__DOCDIR__,/usr/share/doc/atf,g' \ - <"${ATF}/doc/atf.7.in" >atf.7 + <"${ATFPATH}/doc/atf.7.in" >atf.7 .endif .include <bsd.prog.mk> diff --git a/share/man/man7/arch.7 b/share/man/man7/arch.7 index fe4e8055a8b1..668f5aa23155 100644 --- a/share/man/man7/arch.7 +++ b/share/man/man7/arch.7 @@ -24,7 +24,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd July 14, 2025 +.Dd October 1, 2025 .Dt ARCH 7 .Os .Sh NAME @@ -48,23 +48,35 @@ and later, unless otherwise noted. .Fx uses a flat address space. Variables of types -.Vt unsigned long , -.Vt uintptr_t , +.Vt unsigned long and .Vt size_t -and pointers all have the same representation. +have the same representation. .Pp In order to maximize compatibility with future pointer integrity mechanisms, manipulations of pointers as integers should be performed via .Vt uintptr_t or .Vt intptr_t -and no other types. -In particular, -.Vt long +and no other types as these types are the only integer types where the +C standard guarantees that a pointer may be cast to it and then cast back +to the original type. +On CHERI systems, +.Vt uintptr_t and -.Vt ptrdiff_t -should be avoided. +.Vt intptr_t +are defined as +.Vt __uintcap_t +and +.Vt __intcap_t +which represent capabilities that can be manipulated by integer operations. +Pointers should not be cast to +.Vt long , +.Vt ptrdiff_t , +or +.Vt size_t +if they will later be cast back to a pointer that is expected to be +dereferencable as they remain bare integer types on all architectures. .Pp On some architectures, e.g., AIM variants of @@ -85,11 +97,13 @@ release to support each architecture. .Bl -column -offset indent "Architecture" "Initial Release" .It Sy Architecture Ta Sy Initial Release .It aarch64 Ta 11.0 +.It aarch64c Ta 16.0 (planned) .It amd64 Ta 5.1 .It armv7 Ta 12.0 .It powerpc64 Ta 9.0 .It powerpc64le Ta 13.0 .It riscv64 Ta 12.0 +.It riscv64c Ta 16.0 (planned) .El .Pp Discontinued architectures are shown in the following table. @@ -123,21 +137,33 @@ architectures use some variant of the ELF (see .Xr elf 5 ) .Sy Application Binary Interface (ABI) for the machine processor. -All supported ABIs can be divided into two groups: -.Bl -tag -width "Dv ILP32" +Supported ABIs can be divided into three main groups: +.Bl -tag -width "Dv L64PC128" .It Dv ILP32 .Vt int , +.Vt intptr_t , .Vt long , +and .Vt void * types machine representations all have 4-byte size. .It Dv LP64 .Vt int type machine representation uses 4 bytes, while -.Vt long +.Vt intptr_t , +.Vt long , and .Vt void * are 8 bytes. +.It Dv L64PC128 +.Vt int +type machine representation uses 4 bytes. +.Vt long +type machine representation uses 8 bytes. +.Vt intptr_t +and +.Vt void * +are 16 byte capabilities. .El .Pp Some machines support more than one @@ -163,15 +189,29 @@ will support execution of .Dv armv7 binaries if the CPU implements .Dv AArch32 -execution state, however older arm binaries are not supported by +execution state. +Binaries targeting +.Dv armv6 +and earlier are no longer supported by .Fx . .Pp +Architectures with 128-bit capabilities support both a +.Dq native +.Dv L64PC128 +execution environment and a +.Dv LP64 +environment: +.Bl -column -offset indent "aarch64c" "LP64 counterpart" +.It Sy L64PC128 Ta Sy LP64 counterpart +.It Dv aarch64c Ta Dv aarch64 +.It Dv riscv64c Ta Dv riscv64 +.El +.Pp On all supported architectures: .Bl -column -offset indent "long long" "Size" .It Sy Type Ta Sy Size .It short Ta 2 .It int Ta 4 -.It long Ta sizeof(void*) .It long long Ta 8 .It float Ta 4 .It double Ta 8 @@ -180,22 +220,24 @@ On all supported architectures: Integers are represented in two's complement. Alignment of integer and pointer types is natural, that is, the address of the variable must be congruent to zero modulo the type size. -Most ILP32 ABIs, except -.Dv arm , -require only 4-byte alignment for 64-bit integers. +The sole exception is that +.Dv i386 +requires only 4-byte alignment for 64-bit integers. .Pp Machine-dependent type sizes: -.Bl -column -offset indent "Architecture" "void *" "long double" "time_t" -.It Sy Architecture Ta Sy void * Ta Sy long double Ta Sy time_t -.It aarch64 Ta 8 Ta 16 Ta 8 -.It amd64 Ta 8 Ta 16 Ta 8 -.It armv7 Ta 4 Ta 8 Ta 8 -.It i386 Ta 4 Ta 12 Ta 4 -.It powerpc Ta 4 Ta 8 Ta 8 -.It powerpcspe Ta 4 Ta 8 Ta 8 -.It powerpc64 Ta 8 Ta 8 Ta 8 -.It powerpc64le Ta 8 Ta 8 Ta 8 -.It riscv64 Ta 8 Ta 16 Ta 8 +.Bl -column -offset indent "Architecture" "long" "void *" "long double" "time_t" +.It Sy Architecture Ta Sy long Ta Sy void * Ta Sy long double Ta Sy time_t +.It aarch64 Ta 8 Ta 8 Ta 16 Ta 8 +.It aarch64c Ta 8 Ta 16 Ta 16 Ta 8 +.It amd64 Ta 8 Ta 8 Ta 16 Ta 8 +.It armv7 Ta 4 Ta 4 Ta 8 Ta 8 +.It i386 Ta 4 Ta 4 Ta 12 Ta 4 +.It powerpc Ta 4 Ta 4 Ta 8 Ta 8 +.It powerpcspe Ta 4 Ta 4 Ta 8 Ta 8 +.It powerpc64 Ta 8 Ta 8 Ta 8 Ta 8 +.It powerpc64le Ta 8 Ta 8 Ta 8 Ta 8 +.It riscv64 Ta 8 Ta 8 Ta 16 Ta 8 +.It riscv64c Ta 8 Ta 16 Ta 16 Ta 8 .El .Pp .Sy time_t @@ -204,6 +246,7 @@ is 8 bytes on all supported architectures except i386. .Bl -column -offset indent "Architecture" "Endianness" "char Signedness" .It Sy Architecture Ta Sy Endianness Ta Sy char Signedness .It aarch64 Ta little Ta unsigned +.It aarch64c Ta little Ta unsigned .It amd64 Ta little Ta signed .It armv7 Ta little Ta unsigned .It i386 Ta little Ta signed @@ -212,11 +255,13 @@ is 8 bytes on all supported architectures except i386. .It powerpc64 Ta big Ta unsigned .It powerpc64le Ta little Ta unsigned .It riscv64 Ta little Ta signed +.It riscv64c Ta little Ta signed .El .Ss Page Size .Bl -column -offset indent "Architecture" "Page Sizes" .It Sy Architecture Ta Sy Page Sizes .It aarch64 Ta 4K, 64K, 2M, 1G +.It aarch64c Ta 4K, 64K, 2M, 1G .It amd64 Ta 4K, 2M, 1G .It armv7 Ta 4K, 1M .It i386 Ta 4K, 2M (PAE), 4M @@ -225,11 +270,13 @@ is 8 bytes on all supported architectures except i386. .It powerpc64 Ta 4K .It powerpc64le Ta 4K .It riscv64 Ta 4K, 2M, 1G +.It riscv64c Ta 4K, 2M, 1G .El .Ss User Address Space Layout .Bl -column -offset indent "riscv64 (Sv48)" "0x0001000000000000" "NNNU" .It Sy Architecture Ta Sy Maximum Address Ta Sy Address Space Size .It aarch64 Ta 0x0001000000000000 Ta 256TiB +.It aarch64c Ta 0x0001000000000000 Ta 256TiB .It amd64 (LA48) Ta 0x0000800000000000 Ta 128TiB .It amd64 (LA57) Ta 0x0100000000000000 Ta 64PiB .It armv7 Ta 0xbfc00000 Ta 3GiB @@ -239,7 +286,9 @@ is 8 bytes on all supported architectures except i386. .It powerpc64 Ta 0x000fffffc0000000 Ta 4PiB .It powerpc64le Ta 0x000fffffc0000000 Ta 4PiB .It riscv64 (Sv39) Ta 0x0000004000000000 Ta 256GiB +.It riscv64c (Sv39) Ta 0x0000004000000000 Ta 256GiB .It riscv64 (Sv48) Ta 0x0000800000000000 Ta 128TiB +.It riscv64c (Sv48) Ta 0x0000800000000000 Ta 128TiB .El .Pp The layout of a process' address space can be queried via the @@ -284,6 +333,7 @@ currently supports Sv39 and Sv48 and defaults to using Sv39. .Bl -column -offset indent "Architecture" "float, double" "long double" .It Sy Architecture Ta Sy float, double Ta Sy long double .It aarch64 Ta hard Ta soft, quad precision +.It aarch64c Ta hard Ta soft, quad precision .It amd64 Ta hard Ta hard, 80 bit .It armv7 Ta hard Ta hard, double precision .It i386 Ta hard Ta hard, 80 bit @@ -292,6 +342,7 @@ currently supports Sv39 and Sv48 and defaults to using Sv39. .It powerpc64 Ta hard Ta hard, double precision .It powerpc64le Ta hard Ta hard, double precision .It riscv64 Ta hard Ta hard, quad precision +.It riscv64c Ta hard Ta hard, quad precision .El .Ss Default Tool Chain .Fx @@ -318,12 +369,12 @@ when referring to the kernel, interfaces dependent on a specific type of kernel or similar things like boot sequences. .Bl -column -offset indent "Dv MACHINE" "Dv MACHINE_CPUARCH" "Dv MACHINE_ARCH" .It Dv MACHINE Ta Dv MACHINE_CPUARCH Ta Dv MACHINE_ARCH -.It arm64 Ta aarch64 Ta aarch64 +.It arm64 Ta aarch64 Ta aarch64, aarch64c .It amd64 Ta amd64 Ta amd64 .It arm Ta arm Ta armv7 .It i386 Ta i386 Ta i386 .It powerpc Ta powerpc Ta powerpc, powerpcspe, powerpc64, powerpc64le -.It riscv Ta riscv Ta riscv64 +.It riscv Ta riscv Ta riscv64, riscv64c .El .Ss Predefined Macros The compiler provides a number of predefined macros. @@ -337,20 +388,40 @@ cc -x c -dM -E /dev/null .Ed .Pp Common type size and endianness macros: -.Bl -column -offset indent "BYTE_ORDER" "Meaning" +.Bl -column -offset indent "__SIZEOF_POINTER__" "Meaning" .It Sy Macro Ta Sy Meaning +.It Dv __SIZEOF_LONG__ Ta size in bytes of long +.It Dv __SIZEOF_POINTER__ Ta size in bytes of intptr_t and pointers +.It Dv __SIZEOF_SIZE_T__ Ta size in bytes of size_t .It Dv __LP64__ Ta 64-bit (8-byte) long and pointer, 32-bit (4-byte) int .It Dv __ILP32__ Ta 32-bit (4-byte) int, long and pointer +.It Dv __CHERI__ Ta 128-bit (16-byte) capability pointer, 64-bit (8-byte) long .It Dv BYTE_ORDER Ta Either Dv BIG_ENDIAN or Dv LITTLE_ENDIAN . -.Dv PDP11_ENDIAN -is not used on -.Fx . .El .Pp +Because systems were historically either +.Dv __ILP32__ +or +.Dv __LP64__ +it has been common for programmers to test only one and assume the other +one in an else branch. +With the arrival of CHERI architectures, this is no longer the case. +.Dv __SIZEOF_*__ +macros should be used instead. +New uses of +.Dv __ILP32__ +and +.Dv __LP64__ +should be avoided. +Compilers for CHERI targets do not define +.Dv __LP64__ +as their pointers are 128-bit capabilities. +.Pp Architecture-specific macros: .Bl -column -offset indent "Architecture" "Predefined macros" .It Sy Architecture Ta Sy Predefined macros .It aarch64 Ta Dv __aarch64__ +.It aarch64c Ta Dv __aarch64__ , Dv __CHERI__ .It amd64 Ta Dv __amd64__ , Dv __x86_64__ .It armv7 Ta Dv __arm__ , Dv __ARM_ARCH >= 7 .It i386 Ta Dv __i386__ @@ -359,6 +430,7 @@ Architecture-specific macros: .It powerpc64 Ta Dv __powerpc__ , Dv __powerpc64__ .It powerpc64le Ta Dv __powerpc__ , Dv __powerpc64__ .It riscv64 Ta Dv __riscv , Dv __riscv_xlen == 64 +.It riscv64c Ta Dv __riscv , Dv __riscv_xlen == 64 , Dv __CHERI__ .El .Pp Compilers may define additional variants of architecture-specific macros. diff --git a/share/man/man7/build.7 b/share/man/man7/build.7 index 4022b915c972..5e15a528246b 100644 --- a/share/man/man7/build.7 +++ b/share/man/man7/build.7 @@ -1,4 +1,4 @@ -.\"- +.\" .\" SPDX-License-Identifier: BSD-2-Clause .\" .\" Copyright (c) 2000 @@ -25,7 +25,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd August 8, 2025 +.Dd September 25, 2025 .Dt BUILD 7 .Os .Sh NAME @@ -36,34 +36,28 @@ system .Sh DESCRIPTION The sources for the .Fx -system and its applications are contained in three different directories, -normally -.Pa /usr/src , -.Pa /usr/doc , -and -.Pa /usr/ports . -These directories may be initially empty or non-existent until updated with -Git -.Po installed from packages with -.Xr pkg 7 -or from -.Xr ports 7 Pc . -Directory -.Pa /usr/src -contains the -.Dq "base system" -sources, which is loosely defined as the things required to rebuild -the system to a useful state. -Directory -.Pa /usr/doc -contains the source for the system documentation, excluding the manual -pages. -Directory -.Pa /usr/ports -contains a tree that provides a consistent interface for building and -installing third party applications. -For more information about the ports build process, see -.Xr ports 7 . +system and its applications are contained in three directories, +normally: +.Bl -tag -width "/usr/ports" +.It Pa /usr/src +.Dq base system , +loosely defined as everything required to build the system +to a useful state +.It Pa /usr/doc +system documentation, excluding manual pages +.It Pa /usr/ports +third-party software, with a consistent interface for building and +installing them; see +.Xr ports 7 +.El +.Pp +These directories may be initially empty or non-existent until updated +with Git +.Po Pa devel/git +from the +.Fx +Ports Collection +.Pc . .Pp The .Xr make 1 @@ -92,7 +86,9 @@ The canonical object directory is described in the documentation for the .Cm buildworld target below. .Pp -The build may be controlled by defining +The +.Nm +may be controlled by defining .Xr make 1 variables described in the .Sx ENVIRONMENT @@ -193,6 +189,20 @@ the compiler, linker, assembler, headers and libraries) has been built; see the .Cm toolchain target below. +.Pp +.Va BUILDENV_SHELL , +which defaults to +.Pa /bin/sh , +is executed. +This can be set to a command that does something in this build environment, +like cross build an application. +If that application has dependencies, though, the +.Pa devel/poudriere +package or port provides a more generic solution. +.It Cm buildenvvars +Print the shell variables that are set for a +.Cm buildenv +envirnoment and exit. .It Cm buildworld Build everything but the kernel, configure files in .Pa etc , @@ -268,13 +278,31 @@ defaults to and .Sy TARGET_ARCH must be defined. +.It Cm packages +Create a +.Xr freebsd-base 7 +package repository containing packages that can be +used to install or upgrade the base system. +The repository is created in the object directory, under +.Pa ${REPODIR}/${PKG_ABI} +where +.Ev REPODIR +is the base directory where the repository will be created, and +.Va PKG_ABI +is the +.Xr pkg 7 +ABI for the build target, for example, +.Pa /usr/obj/${SRCDIR}/repo/FreeBSD:15:amd64 . .It Cm packageworld Archive the results of .Cm distributeworld , placing the results in .Va DISTDIR . -This target is used while building a release; see -.Xr release 7 . +This target is used while building a +.Xr release 7 +and is unrelated to building +.Xr freebsd-base 7 +packages. .It Cm installworld Install everything built by a preceding .Cm buildworld @@ -355,6 +383,14 @@ and .Va XDDIR defaults to .Pa ${TARGET_ARCH}-freebsd . +.It Cm update-packages +Create or update the +.Xr freebsd-base 7 +package repository for the base system. +If an old repository is being updated, +then packages whose contents have not changed since the previous version +will be copied into the new repository to avoid needless updating of the +version number. .It Cm xdev-build Builds for the .Cm xdev @@ -392,7 +428,7 @@ The target directory under .Pa ${DESTDIR} may be modified using the .Va INSTKERNNAME -and +or .Va KODIR .Xr make 1 variables. @@ -401,26 +437,16 @@ Install the kernel to the directory .Pa ${DISTDIR}/kernel/boot/kernel . This target is used while building a release; see .Xr release 7 . -.It Cm packages -Create a -.Xr pkg 7 -repository containing packages that can be used to create or upgrade an -installation of the base system. -The output repository is placed in the object directory, under -.Pa repo/${PKG_ABI} -where -.Va PKG_ABI -is the -.Xr pkg 7 -ABI for the build target, for example, -.Pa /usr/obj/${SRCDIR}/repo/FreeBSD:15:amd64 . .It Cm packagekernel Archive the results of .Cm distributekernel , placing the results in .Va DISTDIR . -This target is used while building a release; see -.Xr release 7 . +This target is used while building a +.Xr release 7 +and is unrelated to building +.Xr freebsd-base 7 +packages. .It Cm kernel Equivalent to .Cm buildkernel @@ -549,6 +575,9 @@ should be set to the name of the package. LLVM toolchain packages use the name llvm<major version>. GCC toolchains provide separate packages for each architecture and use the name ${MACHINE_ARCH}-gcc<major version>. +.It Va INSTKERNNAME +If set, specify an alternative name to build and install for the various +kernel make targets. .It Va KERNCONF Overrides which kernel to build and install for the various kernel make targets. @@ -583,6 +612,9 @@ then .Va KERNCONF is set to the value of .Va KERNFAST . +.It Va KODIR +If set, +this variable specifies an alternative directory to install the kernel. .It Va LOCAL_DIRS If set, this variable supplies a list of additional directories relative to the root of the source tree to build as part of the @@ -642,11 +674,15 @@ If set, this variable supplies a list of additional directories relative to the root of the source tree to build as part of the .Cm cross-tools target. +.It Va OBJROOT +The object directory root is defined as +.Pa ${OBJDIR}/${SRCDIR}/ . +See +.Pa share/mk/src.sys.obj.mk . .It Va PKG_FORMAT Specify a package compression format when building -.Pa src -into -.Cm packages . +.Xr freebsd-base 7 +packages. Default: .Ql tzst . Consider using @@ -664,9 +700,8 @@ and .Cm installkernel process. This is currently incompatible with building -.Pa src -into -.Cm packages . +.Xr freebsd-base 7 +packages. Each port must be specified as .Ar category Ns Li / Ns Ar port Ns Op Li @ Ns Ar flavor , e.g. @@ -695,6 +730,13 @@ Specify a file to override the default The src.conf file controls the components to build. See .Xr src.conf 5 +.It Va REPODIR +The root directory used to create the package repository for building +.Xr packges 7 . +Defaults to +.Pa ${OBJROOT}/repo/ . +This can also be set in +.Xr src-env.conf 5 . .It Va STRIPBIN Command to use at install time when stripping binaries. Be sure to add any additional tools required to run @@ -931,26 +973,159 @@ fringe uses that do not have a wide appeal. .It Pa /usr/doc/share/mk/doc.project.mk .It Pa /usr/ports/Mk/bsd.port.mk .It Pa /usr/ports/Mk/bsd.sites.mk -.It Pa /usr/share/examples/etc/make.conf .It Pa /usr/src/Makefile .It Pa /usr/src/Makefile.inc1 +.Xr make 1 +infrastructure for each tree +.It Pa /usr/ports/UPDATING +.It Pa /usr/src/UPDATING +notable changes in each tree +.It Pa /usr/share/examples/etc/make.conf +example +.Xr make.conf 5 +.It Pa /etc/src.conf +src build configuration, see +.Xr src.conf 5 .El .Sh EXAMPLES -For an -.Dq approved -method of updating your system from the latest sources, please see the -.Sx COMMON ITEMS -section in -.Pa src/UPDATING . +This section describes best practices for common situations. +When manual intervention is necessary, it will be mentioned in +.Pa UPDATING . +Make sure you have full backups before proceeding! +.Ss Example 1: Build and upgrade system in place +If using installed drivers such as graphics or virtual machine guest +drivers, check out the +.Xr ports 7 +tree, and specify the drivers in +.Xr src.conf 5 +so they are built and installed automatically after the kernel: +.Bd -literal -offset indent +git clone https://git.FreeBSD.org/ports.git /usr/ports +cat << EOF >> /etc/src.conf +PORTS_MODULES+=graphics/drm-kmod emulators/virtualbox-ose-kmod +EOF +.Ed +.Pp +Check out the CURRENT branch, build it, and install, +overwriting the current system: +.Bd -literal -offset indent +git clone https://git.FreeBSD.org/src.git /usr/src +cd /usr/src +make buildworld buildkernel +make installkernel +shutdown -r now +.Ed +.Pp +For major version upgrades, boot into single-user mode. +After restarting, install userspace, and merge configurations. +After verifying that you do not need them, delete old files +and libraries: +.Bd -literal -offset indent +cd /usr/src +etcupdate -p +make installworld +etcupdate -B +make delete-old delete-old-libs +shutdown -r now +.Ed +.Ss Example 2: Build and upgrade a custom kernel in place +Create a custom kernel configuration, +.Va MYKERNEL , +by including an existing configuration and using +.Cm device Ns / Ns Cm nodevice +and +.Cm options Ns / Ns Cm nooption +to select and configure components: +.Bd -literal -offset indent +cd /usr/src +cat << EOF > sys/amd64/conf/MYKERNEL +include GENERIC +ident MYKERNEL +nodevice sound +EOF +.Ed +.Pp +After creating the new kernel configuration, build a fresh toolchain, +build the kernel, and install it, moving the old kernel to +.Pa /boot/kernel.old/ : +.Bd -literal -offset indent +make kernel-toolchain +make -DALWAYS_CHECK_MAKE buildkernel KERNCONF=MYKERNEL +make -DALWAYS_CHECK_MAKE installkernel KERNCONF=MYKERNEL +shutdown -r now +.Ed +.Pp +To build the kernel to an alternate location, use the +.Va INSTKERNNAME +variable and boot it once to test via +.Xr nextboot 8 : +.Bd -literal -offset indent +make installkernel KERNCONF=MYKERNEL INSTKERNNAME=testkernel +nextboot -k testkernel +shutdown -r now +.Ed +.Ss Example 3: Build and upgrade a single piece of userspace +Rebuild and reinstall a single piece of userspace, in this case +.Xr ls 1 : +.Bd -literal -offset indent +cd /usr/src/bin/ls +make clean all +make install +.Ed +.Ss Example 4: Build and upgrade a loadable kernel module +Rebuild and reinstall a single loadable kernel module, in this case +.Xr sound 4 : +.Bd -literal -offset indent +cd /usr/src/sys/modules/sound +make all install clean cleandepend KMODDIR=/boot/kernel +.Ed +.Ss Example 5: Quickly rebuild a kernel in place +Quickly rebuild and reinstall the kernel, only recompiling the files +changed since last build; note that this will only work if the full +kernel build has been completed in the past, not on a fresh source tree: +.Bd -literal -offset indent +cd /usr/src +make kernel KERNFAST=1 +.Ed +.Ss Example 6: Cross-compiling for different architectures +To rebuild parts of +.Fx +for another CPU architecture, +first prepare your source tree by building the cross-toolchain: +.Bd -literal -offset indent +cd src +make toolchain TARGET_ARCH=aarch64 +.Ed .Pp -The following sequence of commands can be used to cross-build the system for -the arm64 (aarch64) architecture on a different host architecture, such as -amd64: +The following sequence of commands can be used to cross-build the system +for the arm64 (aarch64) architecture on a different host architecture, +such as amd64: .Bd -literal -offset indent cd /usr/src -make TARGET=arm64 buildworld buildkernel -make TARGET=arm64 DESTDIR=/clients/arm64 installworld installkernel +make TARGET_ARCH=aarch64 buildworld buildkernel +make TARGET_ARCH=aarch64 DESTDIR=/armclient installworld installkernel .Ed +.Pp +Afterwards, to build and install a single piece of userspace, use: +.Bd -literal -offset indent +cd src/bin/ls +make buildenv TARGET_ARCH=aarch64 +make clean all install DESTDIR=/armclient +.Ed +.Pp +Likewise, to quickly rebuild and reinstall the kernel, use: +.Bd -literal -offset indent +cd src +make buildenv TARGET_ARCH=aarch64 +make kernel KERNFAST=1 DESTDIR=/armclient +.Ed +.Sh DIAGNOSTICS +.Bl -diag +.It Bad system call (core dumped) +.It rescue/sh check failed, installation aborted +.Pp +The kernel was not updated due to incorrect build procedure. +Study the examples above. .Sh SEE ALSO .Xr cc 1 , .Xr install 1 , @@ -959,13 +1134,14 @@ make TARGET=arm64 DESTDIR=/clients/arm64 installworld installkernel .Xr src.conf 5 , .Xr arch 7 , .Xr development 7 , +.Xr freebsd-base 7 , .Xr pkg 7 , .Xr ports 7 , .Xr release 7 , .Xr tests 7 , .Xr config 8 , .Xr etcupdate 8 , -.Xr reboot 8 , +.Xr nextboot 8 , .Xr shutdown 8 .Sh HISTORY The @@ -974,3 +1150,23 @@ manpage first appeared in .Fx 4.3 . .Sh AUTHORS .An Mike W. Meyer Aq Mt mwm@mired.org +.Sh CAVEATS +Old objects can cause obscure build problems; try +.Ql make cleandir cleandir . +.Pp +Environment poisioning can cause obscure build problems; try prefixing +.Xr make 1 +commands with +.Ql env -i +.Pp +When doing a major release upgrade, +booting into single user mode for +.Cm installworld +is required. +.Pp +Updating the boot +.Xr loader 8 +is architecture specific. +Consult +.Xr boot 8 +for your architecture for more details. diff --git a/share/man/man7/d.7 b/share/man/man7/d.7 index f4686d98b1d1..c098958ffa56 100644 --- a/share/man/man7/d.7 +++ b/share/man/man7/d.7 @@ -3,7 +3,7 @@ .\" .\" Copyright (c) 2025 Mateusz Piotrowski <0mp@FreeBSD.org> .\" -.Dd June 14, 2025 +.Dd September 24, 2025 .Dt D 7 .Os .Sh NAME @@ -18,12 +18,14 @@ .Sm on .Sm off .Oo +.Oo .Cm / .Ar predicate .Cm / .Sm on .Oc -.Op Cm \&{ Ns Ar action Ns Cm \&} +.Cm \&{ Ns Ar action Ns Cm \&} +.Oc .Sh DESCRIPTION .Nm D is the diff --git a/share/man/man7/development.7 b/share/man/man7/development.7 index 1b875fb14bda..348302a50ee7 100644 --- a/share/man/man7/development.7 +++ b/share/man/man7/development.7 @@ -1,4 +1,4 @@ -.\"- +.\" .\" SPDX-License-Identifier: BSD-2-Clause .\" .\" Copyright (c) 2018 Edward Tomasz Napierala <trasz@FreeBSD.org> @@ -24,7 +24,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd January 19, 2025 +.Dd September 24, 2025 .Dt DEVELOPMENT 7 .Os .Sh NAME @@ -75,13 +75,14 @@ There is also a list of public, read-only Git mirrors at: The .Ql main Git branch represents CURRENT; -all changes are first committed to CURRENT and then usually cherry-picked -back to STABLE, which refers to Git branches such as -.Ql stable/13 . +all changes are first committed to CURRENT and then usually +cherry-picked back to STABLE, which refers to Git branches such as +.Ql stable/14 . Every few years a new STABLE is branched from CURRENT, with an incremented major version number. -Releases are then branched off STABLE and numbered with consecutive minor -numbers. +Releases are then branched off STABLE and numbered with consecutive +minor numbers such as +.Ql releng/14.3 .Pp The layout of the source tree is described in its .Pa README.md @@ -107,12 +108,16 @@ such as freebsd-arch@ and freebsd-hackers@: To get your patches integrated into the main .Fx repository use Phabricator; -it is a code review tool that allows other developers to review the changes, -suggest improvements, and, eventually, allows them to pick up the change and -commit it: +it is a code review tool that allows other developers to +review the changes, suggest improvements, and, eventually, +allows them to pick up the change and commit it: .Pp .Lk https://reviews.FreeBSD.org .Pp +Or Github: +.Pp +.Lk https://github.com/freebsd +.Pp To check the latest .Fx build and test status of CURRENT and STABLE branches, @@ -120,77 +125,41 @@ the continuous integration system is at: .Pp .Lk https://ci.FreeBSD.org .Sh FILES -.Bl -compact -tag -width "/usr/src/tools/tools/git/git-arc.sh" +.Bl -tag -compact -width "/usr/ports/devel/freebsd-git-devtools" .It Pa /usr/src/CONTRIBUTING.md .Fx contribution guidelines .It Pa /usr/src/tools/tools/git/git-arc.sh Phabricator review tooling +.It Pa /usr/ports/devel/freebsd-git-devtools +Phabricator review tooling as a port .El .Sh EXAMPLES -Check out the CURRENT branch, build it, and install, overwriting the current -system: -.Bd -literal -offset indent -git clone https://git.FreeBSD.org/src.git src -cd src -make -sj8 buildworld buildkernel installkernel -shutdown -r now -.Ed -.Pp -After reboot: -.Bd -literal -offset indent -cd src -make -j8 installworld -reboot -.Ed -.Pp -Rebuild and reinstall a single piece of userspace, in this -case -.Xr ls 1 : -.Bd -literal -offset indent -cd src/bin/ls -make clean all install -.Ed -.Pp -Rebuild and reinstall a single loadable kernel module, in this case -.Xr sound 4 : -.Bd -literal -offset indent -cd src/sys/modules/sound -make all install clean cleandepend KMODDIR=/boot/kernel -.Ed -.Pp -Quickly rebuild and reinstall the kernel, only recompiling the files -changed since last build; note that this will only work if the full kernel -build has been completed in the past, not on a fresh source tree: -.Bd -literal -offset indent -cd src -make -sj8 kernel KERNFAST=1 -.Ed -.Pp -To rebuild parts of -.Fx -for another CPU architecture, -first prepare your source tree by building the cross-toolchain: -.Bd -literal -offset indent -cd src -make -sj8 toolchain TARGET_ARCH=aarch64 -.Ed -.Pp -Afterwards, to build and install a single piece of userspace, use: -.Bd -literal -offset indent -cd src/bin/ls -make buildenv TARGET_ARCH=aarch64 -make clean all install DESTDIR=/clients/arm -.Ed -.Pp -Likewise, to quickly rebuild and reinstall the kernel, use: -.Bd -literal -offset indent -cd src -make buildenv TARGET_ARCH=aarch64 -make -sj8 kernel KERNFAST=1 DESTDIR=/clients/arm -.Ed +Apply a patch from Github pull #1234, using +.Pa devel/gh : +.Pp +.Dl gh pr checkout 1234 +.Pp +Apply a patch from Phabricator review D1234, using +.Xr git-arc 1 : +.Pp +.Dl git arc patch -c D1234 +.Pp +Apply a manually downloaded +.Xr git-format-patch 1 , +.Pa draft.patch , +from Bugzilla or mail: +.Pp +.Dl git am draft.patch +.Pp +Apply a manually downloaded patch, +.Pa draft.diff , +from Bugzilla or mail: +.Pp +.Dl git apply draft.diff .Sh SEE ALSO .Xr git 1 , +.Xr git-arc 1 , .Xr witness 4 , .Xr build 7 , .Xr hier 7 , diff --git a/share/man/man7/freebsd-base.7 b/share/man/man7/freebsd-base.7 new file mode 100644 index 000000000000..f84cc7239a1d --- /dev/null +++ b/share/man/man7/freebsd-base.7 @@ -0,0 +1,189 @@ +.\" SPDX-License-Identifier: ISC +.\" +.\" Copyright (c) 2025 Lexi Winter. +.\" +.\" Permission to use, copy, modify, and distribute this software for any +.\" purpose with or without fee is hereby granted, provided that the above +.\" copyright notice and this permission notice appear in all copies. +.\" +.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF +.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. +.\" +.Dd September 25, 2025 +.Dt FREEBSD-BASE 7 +.Os +.Sh NAME +.\" .Nm pkgbase +.Nm freebsd-base +.Nd base system packages +.Sh DESCRIPTION +The +.Fx +base system may be installed as a set of +.Xr pkg 8 +packages, which supersedes the traditional method of installing using +.Xr tar 1 +archives. +.Pp +All base packages have names beginning with the string +.Dq "FreeBSD-" , +and have an origin beginning with +.Dq base/ . +In the default system configuration, the repository containing these +packages is called +.Dq FreeBSD-base , +but any name may be used. +The repository name can be used with +.Xr pkg 8 +to restrict package operations to the base system packages. +.Pp +Packages for all supported +.Fx +releases as well as active +.Dq STABLE +and +.Dq CURRENT +.\" re@ will provide their own repository before release, at which +.\" point this text will need updating. +branches are hosted on the Internet at +.Lk https://pkg.freebsd.org . +These packages are updated when new errata or security updates are +released (for supported release versions), or twice daily for +development branches. +.Pp +Alternatively, packages may be built from the system source tree +according to the instructions in +.Xr build 7 , +allowing the system to be updated from source code using packages. +.Sh PACKAGE ORGANISATION +To allow customisation of the installed system, each package is split +into several subpackages which contain different components of the +package. +For the package +.Sy FreeBSD-foo , +the following subpackages may be available: +.Bl -column "FreeBSD-foo-dev-lib32" "Description" +.It Sy "Package name" Ta Sy "Description" +.It FreeBSD-foo Ta Base files for the package (typically executables) +.It FreeBSD-foo-lib Ta Native runtime libraries +.It FreeBSD-foo-lib32 Ta 32-bit compatibility runtime libraries +.It FreeBSD-foo-dev Ta Development files (headers and static libraries) +.It FreeBSD-foo-dev-lib32 Ta 32-bit development files +.It FreeBSD-foo-dbg Ta Debugging symbols +.It FreeBSD-foo-man Ta Manual pages. +Manual pages are only packaged separately if the +.Sy WITH_MANSPLITPKG +.Xr src.conf 5 +option was enabled when building the system, which is not the default. +.El +.Pp +The exact set of available subpackages differs for each individual +package. For example, some packages may not provide any development +files, in which case the +.Sy -dev +subpackage is not present. +.Sh PACKAGE SETS +Package sets are meta-packages which do not contain any files +themselves, but depend on a selection of other packages, such that each +package set allows the complete set of packages for a supported workload +to be installed. +.Pp +Package sets are provided as packages named +.Sy FreeBSD-set-<name> . +The following package sets are available in the base system: +.Bl -tag -width "minimal-jail" +.It minimal +The minimal set of packages required to bring up a multi-user +.Fx +system. +This includes the core system, along with packages required for +hardware support (such as +.Xr devmatch 8 +and downloadable firmware), and basic networking, including DHCP and +IEEE Std 802.11\(tm wireless networks. +.It minimal-jail +The equivalent of +.Sy minimal +for systems running in a +.Xr jail 8 +environment. +This set excludes hardware support not typically required for jails. +.It devel +Development tools, including C/C++ compilers, the link loader, and +other tools such as +.Xr ar 1 +and +.Xr nm 1 . +This set also includes native development files (headers and static +libraries) for all packages. +.It lib32 +32-compatibility libraries, for running 32-bit applications on a +64-bit host system. +This set includes both runtime libraries and development files. +.It base +The complete base system, excluding tests, the system source code, +and debugging symbols. +.It base-jail +The equivalent of +.Sy base +for systems running in a +.Xr jail 8 +environment. +This set excludes system functionality which typically does not work +or is not useful in a jail. +.It src +The system source tree for the userland and kernel, installed in +.Pa /usr/src . +.It tests +The system test suite, installed in +.Pa /usr/tests . +.It kernels +All available system kernels. +.El +.Sh EXAMPLES +Install the +.Xr vi 1 +text editor on the running system: +.Bd -literal -offset indent +pkg install FreeBSD-vi +.Ed +.Pp +Install a new +.Xr jail 8 +system using the +.Sy minimal-jail +package set: +.Bd -literal -offset indent +pkg -r /jails/myjail install FreeBSD-set-minimal-jail +.Ed +.Pp +Install C/C++ compilers on the running system: +.Bd -literal -offset indent +pkg install FreeBSD-set-devel +.Ed +.Pp +Apply available updates to the running system: +.Bd -literal -offset indent +pkg update -r FreeBSD-base +.Ed +.Pp +Install the development toolchain for FreeBSD/powerpc64le in an +alternate root (for example, to support cross-compiling software +for a different target than the host system): +.Bd -literal -offset indent +pkg -r /ppcdev -oABI=FreeBSD:16:powerpc64le \e + install -r FreeBSD-set-devel +.Ed +.Sh SEE ALSO +.Xr build 7 , +.Xr pkg 8 , +.Xr src.conf 5 +.Sh HISTORY +Support for installing the base system as packages was introduced in +.Fx 15.0 . +Earlier releases supported a subset of this functionality. diff --git a/share/man/man7/hier.7 b/share/man/man7/hier.7 index 1c69b911f53b..c438511678d4 100644 --- a/share/man/man7/hier.7 +++ b/share/man/man7/hier.7 @@ -28,7 +28,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd October 10, 2024 +.Dd September 25, 2025 .Dt HIER 7 .Os .Sh NAME @@ -308,6 +308,21 @@ OpenSSH configuration files; see .Xr ssh 1 .It Pa ssl/ OpenSSL configuration files +.Pp +.Bl -tag -width "untrusted/" -compact +.It Pa cert.pem +System trust store in bundle form; see +.Xr certctl 8 . +.It Pa certs/ +System trust store in OpenSSL hashed-directory form; see +.Xr certctl 8 . +.It Pa openssl.cnf +OpenSSL configuration file; see +.Xr openssl.cnf 5 . +.It Pa untrusted/ +Explicitly distrusted certificates; see +.Xr certctl 8 . +.El .It Pa sysctl.conf kernel state defaults; see .Xr sysctl.conf 5 @@ -877,9 +892,6 @@ last login log; see .It Pa utx.log login/logout log; see .Xr getutxent 3 -.It Pa xferlog -default log for -.Xr ftpd 8 .El .Pp .It Pa mail/ @@ -937,9 +949,6 @@ serial device locks; see .Xr uucplock 3 .It Pa lpd/ line printer spooler daemon spool -.It Pa ftp/ -ftp root directory; see -.Xr ftpd 8 .It Pa mqueue/ undelivered mail queue for .Xr sendmail 8 diff --git a/share/man/man7/ports.7 b/share/man/man7/ports.7 index b681a326f407..75070ce852fe 100644 --- a/share/man/man7/ports.7 +++ b/share/man/man7/ports.7 @@ -25,7 +25,7 @@ .\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF .\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. .\" -.Dd March 21, 2025 +.Dd September 10, 2025 .Dt PORTS 7 .Os .Sh NAME @@ -683,7 +683,7 @@ WITH_DEBUG_PORTS= mail/dovecot security/krb5 .Pp It is also possible to use the debug variables on the command line: .Bd -literal -offset 2n -.Li # Ic make -DWITH_DEBUG DEBUG_FLAGS="-g -O0" build +.Li # Ic make WITH_DEBUG DEBUG_FLAGS="-g -O0" build .Ed .Pp See the diff --git a/share/man/man7/release.7 b/share/man/man7/release.7 index 36c14afe0bf1..2493a34721bc 100644 --- a/share/man/man7/release.7 +++ b/share/man/man7/release.7 @@ -1,3 +1,6 @@ +.\" +.\" SPDX-License-Identifier: BSD-2-Clause +.\" .\" Copyright (c) 2002 Murray Stokely <murray@FreeBSD.org> .\" All rights reserved. .\" @@ -22,7 +25,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd May 20, 2025 +.Dd October 13, 2025 .Dt RELEASE 7 .Os .Sh NAME @@ -136,6 +139,8 @@ configuration file supports the following variables: .Bl -tag -width Ev .It Va CHROOTDIR The directory within which the release will be built. +Defaults to +.Pa /scratch . .It Va CHROOT_MAKEENV Additional .Xr make 1 @@ -286,6 +291,19 @@ is expected to exist by alternative means. Include base system packages for use with .Xr pkg 8 on the install media, instead of legacy tarball distribution sets. +.It Va PKG_CMD +A path to the +.Xr pkg 8 +executable to use when installing packages in release images as a non-root user. +.It Va PKG_REPOS_DIR +An optional path to a directory containing +.Xr pkg 8 +repository configuration files. +These configuration files will be used when installing packages in release +images as a non-root user. +.It Va PKG_REPO_NAME +The name of the repository configuration to use when installing packages in +release images as a non-root user. .El .Sh EMBEDDED BUILDS The following @@ -623,6 +641,7 @@ Typically, one only needs to set .El .Sh FILES .Bl -tag -compact -width Pa +.It Pa /scratch .It Pa /usr/doc/Makefile .It Pa /usr/doc/share/mk/doc.project.mk .It Pa /usr/ports/Mk/bsd.port.mk @@ -675,16 +694,10 @@ the Raspberry Pi, exist in the directory corresponding to the .Va TARGET .Xr make 1 variable. -For example, to build an image for the Raspberry Pi: -.Bd -literal -offset indent -cd /usr/src/release -sh release.sh -c arm/RPI-B.conf -.Ed -.Pp -To build an image for the Raspberry Pi 3: +For example, to build an image for 64-bit Raspberry Pis: .Bd -literal -offset indent cd /usr/src/release -sh release.sh -c arm64/RPI3.conf +sh release.sh -c arm64/RPI.conf .Ed .Pp After running these commands, all prepared release files are available in the diff --git a/share/man/man7/security.7 b/share/man/man7/security.7 index cdb4d066d3e6..f1035fd093d5 100644 --- a/share/man/man7/security.7 +++ b/share/man/man7/security.7 @@ -364,7 +364,6 @@ There are a number of other servers that typically do not run in sandboxes: .Xr sendmail 8 , .Xr popper 8 , .Xr imapd 8 , -.Xr ftpd 8 , and others. There are alternatives to some of these, but installing them may require more work than you are willing diff --git a/share/man/man7/simd.7 b/share/man/man7/simd.7 index 2c3ed3de411e..d5092348d9b3 100644 --- a/share/man/man7/simd.7 +++ b/share/man/man7/simd.7 @@ -24,7 +24,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE . -.Dd July 29, 2025 +.Dd November 18, 2024 .Dt SIMD 7 .Os .Sh NAME @@ -50,43 +50,48 @@ can be used to override this mechanism. .Pp Enhanced functions are present for the following architectures: .Bl -column FUNCTION_________ aarch64_ arm_ amd64_ i386_ ppc64_ -offset indent -.It Em FUNCTION Ta Em AARCH64 Ta Em ARM Ta Em AMD64 Ta Em PPC64 -.It bcmp Ta A Ta Ta S1 -.It bcopy Ta A Ta S Ta S Ta SV -.It bzero Ta A Ta S Ta S -.It div Ta Ta Ta S +.It Em FUNCTION Ta Em AARCH64 Ta Em ARM Ta Em AMD64 Ta Em I386 Ta Em PPC64 +.It bcmp Ta A Ta Ta S1 Ta S +.It bcopy Ta A Ta S Ta S Ta S Ta SV +.It bzero Ta A Ta S Ta S Ta S +.It div Ta Ta Ta S Ta S .It index Ta A Ta Ta S1 -.It ldiv Ta Ta Ta S +.It ldiv Ta Ta Ta S Ta S .It lldiv Ta Ta Ta S .It memchr Ta A Ta Ta S1 -.It memcmp Ta A Ta S Ta S1 +.It memcmp Ta A Ta S Ta S1 Ta S .It memccpy Ta A Ta Ta S1 -.It memcpy Ta A Ta S Ta S Ta SV -.It memmove Ta A Ta S Ta S Ta SV +.It memcpy Ta A Ta S Ta S Ta S Ta SV +.It memmove Ta A Ta S Ta S Ta S Ta SV .It memrchr Ta A Ta Ta S1 -.It memset Ta A Ta S Ta S -.It rindex Ta A Ta Ta S1 +.It memset Ta A Ta S Ta S Ta S +.It rindex Ta A Ta Ta S1 Ta S .It stpcpy Ta A Ta Ta S1 .It stpncpy Ta Ta Ta S1 -.It strcat Ta A Ta Ta S1 -.It strchr Ta A Ta Ta S1 +.It strcat Ta A Ta Ta S1 Ta S +.It strchr Ta A Ta Ta S1 Ta S .It strchrnul Ta A Ta Ta S1 -.It strcmp Ta A Ta S Ta S1 -.It strcpy Ta A Ta Ta S1 Ta S2 +.It strcmp Ta A Ta S Ta S1 Ta S +.It strcpy Ta A Ta Ta S1 Ta S Ta S2 .It strcspn Ta S Ta Ta S2 .It strlcat Ta A Ta Ta S1 .It strlcpy Ta A Ta Ta S1 .It strlen Ta A Ta S Ta S1 .It strncat Ta A Ta Ta S1 -.It strncmp Ta A Ta S Ta S1 -.It strncpy Ta Ta Ta S1 Ta S2 +.It strncmp Ta A Ta S Ta S1 Ta S +.It strncpy Ta Ta Ta S1 Ta Ta S2 .It strnlen Ta A Ta Ta S1 -.It strrchr Ta A Ta Ta S1 +.It strrchr Ta A Ta Ta S1 Ta S .It strpbrk Ta S Ta Ta S2 .It strsep Ta S Ta Ta S2 .It strspn Ta S Ta Ta S2 +.It swab Ta Ta Ta Ta S .It timingsafe_bcmp Ta A Ta Ta S1 .It timingsafe_memcmp Ta S Ta Ta S +.It wcschr Ta Ta Ta Ta S +.It wcscmp Ta Ta Ta Ta S +.It wcslen Ta Ta Ta Ta S +.It wmemchr Ta Ta Ta Ta S .El .Pp .Sy S Ns :\ scalar (non-SIMD), diff --git a/share/man/man8/intro.8 b/share/man/man8/intro.8 index 39b72af5f741..bfa7d026afbb 100644 --- a/share/man/man8/intro.8 +++ b/share/man/man8/intro.8 @@ -52,8 +52,6 @@ and recover files when disks die an untimely death .\" consulted when formatting disks and tapes. Network related services like .Xr inetd 8 -and -.Xr ftpd 8 are also described. .Pp All commands set an exit status. diff --git a/share/man/man8/nanobsd.8 b/share/man/man8/nanobsd.8 index 838f9ddc9afa..44def2503b84 100644 --- a/share/man/man8/nanobsd.8 +++ b/share/man/man8/nanobsd.8 @@ -25,7 +25,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd July 14, 2025 +.Dd September 9, 2025 .Dt NANOBSD 8 .Os .Sh NAME @@ -33,7 +33,7 @@ .Nd create an embedded FreeBSD system image .Sh SYNOPSIS .Nm -.Op Fl BbfhIiKknqvWwX +.Op Fl BbfhIiKknpqvWwX .Op Fl c Ar config-file .Sh DESCRIPTION The @@ -42,7 +42,7 @@ utility is a script which produces a minimal implementation of .Fx (called .Nm NanoBSD ) , -which typically fits on a small media such as a Compact Flash card, +which typically fits on a small media such as an SD card, or other mass storage medium. It can be used to build specialized install images, designed for easy installation and maintenance. @@ -77,6 +77,10 @@ This suppresses the normal cleanup work done before the .Cm buildworld stage and adds -DNO_CLEAN to the make command line used for each build stage (world and kernel). +.It Fl p +Don't prepare the image. +Skip running of the customization and early customization scripts for +incremental image refinement from world, kernel, or packages. .It Fl q Make output more quiet. .It Fl v diff --git a/share/man/man9/BUF_ISLOCKED.9 b/share/man/man9/BUF_ISLOCKED.9 index 09dfc458c834..c50d79c889fd 100644 --- a/share/man/man9/BUF_ISLOCKED.9 +++ b/share/man/man9/BUF_ISLOCKED.9 @@ -25,7 +25,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH .\" DAMAGE. .\" -.Dd January 22, 2008 +.Dd September 26, 2025 .Dt BUF_ISLOCKED 9 .Os .Sh NAME @@ -60,8 +60,7 @@ The lock is not held by anyone. .Xr buf 9 , .Xr BUF_LOCK 9 , .Xr BUF_UNLOCK 9 , -.Xr lockmgr 9 , -.Xr lockstatus 9 +.Xr lockmgr 9 .Sh AUTHORS This manual page was written by .An Attilio Rao Aq Mt attilio@FreeBSD.org . diff --git a/share/man/man9/MODULE_PNP_INFO.9 b/share/man/man9/MODULE_PNP_INFO.9 index 529afd70096d..b1cc935b1aca 100644 --- a/share/man/man9/MODULE_PNP_INFO.9 +++ b/share/man/man9/MODULE_PNP_INFO.9 @@ -65,7 +65,7 @@ The second name is encoded by appending a forward slash and the second name after the first.) .Pp Types are one of the following: -.Bl -tag -width U16 +.Bl -tag -width indent .It Dq Vt U8 .Vt uint8_t element. diff --git a/share/man/man9/Makefile b/share/man/man9/Makefile index 5bcde3030ebc..52ec9be3ae02 100644 --- a/share/man/man9/Makefile +++ b/share/man/man9/Makefile @@ -1,6 +1,6 @@ .include <src.opts.mk> -PACKAGE= kernel +PACKAGE= kernel-man MAN= accept_filter.9 \ accf_data.9 \ @@ -417,7 +417,7 @@ MAN= accept_filter.9 \ vn_deallocate.9 \ vn_fullpath.9 \ vn_isdisk.9 \ - vnet.9 \ + VNET.9 \ vnode.9 \ vnode_pager_setsize.9 \ vnode_pager_purge_range.9 \ @@ -2207,6 +2207,7 @@ MLINKS+=syscall_helper_register.9 syscall_helper_unregister.9 \ syscall_helper_register.9 SYSCALL_INIT_HELPER_COMPAT_F.9 \ syscall_helper_register.9 SYSCALL_INIT_HELPER_F.9 MLINKS+=sysctl.9 SYSCTL_DECL.9 \ + sysctl.9 SYSCTL_ADD_BOOL.9 \ sysctl.9 SYSCTL_ADD_CONST_STRING.9 \ sysctl.9 SYSCTL_ADD_INT.9 \ sysctl.9 SYSCTL_ADD_LONG.9 \ @@ -2233,6 +2234,7 @@ MLINKS+=sysctl.9 SYSCTL_DECL.9 \ sysctl.9 SYSCTL_ADD_UMA_CUR.9 \ sysctl.9 SYSCTL_ADD_UMA_MAX.9 \ sysctl.9 SYSCTL_ADD_UQUAD.9 \ + sysctl.9 SYSCTL_BOOL.9 \ sysctl.9 SYSCTL_CHILDREN.9 \ sysctl.9 SYSCTL_STATIC_CHILDREN.9 \ sysctl.9 SYSCTL_NODE_CHILDREN.9 \ @@ -2455,6 +2457,9 @@ MLINKS+=vm_page_insert.9 vm_page_remove.9 MLINKS+=vm_page_wire.9 vm_page_unwire.9 \ vm_page_wire.9 vm_page_unwire_noq.9 \ vm_page_wire.9 vm_page_wire_mapped.9 +MLINKS+=vn_fullpath.9 vn_fullpath_jail.9 \ + vn_fullpath.9 vn_fullpath_global.9 \ + vn_fullpath.9 vn_fullpath_hardlink.9 MLINKS+=VOP_ACCESS.9 VOP_ACCESSX.9 MLINKS+=VOP_ATTRIB.9 VOP_GETATTR.9 \ VOP_ATTRIB.9 VOP_SETATTR.9 \ @@ -2474,9 +2479,8 @@ MLINKS+=VOP_OPENCLOSE.9 VOP_CLOSE.9 \ MLINKS+=VOP_RDWR.9 VOP_READ.9 \ VOP_RDWR.9 VOP_WRITE.9 MLINKS+=VOP_REMOVE.9 VOP_RMDIR.9 -MLINKS+=vnet.9 vimage.9 -MLINKS+=vref.9 VREF.9 \ - vref.9 vrefl.9 +MLINKS+=VNET.9 VIMAGE.9 +MLINKS+=vref.9 vrefl.9 MLINKS+=vrele.9 vput.9 \ vrele.9 vunref.9 MLINKS+=vslock.9 vsunlock.9 diff --git a/share/man/man9/VFS.9 b/share/man/man9/VFS.9 index a269d8d070cf..a1d0a19bec13 100644 --- a/share/man/man9/VFS.9 +++ b/share/man/man9/VFS.9 @@ -44,7 +44,6 @@ rather than implementing empty functions or casting to .Sh SEE ALSO .Xr VFS_CHECKEXP 9 , .Xr VFS_FHTOVP 9 , -.Xr VFS_INIT 9 , .Xr VFS_MOUNT 9 , .Xr VFS_QUOTACTL 9 , .Xr VFS_SET 9 , diff --git a/share/man/man9/vnet.9 b/share/man/man9/VNET.9 index 28e28bfd3242..679ccc3f9a06 100644 --- a/share/man/man9/vnet.9 +++ b/share/man/man9/VNET.9 @@ -25,7 +25,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd December 10, 2020 +.Dd September 19, 2025 .Dt VNET 9 .Os .Sh NAME @@ -162,26 +162,6 @@ .Fa "int priority" .Fc .\" ------------------------------------------------------------ -.Ss "Sysctl Handling" -.Fo SYSCTL_VNET_INT -.Fa parent nbr name access ptr val descr -.Fc -.Fo SYSCTL_VNET_PROC -.Fa parent nbr name access ptr arg handler fmt descr -.Fc -.Fo SYSCTL_VNET_STRING -.Fa parent nbr name access arg len descr -.Fc -.Fo SYSCTL_VNET_STRUCT -.Fa parent nbr name access ptr type descr -.Fc -.Fo SYSCTL_VNET_UINT -.Fa parent nbr name access ptr val descr -.Fc -.Fo VNET_SYSCTL_ARG -.Fa req arg1 -.Fc -.\" ------------------------------------------------------------ .Sh DESCRIPTION .Nm is the name of a technique to virtualize the network stack. @@ -250,9 +230,6 @@ The .Fn VNET_NAME macro returns the offset within the memory region of the virtual network stack instance. -It is usually only used with -.Fn SYSCTL_VNET_* -macros. .\" ------------------------------------------------------------ .Ss "Virtual Instance Selection" .\" @@ -459,30 +436,9 @@ call will be ignored. .\" A .Xr sysctl 9 -can be virtualized by using one of the -.Fn SYSCTL_VNET_* -macros. -.Pp -They take the same arguments as the standard -.Xr sysctl 9 -functions, with the only difference, that the -.Fa ptr -argument has to be passed as -.Ql &VNET_NAME(foo) -instead of -.Ql &foo -so that the variable can be selected from the correct memory -region of the virtual network stack instance of the caller. -.Pp -For the very rare case a sysctl handler function would want to -handle -.Fa arg1 -itself the -.Fn VNET_SYSCTL_ARG req arg1 -is provided that will translate the -.Fa arg1 -argument to the correct memory address in the virtual network stack -context of the caller. +can be virtualized by adding the +.Dv CTLFLAG_VNET +control flag to the ctlflags bitmask of the macros. .\" ------------------------------------------------------------ .Sh SEE ALSO .Xr jail 2 , diff --git a/share/man/man9/VOP_OPENCLOSE.9 b/share/man/man9/VOP_OPENCLOSE.9 index 9a4f7069962d..672f9faa92f5 100644 --- a/share/man/man9/VOP_OPENCLOSE.9 +++ b/share/man/man9/VOP_OPENCLOSE.9 @@ -26,7 +26,7 @@ .\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF .\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. .\" -.Dd December 2, 2009 +.Dd October 17, 2025 .Dt VOP_OPEN 9 .Os .Sh NAME @@ -78,6 +78,17 @@ The access mode is a set of flags, including .Dv FWRITE , .Dv O_NONBLOCK , .Dv O_APPEND . +.Pp +The thread +.Fa td +passed to +.Fn VOP_CLOSE +may be +.Ql NULL +if the last reference to the open file is released from a kernel context, e.g., +the destruction of a socket buffer containing the file reference in a +.Dv SCM_RIGHTS +message. .Sh LOCKS .Fn VOP_OPEN expects diff --git a/share/man/man9/backlight.9 b/share/man/man9/backlight.9 index 926a723b3859..c4c338ce56ca 100644 --- a/share/man/man9/backlight.9 +++ b/share/man/man9/backlight.9 @@ -65,6 +65,8 @@ struct. .Bl -tag -width "/dev/backlight/*" .It Pa /dev/backlight/* .El +.Sh SEE ALSO +.Xr backlight 8 .Sh HISTORY The .Nm backlight diff --git a/share/man/man9/g_geom.9 b/share/man/man9/g_geom.9 index 74c6979fceda..c5b0c0aded2d 100644 --- a/share/man/man9/g_geom.9 +++ b/share/man/man9/g_geom.9 @@ -27,12 +27,15 @@ .Os .Sh NAME .Nm g_new_geomf , +.Nm g_new_geom , .Nm g_destroy_geom .Nd "geom management" .Sh SYNOPSIS .In geom/geom.h .Ft "struct g_geom *" .Fn g_new_geomf "struct g_class *mp" "const char *fmt" ... +.Ft "struct g_geom *" +.Fn g_new_geom "struct g_class *mp" "const char *name" .Ft void .Fn g_destroy_geom "struct g_geom *gp" .Sh DESCRIPTION @@ -58,6 +61,14 @@ The geom's name is created in a -like way from the rest of the arguments. .Pp The +.Fn g_new_geom +function is very similar to +.Fn g_new_geomf +except that it accepts a regular string instead of a +.Xr printf 3 Ns +-like format strng as the geom's name. +.Pp +The .Fn g_destroy_geom function destroys the given geom immediately and cancels all related pending events. @@ -94,7 +105,9 @@ and .Va access for it. .Pp -.Fn g_new_geomf : +.Fn g_new_geomf +and +.Fn g_new_geom : .Bl -item -offset indent .It Class diff --git a/share/man/man9/namei.9 b/share/man/man9/namei.9 index 5bdffce8c360..a42043587432 100644 --- a/share/man/man9/namei.9 +++ b/share/man/man9/namei.9 @@ -31,7 +31,7 @@ .\" If you integrate this manpage in another OS, I'd appreciate a note .\" - eivind@FreeBSD.org .\" -.Dd May 16, 2025 +.Dd September 30, 2025 .Dt NAMEI 9 .Os .Sh NAME @@ -206,12 +206,6 @@ This flag allows the function to return the parent (directory) vnode in an unlocked state. The parent vnode must be released separately by using .Xr vrele 9 . -.It Dv WANTPARENT -This flag allows the -.Fn namei -function to return the parent (directory) vnode in an unlocked state. -The parent vnode must be released separately by using -.Xr vrele 9 . .It Dv FAILIFEXISTS Makes the .Nm diff --git a/share/man/man9/sysctl.9 b/share/man/man9/sysctl.9 index 92c8532c8ed2..31031e64f713 100644 --- a/share/man/man9/sysctl.9 +++ b/share/man/man9/sysctl.9 @@ -23,7 +23,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd September 1, 2020 +.Dd September 28, 2025 .Dt SYSCTL 9 .Os .Sh NAME @@ -863,14 +863,14 @@ flags to be set indicating the read and write disposition of the sysctl: .It Dv CTLFLAG_RD This is a read-only sysctl. .It Dv CTLFLAG_RDTUN -This is a read-only sysctl and tunable which is tried fetched once +This is a read-only sysctl and tunable which is fetched once from the system environment early during module load or system boot. .It Dv CTLFLAG_WR This is a writable sysctl. .It Dv CTLFLAG_RW This sysctl is readable and writable. .It Dv CTLFLAG_RWTUN -This is a readable and writeable sysctl and tunable which is tried +This is a readable and writeable sysctl and tunable which is fetched once from the system environment early during module load or system boot. .It Dv CTLFLAG_NOFETCH @@ -907,7 +907,7 @@ This sysctl can be written to by processes in When iterating the sysctl name space, do not list this sysctl. .It Dv CTLFLAG_TUN Advisory flag that a system tunable also exists for this variable. -The initial sysctl value is tried fetched once from the system +The initial sysctl value is fetched once from the system environment early during module load or system boot. .It Dv CTLFLAG_DYN Dynamically created OIDs automatically get this flag set. diff --git a/share/man/man9/taskqueue.9 b/share/man/man9/taskqueue.9 index 5afeffcb558b..8ffa9a96d816 100644 --- a/share/man/man9/taskqueue.9 +++ b/share/man/man9/taskqueue.9 @@ -530,7 +530,7 @@ If queueing delays cannot be tolerated then a private taskqueue should be created with a dedicated processing thread. .Sh SEE ALSO .Xr callout 9 , -.Xr ithread 9 , +.Xr intr_event 9 , .Xr kthread 9 , .Xr swi 9 .Sh HISTORY diff --git a/share/man/man9/ucred.9 b/share/man/man9/ucred.9 index 38759bddb5b0..453df386ff18 100644 --- a/share/man/man9/ucred.9 +++ b/share/man/man9/ucred.9 @@ -24,7 +24,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH .\" DAMAGE. .\" -.Dd July 29, 2025 +.Dd August 29, 2025 .Dt UCRED 9 .Os .Sh NAME @@ -113,28 +113,26 @@ The actual copying is performed by .Pp The .Fn crsetgroups -and -.Fn crsetgroups_and_egid -functions set the +function sets the .Va cr_groups and .Va cr_ngroups -variables and allocates space as needed. -They also truncate the group list to the current maximum number of -groups. -No other mechanism should be used to modify the -.Va cr_groups -array. -Note that +variables representing the supplementary groups, allocating space as needed. +It also truncates the group list to the current maximum number of groups. +The .Fn crsetgroups_and_egid -will interpret the first element of +function is similar, but interprets separately the first group of .Va groups -as the new effective GID and the rest of the array as the supplementary groups, -and +as the effective GID to set, only setting the subsequent groups as supplementary +ones. +It will use .Va default_egid -will be used as the new effective GID only if +as the new effective GID if .Va groups is empty. +No other mechanism should be used to modify the +.Va cr_groups +array. .Pp The .Fn cru2x diff --git a/share/man/man9/vn_fullpath.9 b/share/man/man9/vn_fullpath.9 index 116f519ec8aa..9815abc3c86c 100644 --- a/share/man/man9/vn_fullpath.9 +++ b/share/man/man9/vn_fullpath.9 @@ -1,6 +1,13 @@ +.\"- +.\" SPDX-License-Identifier: BSD-2-Clause .\" .\" Copyright (c) 2003 Robert N. M. Watson. .\" All rights reserved. +.\" Copyright (c) 2025 The FreeBSD Foundation +.\" +.\" Portions of this documentation were written by Olivier Certner +.\" <olce@FreeBSD.org> at Kumacom SARL under sponsorship from the FreeBSD +.\" Foundation. .\" .\" Redistribution and use in source and binary forms, with or without .\" modification, are permitted provided that the following conditions @@ -25,7 +32,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH .\" DAMAGE. .\" -.Dd June 15, 2021 +.Dd September 29, 2025 .Dt VN_FULLPATH 9 .Os .Sh NAME @@ -35,23 +42,64 @@ .In sys/param.h .In sys/vnode.h .Ft int -.Fo vn_fullpath -.Fa "struct vnode *vp" "char **retbuf" "char **freebuf" +.Fn vn_fullpath "struct vnode *vp" "char **retbuf" "char **freebuf" +.Ft int +.Fn vn_fullpath_jail "struct vnode *vp" "char **retbuf" "char **freebuf" +.Ft int +.Fn vn_fullpath_global "struct vnode *vp" "char **retbuf" "char **freebuf" +.Ft int +.Fo vn_fullpath_hardlink +.Fa "struct vnode *vp" "struct vnode *dvp" +.Fa "const char *hrdl_name" "size_t hrdl_name_length" +.Fa "char **retbuf" "char **freebuf" "size_t *buflen" .Fc .Sh DESCRIPTION The +.Fn vn_fullpath , +.Fn vn_fullpath_jail , +.Fn vn_fullpath_global +and +.Fn vn_fullpath_hardlink +functions make a +.Dq best effort +attempt at generating a string pathname for the passed vnode. +They differ in which directory the returned path is relative to, except for +.Fn vn_fullpath_hardlink +which behaves like .Fn vn_fullpath -function makes a -.Dq "best effort" -attempt to generate a string pathname for -the passed vnode; the resulting path, if any, will be relative to -the root directory of the process associated with the passed thread pointer. +in this respect and is described at the end. +.Pp The .Fn vn_fullpath -function -is implemented by inspecting the VFS name cache, and attempting to -reconstruct a path from the process root to the object. +function returns a path relative to the root directory of the process associated +with the passed thread pointer. +That root directory is either the system's or the thread's process' containing +jail's root directory, or some descendant directory of such established by some +.Xr chroot 2 +call. +The +.Fn vn_fullpath_jail +function returns a path relative to the passed thread's process' current jail's +root, ignoring intervening +.Xr chroot 2 +calls possibly made inside that jail. +The +.Fn vn_fullpath_global +function returns the full path from the system root, ignoring all jail roots and +.Xr chroot 2 +calls. +.Pp +Paths that the kernel intends to communicate to the passed user thread should +exclusively be obtained via +.Fn vn_fullpath . +Paths obtained via +.Fn vn_fullpath_jail +or +.Fn vn_fullpath_global +are only useful for specific kernel checks or auditing purposes. .Pp +All these functions are implemented by inspecting the VFS name cache, and +attempting to reconstruct a path from the process root to the object. This process is necessarily unreliable for several reasons: intermediate entries in the path may not be found in the cache; files may have more than one name (hard links), not all file systems use the name cache @@ -64,7 +112,7 @@ a vnode pointer value, or a device number and inode number. Code consuming the results of this function should anticipate (and properly handle) failure. .Pp -Its arguments are: +These functions take the following arguments: .Bl -tag -width ".Fa freebuf" .It Fa vp The vnode to search for. @@ -72,17 +120,13 @@ No need to be locked by the caller. .It Fa retbuf Pointer to a .Vt "char *" -that -.Fn vn_fullpath -may (on success) point at a newly -allocated buffer containing the resulting pathname. +that may be set (on success) to point at a newly allocated buffer containing the +resulting pathname. .It Fa freebuf Pointer to a .Vt "char *" -that -.Fn vn_fullpath -may (on success) point at a buffer -to be freed, when the caller is done with +that may be set (on success) to point at a buffer to be freed, when the caller +is done with .Fa retbuf . .El .Pp @@ -110,11 +154,43 @@ and if so, invoke .Xr free 9 with a pool type of .Dv M_TEMP . +.Pp +The +.Fn vn_fullpath_hardlink +function is a convenience wrapper which automatically appends the hardlink name +passed via arguments +.Fa hrdl_name +and +.Fa hrdl_name_length +to the result of calling +.Fn vn_fullpath +on the vnode's parent directory. +It requires the results of a prior call to +.Xr namei 9 +with flag +.Dv WANTPARENT +to be passed in the +.Fa vp +and +.Fa dvp +arguments. +Argument +.Fa buflen +must point to a valid storage containing the size of the desired buffer, which +will be reduced to +.Dv MAXPATHLEN +if in excess of it. .Sh RETURN VALUES If the vnode is successfully converted to a pathname, 0 is returned; otherwise, an error number is returned. .Sh SEE ALSO .Xr free 9 .Sh AUTHORS -This manual page was written by -.An Robert Watson Aq Mt rwatson@FreeBSD.org . +.An -nosplit +This manual page was initally written by +.An Robert Watson Aq Mt rwatson@FreeBSD.org +to describe the +.Fn vn_fullpath +function. +The descriptions of the other related functions were added by +.An Olivier Certner Aq Mt olce@FreeBSD.org . |