Index: head/share/man/man4/capsicum.4 =================================================================== --- head/share/man/man4/capsicum.4 (revision 297454) +++ head/share/man/man4/capsicum.4 (revision 297455) @@ -1,126 +1,126 @@ .\" .\" Copyright (c) 2011, 2013 Robert N. M. Watson .\" Copyright (c) 2011 Jonathan Anderson .\" All rights reserved. .\" .\" Redistribution and use in source and binary forms, with or without .\" modification, are permitted provided that the following conditions .\" are met: .\" 1. Redistributions of source code must retain the above copyright .\" notice, this list of conditions and the following disclaimer. .\" 2. Redistributions in binary form must reproduce the above copyright .\" notice, this list of conditions and the following disclaimer in the .\" documentation and/or other materials provided with the distribution. .\" .\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE .\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT .\" 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. .\" .\" $FreeBSD$ .\" .Dd February 25, 2016 .Dt CAPSICUM 4 .Os .Sh NAME .Nm Capsicum .Nd lightweight OS capability and sandbox framework .Sh SYNOPSIS .Cd "options CAPABILITY_MODE" .Cd "options CAPABILITIES" .Sh DESCRIPTION .Nm is a lightweight OS capability and sandbox framework implementing a hybrid capability system model. .Nm can be used for application and library compartmentalisation, the decomposition of larger bodies of software into isolated (sandboxed) components in order to implement security policies and limit the impact of software vulnerabilities. .Pp .Nm provides two core kernel primitives: .Bl -tag -width indent .It capability mode A process mode, entered by invoking .Xr cap_enter 2 , in which access to global OS namespaces (such as the file system and PID namespaces) is restricted; only explicitly delegated rights, referenced by memory mappings or file descriptors, may be used. Once set, the flag is inherited by future children processes, and may not be cleared. .It capabilities Limit operations that can be called on file descriptors. For example, a file descriptor returned by .Xr open 2 may be refined using .Xr cap_rights_limit 2 so that only .Xr read 2 and .Xr write 2 can be called, but not .Xr fchmod 2 . The complete list of the capability rights can be found in the .Xr rights 4 manual page. .El .Pp In some cases, .Nm requires use of alternatives to traditional POSIX APIs in order to name objects using capabilities rather than global namespaces: .Bl -tag -width indent .It process descriptors File descriptors representing processes, allowing parent processes to manage child processes without requiring access to the PID namespace; described in greater detail in .Xr procdesc 4 . .It anonymous shared memory An extension to the POSIX shared memory API to support anonymous swap objects associated with file descriptors; described in greater detail in .Xr shm_open 2 . .El .Sh SEE ALSO .Xr cap_enter 2 , .Xr cap_fcntls_limit 2 , .Xr cap_getmode 2 , .Xr cap_ioctls_limit 2 , .Xr cap_rights_limit 2 , .Xr fchmod 2 , .Xr open 2 , .Xr pdfork 2 , .Xr pdgetpid 2 , .Xr pdkill 2 , .Xr pdwait4 2 , .Xr read 2 , .Xr shm_open 2 , .Xr write 2 , .Xr cap_rights_get 3 , .Xr casper 3 , -.Xr procdesc 4 , +.Xr procdesc 4 .Sh HISTORY .Nm first appeared in .Fx 9.0 , and was developed at the University of Cambridge. .Sh AUTHORS .Nm was developed by .An -nosplit .An Robert Watson Aq Mt rwatson@FreeBSD.org and .An Jonathan Anderson Aq Mt jonathan@FreeBSD.org at the University of Cambridge, and .An Ben Laurie Aq Mt benl@FreeBSD.org and .An Kris Kennaway Aq Mt kris@FreeBSD.org at Google, Inc., and .An Pawel Jakub Dawidek Aq Mt pawel@dawidek.net . Index: head/share/man/man4/cfi.4 =================================================================== --- head/share/man/man4/cfi.4 (revision 297454) +++ head/share/man/man4/cfi.4 (revision 297455) @@ -1,94 +1,93 @@ .\"- .\" Copyright (c) 2015-2016 SRI International .\" All rights reserved. .\" .\" This software was developed by SRI International and the University of .\" Cambridge Computer Laboratory under DARPA/AFRL contract (FA8750-10-C-0237) .\" ("CTSRD"), as part of the DARPA CRASH research programme. .\" .\" Redistribution and use in source and binary forms, with or without .\" modification, are permitted provided that the following conditions .\" are met: .\" 1. Redistributions of source code must retain the above copyright .\" notice, this list of conditions and the following disclaimer. .\" 2. Redistributions in binary form must reproduce the above copyright .\" notice, this list of conditions and the following disclaimer in the .\" documentation and/or other materials provided with the distribution. .\" .\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE .\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT .\" 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. .\" .\" $FreeBSD$ .\" .Dd January 20, 2016 .Dt CFI 4 .Os .Sh NAME .Nm cfi , .Nm cfid .Nd driver for Common Flash Interface (CFI) NOR flash .Sh SYNOPSIS .Cd "device cfi" .Cd "device cfid" .Cd "options CFI_SUPPORT_STRATAFLASH" .Cd "options CFI_ARMEDANDDANGEROUS" .Pp In .Pa /boot/device.hints : .Cd hint.cfi.0.at="nexus0" .Cd hint.cfi.0.maddr=0x74000000 .Cd hint.cfi.0.msize=0x4000000 .Pp In DTS file: .Cd flash@74000000 { -.Cd " compatible =" Qo cfi-flash Qc ; -.Cd " reg = <0x74000000 0x4000000>;" +.Cd " compatible =" Qo cfi-flash Qc ; +.Cd " reg = <0x74000000 0x4000000>;" .Cd }; .Sh DESCRIPTION The .Nm device driver provides a management interface to NOR flash devices supporting the Common Flash Interface (CFI) specification. Its companion device .Nm cfid provides a .Xr geom 4 disk interface to the device. .Pp Special support for features of the Intel StrataFlash line are available with the .Cd CFI_SUPPORT_STRATAFLASH kernel option. Additional support for write-once bits to switch part of Intel StrataFlash devices to read-only can be enabled by the .Cd CFI_ARMEDANDDANGEROUS kernel option. -.El .Sh SEE ALSO .Xr led 4 .Sh HISTORY The .Nm device driver first appeared in .Fx 8.0 . .Sh AUTHORS The .Nm driver was written by .An Juniper Networks with StrataFlash support by .An Sam Leffler . This manual page was written by SRI International and the University of Cambridge Computer Laboratory under DARPA/AFRL contract .Pq FA8750-10-C-0237 .Pq Do CTSRD Dc , as part of the DARPA CRASH research programme. Index: head/share/man/man4/lagg.4 =================================================================== --- head/share/man/man4/lagg.4 (revision 297454) +++ head/share/man/man4/lagg.4 (revision 297455) @@ -1,222 +1,222 @@ .\" $OpenBSD: trunk.4,v 1.18 2006/06/09 13:53:34 jmc Exp $ .\" .\" Copyright (c) 2005, 2006 Reyk Floeter .\" .\" 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. .\" .\" $FreeBSD$ .\" .Dd January 23, 2016 .Dt LAGG 4 .Os .Sh NAME .Nm lagg .Nd link aggregation and link failover interface .Sh SYNOPSIS To compile this driver into the kernel, place the following line in your kernel configuration file: .Bd -ragged -offset indent .Cd "device lagg" .Ed .Pp Alternatively, to load the driver as a module at boot time, place the following line in .Xr loader.conf 5 : .Bd -literal -offset indent if_lagg_load="YES" .Ed .Sh DESCRIPTION The .Nm interface allows aggregation of multiple network interfaces as one virtual .Nm interface for the purpose of providing fault-tolerance and high-speed links. .Pp A .Nm interface can be created using the .Ic ifconfig lagg Ns Ar N Ic create command. It can use different link aggregation protocols specified using the .Ic laggproto Ar proto option. Child interfaces can be added using the .Ic laggport Ar child-iface option and removed using the .Ic -laggport Ar child-iface option. .Pp The driver currently supports the aggregation protocols .Ic failover (the default), .Ic lacp , .Ic loadbalance , .Ic roundrobin , .Ic broadcast , and .Ic none . The protocols determine which ports are used for outgoing traffic and whether a specific port accepts incoming traffic. The interface link state is used to validate if the port is active or not. .Bl -tag -width loadbalance .It Ic failover Sends traffic only through the active port. If the master port becomes unavailable, the next active port is used. The first interface added is the master port; any interfaces added after that are used as failover devices. .Pp By default, received traffic is only accepted when they are received through the active port. This constraint can be relaxed by setting the .Va net.link.lagg.failover_rx_all .Xr sysctl 8 variable to a nonzero value, which is useful for certain bridged network setups. .Ic loadbalance mode. .It Ic lacp Supports the IEEE 802.1AX (formerly 802.3ad) Link Aggregation Control Protocol (LACP) and the Marker Protocol. LACP will negotiate a set of aggregable links with the peer in to one or more Link Aggregated Groups. Each LAG is composed of ports of the same speed, set to full-duplex operation. The traffic will be balanced across the ports in the LAG with the greatest total speed, in most cases there will only be one LAG which contains all ports. In the event of changes in physical connectivity, Link Aggregation will quickly converge to a new configuration. .It Ic loadbalance Balances outgoing traffic across the active ports based on hashed protocol header information and accepts incoming traffic from any active port. This is a static setup and does not negotiate aggregation with the peer or exchange frames to monitor the link. The hash includes the Ethernet source and destination address, and, if available, the VLAN tag, and the IP source and destination address. .It Ic roundrobin Distributes outgoing traffic using a round-robin scheduler through all active ports and accepts incoming traffic from any active port. Using .Ic roundrobin mode can cause unordered packet arrival at the client. Throughput might be limited as the client performs CPU-intensive packet reordering. .It Ic broadcast Sends frames to all ports of the LAG and receives frames on any port of the LAG. .It Ic none This protocol is intended to do nothing: it disables any traffic without disabling the .Nm interface itself. .El .Pp Each .Nm interface is created at runtime using interface cloning. This is most easily done with the .Xr ifconfig 8 .Cm create command or using the .Va cloned_interfaces variable in .Xr rc.conf 5 . .Pp The MTU of the first interface to be added is used as the lagg MTU. All additional interfaces are required to have exactly the same value. .Pp The .Ic loadbalance and .Ic lacp modes will use the RSS hash from the network card if available to avoid computing one, this may give poor traffic distribution if the hash is invalid or uses less of the protocol header information. Local hash computation can be forced per interface by setting the .Cm use_flowid .Xr ifconfig 8 flag. The default for new interfaces is set via the .Va net.link.lagg.default_use_flowid .Xr sysctl 8 . .Sh EXAMPLES Create a link aggregation using LACP with two .Xr bge 4 Gigabit Ethernet interfaces: .Bd -literal -offset indent # ifconfig bge0 up # ifconfig bge1 up # ifconfig lagg0 create # ifconfig lagg0 laggproto lacp laggport bge0 laggport bge1 \e 192.168.1.1 netmask 255.255.255.0 .Ed .Pp -Create a link aggregation using ROUNDROBIN with two +Create a link aggregation using ROUNDROBIN with two .Xr bge 4 Gigabit Ethernet interfaces and set the limit of 500 packets per interface: .Bd -literal -offset indent # ifconfig bge0 up # ifconfig bge1 up # ifconfig lagg0 create # ifconfig lagg0 laggproto roundrobin laggport bge0 laggport bge1 \e 192.168.1.1 netmask 255.255.255.0 # ifconfig lagg0 rr_limit 500 .Ed .Pp The following example uses an active failover interface to set up roaming between wired and wireless networks using two network devices. Whenever the wired master interface is unplugged, the wireless failover device will be used: .Bd -literal -offset indent # ifconfig em0 up # ifconfig ath0 ether 00:11:22:33:44:55 # ifconfig create wlan0 wlandev ath0 ssid my_net up # ifconfig lagg0 create # ifconfig lagg0 laggproto failover laggport em0 laggport wlan0 \e 192.168.1.1 netmask 255.255.255.0 .Ed .Pp (Note the mac address of the wireless device is forced to match the wired device as a workaround.) .Sh SEE ALSO .Xr ng_one2many 4 , .Xr ifconfig 8 , .Xr sysctl 8 .Sh HISTORY The .Nm device first appeared in .Fx 6.3 . .Sh AUTHORS .An -nosplit The .Nm driver was written under the name .Nm trunk by .An Reyk Floeter Aq Mt reyk@openbsd.org . The LACP implementation was written by .An YAMAMOTO Takashi for .Nx . .Sh BUGS There is no way to configure LACP administrative variables, including system and port priorities. The current implementation always performs active-mode LACP and uses 0x8000 as system and port priorities. Index: head/share/man/man4/uart.4 =================================================================== --- head/share/man/man4/uart.4 (revision 297454) +++ head/share/man/man4/uart.4 (revision 297455) @@ -1,255 +1,255 @@ .\" .\" Copyright (c) 2003 Marcel Moolenaar .\" All rights reserved. .\" .\" Redistribution and use in source and binary forms, with or without .\" modification, are permitted provided that the following conditions .\" are met: .\" .\" 1. Redistributions of source code must retain the above copyright .\" notice, this list of conditions and the following disclaimer. .\" 2. Redistributions in binary form must reproduce the above copyright .\" notice, this list of conditions and the following disclaimer in the .\" documentation and/or other materials provided with the distribution. .\" .\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR .\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES .\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. .\" IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, .\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT .\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, .\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY .\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 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. .\" .\" $FreeBSD$ .\" .Dd December 9, 2015 .Dt UART 4 .Os .Sh NAME .Nm uart .Nd driver for Universal Asynchronous Receiver/Transmitter (UART) devices .Sh SYNOPSIS .Cd "device uart" .Pp .Cd "device puc" .Cd "device uart" .Pp .Cd "device scc" .Cd "device uart" .Pp In .Pa /boot/device.hints : .Cd hint.uart.0.disabled="1" .Cd hint.uart.0.baud="38400" .Cd hint.uart.0.port="0x3f8" .Cd hint.uart.0.flags="0x10" .Pp With .Ar flags encoded as: .Bl -tag -compact -width 0x000000 .It 0x00010 device is potential system console .It 0x00080 use this port for remote kernel debugging .It 0x00100 set RX FIFO trigger level to ``low'' (NS8250 only) .It 0x00200 set RX FIFO trigger level to ``medium low'' (NS8250 only) .It 0x00400 set RX FIFO trigger level to ``medium high'' (default, NS8250 only) .It 0x00800 set RX FIFO trigger level to ``high'' (NS8250 only) .El .\" .Sh DESCRIPTION The .Nm device driver provides support for various classes of UARTs implementing the EIA RS-232C (CCITT V.24) serial communications interface. Each such interface is controlled by a separate and independent instance of the .Nm driver. The primary support for devices that contain multiple serial interfaces or that contain other functionality besides one or more serial interfaces is provided by the .Xr puc 4 , or .Xr scc 4 device drivers. However, the serial interfaces of those devices that are managed by the .Xr puc 4 , or .Xr scc 4 driver are each independently controlled by the .Nm driver. As such, the .Xr puc 4 , or .Xr scc 4 driver provides umbrella functionality for the .Nm driver and hides the complexities that are inherent when elementary components are packaged together. .Pp The .Nm driver has a modular design to allow it to be used on differing hardware and for various purposes. In the following sections the components are discussed in detail. Options are described in the section that covers the component to which each option applies. .\" .Ss CORE COMPONENT At the heart of the .Nm driver is the core component. It contains the bus attachments and the low-level interrupt handler. .\" .Ss HARDWARE DRIVERS The core component and the kernel interfaces talk to the hardware through the hardware interface. This interface serves as an abstraction of the hardware and allows varying UARTs to be used for serial communications. .\" .Ss SYSTEM DEVICES System devices are UARTs that have a special purpose by way of hardware design or software setup. For example, Sun UltraSparc machines use UARTs as their keyboard interface. Such an UART cannot be used for general purpose communications. Likewise, when the kernel is configured for a serial console, the corresponding UART will in turn be a system device so that the kernel can output boot messages early on in the boot process. .\" .Ss KERNEL INTERFACES The last but not least of the components is the kernel interface. This component ultimately determines how the UART is made visible to the kernel in particular and to users in general. The default kernel interface is the TTY interface. This allows the UART to be used for terminals, modems and serial line IP applications. System devices, with the notable exception of serial consoles, generally have specialized kernel interfaces. .\" .Sh HARDWARE The .Nm driver supports the following classes of UARTs: .Pp .Bl -bullet -compact .It NS8250: standard hardware based on the 8250, 16450, 16550, 16650, 16750 or the 16950 UARTs. .It SCC: serial communications controllers supported by the .Xr scc 4 device driver. .El .\" .Sh Pulse Per Second (PPS) Timing Interface The .Nm driver can capture PPS timing information as defined in RFC 2783. The API, accessed via .Xr ioctl 2 , is available on the tty device. To use the PPS capture feature with .Xr ntpd 8 , symlink the tty callout device .Va /dev/cuau? to .Va /dev/pps0. .Pp The .Va hw.uart.pps_mode tunable configures the PPS capture mode for all uart devices; it can be set in .Xr loader.conf 5 . The .Va dev.uart.0.pps_mode sysctl configures the PPS capture mode for a specific uart device; it can be set in .Xr loader.conf 5 or .Xr sysctl.conf 5 . .Pp The following capture modes are available: .Bl -tag -compact -offset "mmmm" -width "mmmm" .It 0x00 Capture disabled. .It 0x01 Capture pulses on the CTS line. .It 0x02 Capture pulses on the DCD line. .El .Pp -The following values may be ORed with the capture mode to configure +The following values may be ORed with the capture mode to configure capture processing options: .Bl -tag -compact -offset "mmmm" -width "mmmm" .It 0x10 Invert the pulse (RS-232 logic low = ASSERT, high = CLEAR). .It 0x20 Attempt to capture narrow pulses. .El .Pp Add the narrow pulse option when the incoming PPS pulse width is small enough to prevent reliable capture in normal mode. In narrow mode the driver uses the hardware's ability to latch a line state change; not all hardware has this capability. The hardware latch provides a reliable indication that a pulse occurred, but prevents distinguishing between the CLEAR and ASSERT edges of the pulse. For each detected pulse, the driver synthesizes both an ASSERT and a CLEAR event, using the same timestamp for each. To prevent spurious events when the hardware is intermittently able to see both edges of a pulse, the driver will not generate a new pair of events within a half second of the prior pair. Both normal and narrow pulse modes work with .Xr ntpd 8 . .Pp Add the invert option when the connection to the uart device uses TTL level signals, or when the PPS source emits inverted pulses. RFC 2783 defines an ASSERT event as a higher-voltage line level, and a CLEAR event as a lower-voltage line level, in the context of the RS-232 protocol. The modem control signals on a TTL-level connection are typically inverted from the RS-232 levels. For example, carrier presence is indicated by a high signal on an RS-232 DCD line, and by a low signal on a TTL DCD line. This is due to the use of inverting line driver buffers to convert between TTL and RS-232 line levels in most hardware designs. Generally speaking, a connection to a DB-9 style connector is an RS-232 level signal at up to 12 volts. A connection to header pins or an edge-connector on an embedded board is typically a TTL signal at 3.3 or 5 volts. .Sh FILES .Bl -tag -width ".Pa /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 puc 4 , .Xr scc 4 .\" .Sh HISTORY The .Nm device driver first appeared in .Fx 5.2 . .Sh AUTHORS The .Nm device driver and this manual page were written by .An Marcel Moolenaar Aq Mt marcel@xcllnt.net .