CVS commit: src/share/man/man9
Module Name:src Committed By: thorpej Date: Mon Mar 6 12:25:06 UTC 2023 Modified Files: src/share/man/man9: portfeatures.9 Log Message: Document __HAVE_UCAS_FULL and __HAVE_UCAS_MP. To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/share/man/man9/portfeatures.9 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/share/man/man9/portfeatures.9 diff -u src/share/man/man9/portfeatures.9:1.2 src/share/man/man9/portfeatures.9:1.3 --- src/share/man/man9/portfeatures.9:1.2 Mon Mar 6 01:03:45 2023 +++ src/share/man/man9/portfeatures.9 Mon Mar 6 12:25:06 2023 @@ -1,4 +1,4 @@ -.\" $NetBSD: portfeatures.9,v 1.2 2023/03/06 01:03:45 wiz Exp $ +.\" $NetBSD: portfeatures.9,v 1.3 2023/03/06 12:25:06 thorpej Exp $ .\" .\" Copyright (c) The NetBSD Foundation, Inc. .\" All rights reserved. @@ -75,4 +75,18 @@ interlock. .\" - .It Dv __HAVE_SPIN_MUTEX_STUBS Pq Xr mutex 9 The port provides fast path enter and exit stubs for spin mutexes. +. +.\" - +.It Dv __HAVE_UCAS_FULL Pq Xr ucas 9 +The port provides a full implementation of the low-level primitives +required for atomic compare-and-swap operations to user-space addresses. +. +.\" - +.It Dv __HAVE_UCAS_MP Pq Xr ucas 9 +The port does not provide a full implementation of the low-level +primitives required for atomic compare-and-swap operations to user-space +addresses, but does provide an implementation of those primitives that +can be used if +.Pq and only if +the system has more than one processor. .El
CVS commit: src/share/man/man9
Module Name:src Committed By: thorpej Date: Mon Mar 6 12:25:06 UTC 2023 Modified Files: src/share/man/man9: portfeatures.9 Log Message: Document __HAVE_UCAS_FULL and __HAVE_UCAS_MP. To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/share/man/man9/portfeatures.9 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/share/man/man9
Module Name:src Committed By: wiz Date: Mon Mar 6 01:03:45 UTC 2023 Modified Files: src/share/man/man9: portfeatures.9 Log Message: fix typos To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/share/man/man9/portfeatures.9 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/share/man/man9/portfeatures.9 diff -u src/share/man/man9/portfeatures.9:1.1 src/share/man/man9/portfeatures.9:1.2 --- src/share/man/man9/portfeatures.9:1.1 Mon Mar 6 00:49:31 2023 +++ src/share/man/man9/portfeatures.9 Mon Mar 6 01:03:45 2023 @@ -1,4 +1,4 @@ -.\" $NetBSD: portfeatures.9,v 1.1 2023/03/06 00:49:31 uwe Exp $ +.\" $NetBSD: portfeatures.9,v 1.2 2023/03/06 01:03:45 wiz Exp $ .\" .\" Copyright (c) The NetBSD Foundation, Inc. .\" All rights reserved. @@ -32,9 +32,9 @@ .Nd the __HAVEs (\|and the have nots\|) . .Sh DESCRIPTION -Machine-independent kernel code adapts to differeces in hardware +Machine-independent kernel code adapts to differences in hardware capabilities provided by the machine-dependent parts of the kernel. -A port declares its capabilities by definining various +A port declares its capabilities by defining various .Li __HAVE_ Ns Ar feature macros. This manual page provides an index of such macros with pointers to
CVS commit: src/share/man/man9
Module Name:src Committed By: wiz Date: Mon Mar 6 01:03:45 UTC 2023 Modified Files: src/share/man/man9: portfeatures.9 Log Message: fix typos To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/share/man/man9/portfeatures.9 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/share/man/man9
Module Name:src Committed By: riastradh Date: Thu Feb 23 03:03:23 UTC 2023 Modified Files: src/share/man/man9: pcq.9 Log Message: pcq(9): Document memory ordering guarantees. To generate a diff of this commit: cvs rdiff -u -r1.8 -r1.9 src/share/man/man9/pcq.9 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/share/man/man9/pcq.9 diff -u src/share/man/man9/pcq.9:1.8 src/share/man/man9/pcq.9:1.9 --- src/share/man/man9/pcq.9:1.8 Thu Feb 8 09:03:23 2018 +++ src/share/man/man9/pcq.9 Thu Feb 23 03:03:23 2023 @@ -1,4 +1,4 @@ -.\" $NetBSD: pcq.9,v 1.8 2018/02/08 09:03:23 dholland Exp $ +.\" $NetBSD: pcq.9,v 1.9 2023/02/23 03:03:23 riastradh Exp $ .\" .\" Copyright (c) 2010 The NetBSD Foundation, Inc. .\" All rights reserved. @@ -118,6 +118,63 @@ otherwise, return The item must not have the value of .Dv NULL . .El +.Ss Memory ordering +Any memory operations sequenced before +.Fn pcq_put +of an item in one thread happen before all memory operations with data +dependencies on the item returned by +.Fn pcq_get +or +.Fn pcq_peek +in another thread. +For example: +.Bd -literal -offset indent +int mumble; + +/* producer */ +mumble = 42; // A +foo->x = 123; // B +refcnt = foo->refcnt; // C +pcq_put(pcq, foo); +KASSERT(refcnt == 0); + +/* consumer */ +foo = pcq_get(pcq); +if (foo == NULL) + return; +atomic_inc_uint(>refcnt); // D +x = foo->x; // E +if (x == 123) + KASSERT(mumble == 42); // F +.Ed +.Pp +In this example, memory operations B and C happen-before D and E. +However, no ordering is guaranteed for A or F relative to any other +memory operations, because the memory location of +.Fa mumble +is independent of the pointer +.Fa foo +returned by +.Fn pcq_get . +.Pp +If you must guarantee A happens before F, then on the consumer side, +after +.Fn pcq_get +or +.Fn pcq_peek , +you can call +.Fn membar_acquire +to turn it into an acquire operation instead of a consume operation; +.Fn pcq_put +serves as the matching release operation. +.Po +This is a little dicey. +Perhaps there should be separate +.Fn pcq_peek_acq +and +.Fn pcq_get_acq +operations if this semantics is necessary. +.Pc .Sh CODE REFERENCES The .Nm
CVS commit: src/share/man/man9
Module Name:src Committed By: riastradh Date: Thu Feb 23 03:03:23 UTC 2023 Modified Files: src/share/man/man9: pcq.9 Log Message: pcq(9): Document memory ordering guarantees. To generate a diff of this commit: cvs rdiff -u -r1.8 -r1.9 src/share/man/man9/pcq.9 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/share/man/man9
Module Name:src Committed By: pgoyette Date: Thu Feb 16 04:58:21 UTC 2023 Modified Files: src/share/man/man9: vnfileops.9 Log Message: Add a period at the end of a sentence. To generate a diff of this commit: cvs rdiff -u -r1.16 -r1.17 src/share/man/man9/vnfileops.9 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/share/man/man9/vnfileops.9 diff -u src/share/man/man9/vnfileops.9:1.16 src/share/man/man9/vnfileops.9:1.17 --- src/share/man/man9/vnfileops.9:1.16 Thu Dec 2 12:54:13 2010 +++ src/share/man/man9/vnfileops.9 Thu Feb 16 04:58:21 2023 @@ -1,4 +1,4 @@ -.\" $NetBSD: vnfileops.9,v 1.16 2010/12/02 12:54:13 wiz Exp $ +.\" $NetBSD: vnfileops.9,v 1.17 2023/02/16 04:58:21 pgoyette Exp $ .\" .\" Copyright (c) 2001, 2005, 2006 The NetBSD Foundation, Inc. .\" All rights reserved. @@ -27,7 +27,7 @@ .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE .\" POSSIBILITY OF SUCH DAMAGE. .\" -.Dd April 9, 2008 +.Dd February 16, 2023 .Dt VNFILEOPS 9 .Os .Sh NAME @@ -103,7 +103,7 @@ The file is specified by .Fa fp . The argument .Fa l -is the calling lwp +is the calling lwp. .Fn vn_ioctl simply locks the vnode and invokes the vnode operation .Xr VOP_IOCTL 9
CVS commit: src/share/man/man9
Module Name:src Committed By: pgoyette Date: Thu Feb 16 04:58:21 UTC 2023 Modified Files: src/share/man/man9: vnfileops.9 Log Message: Add a period at the end of a sentence. To generate a diff of this commit: cvs rdiff -u -r1.16 -r1.17 src/share/man/man9/vnfileops.9 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/share/man/man9
Module Name:src Committed By: uwe Date: Thu Feb 2 14:09:52 UTC 2023 Modified Files: src/share/man/man9: devsw_attach.9 Log Message: devsw_attach(9): Use semantic markup instead of .Em To generate a diff of this commit: cvs rdiff -u -r1.5 -r1.6 src/share/man/man9/devsw_attach.9 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/share/man/man9/devsw_attach.9 diff -u src/share/man/man9/devsw_attach.9:1.5 src/share/man/man9/devsw_attach.9:1.6 --- src/share/man/man9/devsw_attach.9:1.5 Thu Feb 2 13:25:41 2023 +++ src/share/man/man9/devsw_attach.9 Thu Feb 2 14:09:52 2023 @@ -1,4 +1,4 @@ -.\" $NetBSD: devsw_attach.9,v 1.5 2023/02/02 13:25:41 pgoyette Exp $ +.\" $NetBSD: devsw_attach.9,v 1.6 2023/02/02 14:09:52 uwe Exp $ .\" .\" Copyright (c) 2015 The NetBSD Foundation, Inc. .\" All rights reserved. @@ -73,11 +73,11 @@ .Sh DESCRIPTION If a device driver has character device interfaces accessed from userland, the driver must define a -.Em cdevsw +.Vt cdevsw structure. If the driver also has block device interfaces, the driver must additionally define a -.Em bdevsw +.Vt bdevsw structure. These structures are constant, and are defined within the .Xr driver 9 . @@ -85,54 +85,57 @@ These structures are constant, and are d For drivers which are included in the kernel via .Xr config 1 , the -.Em cdevsw +.Vt cdevsw and -.Em bdevsw +.Vt bdevsw structures are automatically linked into the configuration database. For drivers which are separately loaded, the .Fn devsw_attach function creates the necessary linkage and associates the -.Em cdev +.Fa cdev and optional -.Em bdev +.Fa bdev with the .Xr driver 9 . If there is no block device interface needed, -.Em bdev +.Fa bdev should be set to .Dv NULL and -.Em bmajor +.Fa bmajor to -.Dv \-1 . +.Dv NODEVMAJOR . The -.Em devname , +.Fa devname , major number, and device type (character or block) must correspond to the device file which will be opened by user programs. By passing -.Dv \-1 +.Dv NODEVMAJOR to the function for the -.Em cmajor +.Fa cmajor or -.Em bmajor , +.Fa bmajor , the major number can be automatically generated. -It can then be returned to userspace (for example, using -.Xr sysctl 8 ) +It can then be returned to userspace +.Po +for example, using +.Xr sysctl 8 +.Pc for creation of the device node. .Pp The .Fn devsw_detach function is used to detach the -.Em bdev +.Fa bdev and -.Em cdev +.Fa cdev structures. .Fn devsw_detach should be called before a loaded device driver is unloaded. The caller must ensure that there are no open instances of the device, and that the device's -.Fn d_open +.Fa d_open function will fail, before calling .Fn devsw_detach . .Pp @@ -141,22 +144,22 @@ The and .Fn cdevsw_lookup functions return -.Em "const struct bdevsw *" +.Vt "const struct bdevsw *" and -.Em "const struct cdevsw *" +.Vt "const struct cdevsw *" for the given -.Em dev . +.Fa dev . .Pp The .Fn bdevsw_lookup_major and .Fn cdevsw_lookup_major functions return -.Em "devmajor_t" +.Vt "devmajor_t" for the given -.Em "const struct bdevsw *" +.Vt "const struct bdevsw *" or -.Em "const struct cdevsw *" . +.Vt "const struct cdevsw *" . .Sh RETURN VALUES Upon successful completion, .Fn devsw_attach
CVS commit: src/share/man/man9
Module Name:src Committed By: uwe Date: Thu Feb 2 14:09:52 UTC 2023 Modified Files: src/share/man/man9: devsw_attach.9 Log Message: devsw_attach(9): Use semantic markup instead of .Em To generate a diff of this commit: cvs rdiff -u -r1.5 -r1.6 src/share/man/man9/devsw_attach.9 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/share/man/man9
Module Name:src Committed By: pgoyette Date: Thu Feb 2 13:25:41 UTC 2023 Modified Files: src/share/man/man9: devsw_attach.9 Log Message: Fix markup. To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 src/share/man/man9/devsw_attach.9 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/share/man/man9/devsw_attach.9 diff -u src/share/man/man9/devsw_attach.9:1.4 src/share/man/man9/devsw_attach.9:1.5 --- src/share/man/man9/devsw_attach.9:1.4 Mon Mar 28 12:33:20 2022 +++ src/share/man/man9/devsw_attach.9 Thu Feb 2 13:25:41 2023 @@ -1,4 +1,4 @@ -.\" $NetBSD: devsw_attach.9,v 1.4 2022/03/28 12:33:20 riastradh Exp $ +.\" $NetBSD: devsw_attach.9,v 1.5 2023/02/02 13:25:41 pgoyette Exp $ .\" .\" Copyright (c) 2015 The NetBSD Foundation, Inc. .\" All rights reserved. @@ -27,7 +27,7 @@ .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE .\" POSSIBILITY OF SUCH DAMAGE. .\" -.Dd January 11, 2022 +.Dd February 2, 2023 .Dt DEVSW 9 .Os .Sh NAME @@ -133,8 +133,8 @@ should be called before a loaded device The caller must ensure that there are no open instances of the device, and that the device's .Fn d_open -function will fail, before calling. -Fn devsw_detach . +function will fail, before calling +.Fn devsw_detach . .Pp The .Fn bdevsw_lookup
CVS commit: src/share/man/man9
Module Name:src Committed By: pgoyette Date: Thu Feb 2 13:25:41 UTC 2023 Modified Files: src/share/man/man9: devsw_attach.9 Log Message: Fix markup. To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 src/share/man/man9/devsw_attach.9 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/share/man/man9
Module Name:src Committed By: gutteridge Date: Wed Feb 1 03:27:46 UTC 2023 Modified Files: src/share/man/man9: mutex.9 Log Message: mutex.9: add a small detail to the history section To generate a diff of this commit: cvs rdiff -u -r1.34 -r1.35 src/share/man/man9/mutex.9 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/share/man/man9/mutex.9 diff -u src/share/man/man9/mutex.9:1.34 src/share/man/man9/mutex.9:1.35 --- src/share/man/man9/mutex.9:1.34 Mon Dec 19 00:41:45 2022 +++ src/share/man/man9/mutex.9 Wed Feb 1 03:27:45 2023 @@ -1,4 +1,4 @@ -.\" $NetBSD: mutex.9,v 1.34 2022/12/19 00:41:45 uwe Exp $ +.\" $NetBSD: mutex.9,v 1.35 2023/02/01 03:27:45 gutteridge Exp $ .\" .\" Copyright (c) 2007, 2009 The NetBSD Foundation, Inc. .\" All rights reserved. @@ -314,3 +314,6 @@ code must provide to support mutexes. .Sh HISTORY The mutex primitives first appeared in .Nx 5.0 . +.Fn mutex_ownable +first appeared in +.Nx 8.0 .
CVS commit: src/share/man/man9
Module Name:src Committed By: gutteridge Date: Wed Feb 1 03:27:46 UTC 2023 Modified Files: src/share/man/man9: mutex.9 Log Message: mutex.9: add a small detail to the history section To generate a diff of this commit: cvs rdiff -u -r1.34 -r1.35 src/share/man/man9/mutex.9 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/share/man/man9
Module Name:src Committed By: uwe Date: Mon Dec 19 00:41:45 UTC 2022 Modified Files: src/share/man/man9: mutex.9 Log Message: mutex(9): Minor formatting fixes While here, move the reference to options(4) to the OPTIONS section. To generate a diff of this commit: cvs rdiff -u -r1.33 -r1.34 src/share/man/man9/mutex.9 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/share/man/man9/mutex.9 diff -u src/share/man/man9/mutex.9:1.33 src/share/man/man9/mutex.9:1.34 --- src/share/man/man9/mutex.9:1.33 Sun Dec 18 23:38:42 2022 +++ src/share/man/man9/mutex.9 Mon Dec 19 00:41:45 2022 @@ -1,4 +1,4 @@ -.\" $NetBSD: mutex.9,v 1.33 2022/12/18 23:38:42 gutteridge Exp $ +.\" $NetBSD: mutex.9,v 1.34 2022/12/19 00:41:45 uwe Exp $ .\" .\" Copyright (c) 2007, 2009 The NetBSD Foundation, Inc. .\" All rights reserved. @@ -67,7 +67,8 @@ .Cd "options LOCKDEBUG" .Sh DESCRIPTION Mutexes are used in the kernel to implement mutual exclusion among LWPs -(lightweight processes) and interrupt handlers. +.Pq lightweight processes +and interrupt handlers. .Pp The .Vt kmutex_t @@ -80,23 +81,21 @@ Mutexes replace the system traditionally used to provide synchronization between interrupt handlers and LWPs. .Sh OPTIONS -.Bl -tag -width abcd +The following kernel options have effect on mutex operations: +.Bl -tag -width Cd .It Cd "options DIAGNOSTIC" -.Pp Kernels compiled with the .Dv DIAGNOSTIC option perform basic sanity checks on mutex operations. .It Cd "options LOCKDEBUG" -.Pp Kernels compiled with the .Dv LOCKDEBUG option perform potentially CPU intensive sanity checks on mutex operations. .El .Sh FUNCTIONS -.Bl -tag -width abcd +.Bl -tag -width Ds .It Fn mutex_init "mtx" "type" "ipl" -.Pp Dynamically initialize a mutex for use. .Pp No other operations can be performed on a mutex until it has been initialized. @@ -115,9 +114,8 @@ an endorsed, stable part of the interfac The type of mutex returned depends on the .Fa ipl argument: -.Bl -tag -width abcd -.It IPL_NONE, or one of the IPL_SOFT* constants -.Pp +.Bl -tag -width Dv +.It Dv IPL_NONE , No or one of the Dv IPL_SOFT* No constants An adaptive mutex will be returned. Adaptive mutexes provide mutual exclusion between LWPs, and between LWPs and soft interrupt handlers. @@ -125,8 +123,7 @@ and between LWPs and soft interrupt hand Adaptive mutexes cannot be acquired from a hardware interrupt handler. An LWP may either sleep or busy-wait when attempting to acquire an adaptive mutex that is already held. -.It IPL_VM, IPL_SCHED, IPL_HIGH -.Pp +.It Dv IPL_VM , IPL_SCHED , IPL_HIGH A spin mutex will be returned. Spin mutexes provide mutual exclusion between LWPs, and between LWPs and interrupt handlers. @@ -160,13 +157,11 @@ See .Xr spl 9 for further information on interrupt priority levels (IPLs). .It Fn mutex_destroy "mtx" -.Pp Release resources used by a mutex. The mutex may not be used after it has been destroyed. .Fn mutex_destroy may block in order to free memory. .It Fn mutex_enter "mtx" -.Pp Acquire a mutex. If the mutex is already held, the caller will block and not return until the mutex is acquired. @@ -194,7 +189,6 @@ the level set in .Fn mutex_init if it is not already equal or higher. .It Fn mutex_exit "mtx" -.Pp Release a mutex. The mutex must have been previously acquired by the caller. Mutexes may be released out of order as needed. @@ -210,17 +204,16 @@ to acquire the mutex even on another CPU Thus, there is a global total ordering on all loads and stores under the same mutex. .It Fn mutex_ownable "mtx" -.Pp When compiled with .Dv LOCKDEBUG -(see -.Xr options 4 ) , ensure that the current process can successfully acquire .Ar mtx . If .Ar mtx is already owned by the current process, the system will panic -with a "locking against myself" error. +with a +.Dq locking against myself\^ +error. .Pp This function is needed because .Fn mutex_owned @@ -230,7 +223,6 @@ vs owned by another process. is reasonably heavy-weight, and should only be used with .Xr KDASSERT 9 . .It Fn mutex_owned "mtx" -.Pp For adaptive mutexes, return non-zero if the current LWP holds the mutex. For spin mutexes, return non-zero if the mutex is held, potentially by the current processor. @@ -239,14 +231,11 @@ Otherwise, return zero. .Fn mutex_owned is provided for making diagnostic checks to verify that a lock is held. For example: -.Bd -literal - KASSERT(mutex_owned(_lock)); -.Ed +.Dl KASSERT(mutex_owned(_lock)); .Pp It should not be used to make locking decisions at run time. For spin mutexes, it must not be used to verify that a lock is not held. .It Fn mutex_spin_enter "mtx" -.Pp Equivalent to .Fn mutex_enter , but may only be used when it is known that @@ -257,7 +246,6 @@ Implies the same memory ordering as On some architectures, this can substantially reduce the cost of acquiring a spin mutex. .It Fn
CVS commit: src/share/man/man9
Module Name:src Committed By: uwe Date: Mon Dec 19 00:41:45 UTC 2022 Modified Files: src/share/man/man9: mutex.9 Log Message: mutex(9): Minor formatting fixes While here, move the reference to options(4) to the OPTIONS section. To generate a diff of this commit: cvs rdiff -u -r1.33 -r1.34 src/share/man/man9/mutex.9 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/share/man/man9
Module Name:src Committed By: gutteridge Date: Sun Dec 18 23:38:42 UTC 2022 Modified Files: src/share/man/man9: mutex.9 Log Message: mutex.9: fix markup (.Em not .Fn) To generate a diff of this commit: cvs rdiff -u -r1.32 -r1.33 src/share/man/man9/mutex.9 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/share/man/man9/mutex.9 diff -u src/share/man/man9/mutex.9:1.32 src/share/man/man9/mutex.9:1.33 --- src/share/man/man9/mutex.9:1.32 Sat Aug 20 14:17:36 2022 +++ src/share/man/man9/mutex.9 Sun Dec 18 23:38:42 2022 @@ -1,4 +1,4 @@ -.\" $NetBSD: mutex.9,v 1.32 2022/08/20 14:17:36 riastradh Exp $ +.\" $NetBSD: mutex.9,v 1.33 2022/12/18 23:38:42 gutteridge Exp $ .\" .\" Copyright (c) 2007, 2009 The NetBSD Foundation, Inc. .\" All rights reserved. @@ -203,7 +203,7 @@ All loads and stores before .Fn mutex_exit will not be reordered after it or delayed in a write buffer, and hence will -.Fn happen before +.Em happen before any subsequent .Fn mutex_enter to acquire the mutex even on another CPU or in an interrupt.
CVS commit: src/share/man/man9
Module Name:src Committed By: gutteridge Date: Sun Dec 18 23:38:42 UTC 2022 Modified Files: src/share/man/man9: mutex.9 Log Message: mutex.9: fix markup (.Em not .Fn) To generate a diff of this commit: cvs rdiff -u -r1.32 -r1.33 src/share/man/man9/mutex.9 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/share/man/man9
Module Name:src Committed By: msaitoh Date: Tue Oct 25 00:20:36 UTC 2022 Modified Files: src/share/man/man9: altq.9 Log Message: ifq_drops was changed to use uint64_t. To generate a diff of this commit: cvs rdiff -u -r1.18 -r1.19 src/share/man/man9/altq.9 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/share/man/man9/altq.9 diff -u src/share/man/man9/altq.9:1.18 src/share/man/man9/altq.9:1.19 --- src/share/man/man9/altq.9:1.18 Thu May 26 14:39:30 2022 +++ src/share/man/man9/altq.9 Tue Oct 25 00:20:36 2022 @@ -1,4 +1,4 @@ -.\" $NetBSD: altq.9,v 1.18 2022/05/26 14:39:30 rillig Exp $ +.\" $NetBSD: altq.9,v 1.19 2022/10/25 00:20:36 msaitoh Exp $ .\" $OpenBSD: altq.9,v 1.4 2001/07/12 12:41:42 itojun Exp $ .\" .\" Copyright (C) 2001 @@ -25,7 +25,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd May 26, 2022 +.Dd October 24, 2022 .Dt ALTQ 9 .Os .\" @@ -169,7 +169,7 @@ these fields.) struct mbuf *ifq_tail; |struct mbuf *ifq_tail; int ifq_len; |int ifq_len; int ifq_maxlen; |int ifq_maxlen; -int ifq_drops;|int ifq_drops; +uint64_t ifq_drops;|uint64_t ifq_drops; };|/* altq related fields */ |.. | };
CVS commit: src/share/man/man9
Module Name:src Committed By: msaitoh Date: Tue Oct 25 00:20:36 UTC 2022 Modified Files: src/share/man/man9: altq.9 Log Message: ifq_drops was changed to use uint64_t. To generate a diff of this commit: cvs rdiff -u -r1.18 -r1.19 src/share/man/man9/altq.9 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/share/man/man9
Module Name:src Committed By: riastradh Date: Sat Oct 15 14:54:21 UTC 2022 Modified Files: src/share/man/man9: vmem.9 Log Message: vmem(9): Clarify possible failure modes. Note that vmem_alloc and vmem_xalloc have failure modes -- failing with ENOMEM despite VM_SLEEP, or importing or sleeping forever -- that appear to be bugs when align/phase/nocross/minaddr/maxaddr are specified. To generate a diff of this commit: cvs rdiff -u -r1.20 -r1.21 src/share/man/man9/vmem.9 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/share/man/man9/vmem.9 diff -u src/share/man/man9/vmem.9:1.20 src/share/man/man9/vmem.9:1.21 --- src/share/man/man9/vmem.9:1.20 Tue Jun 16 01:29:00 2020 +++ src/share/man/man9/vmem.9 Sat Oct 15 14:54:21 2022 @@ -1,4 +1,4 @@ -.\" $NetBSD: vmem.9,v 1.20 2020/06/16 01:29:00 thorpej Exp $ +.\" $NetBSD: vmem.9,v 1.21 2022/10/15 14:54:21 riastradh Exp $ .\" .\" Copyright (c)2006 YAMAMOTO Takashi, .\" All rights reserved. @@ -500,18 +500,45 @@ The caller must ensure that no one will .\" .Sh RETURN VALUES .Fn vmem_create -return a pointer to the newly allocated vmem_t. -Otherwise, it returns -.Dv NULL . -.Pp -On success, -.Fn vmem_xalloc and +.Fn vmem_xcreate +return a pointer to the newly allocated vmem_t on success, or +.Dv NULL +if +.Dv VM_NOSLEEP +was specified and memory could not be allocated immediately. +.Pp +.Fn vmem_add +returns 0 on success, or +.Er ENOMEM +if +.Dv VM_NOSLEEP +was specified and memory could not be allocated immediately to record +the region. +.Pp .Fn vmem_alloc -return 0. -Otherwise, -.Dv ENOMEM -is returned. +and +.Fn vmem_xalloc +return 0 on success, or +.Er ENOMEM +if either: +.Bl -dash +.It +.Dv VM_NOSLEEP +was specified and a matching region could not be allocated immediately; +or +.It +non-default +.Fa align , +.Fa phase , +or +.Fa nocross +parameters were specified, and a matching region could not be allocated +without calling the backing +.Fa allocfn +passed to +.Fn vmem_create . +.El .\" .Sh CODE REFERENCES The @@ -546,3 +573,29 @@ and .Xr RUN_ONCE 9 , so it cannot be used as early during system bootstrap as .Xr extent 9 . +.Pp +.Nm +has no way to pass +.Fa align , +.Fa phase , +.Fa nocross , +.Fa minaddr , +or +.Fa maxaddr +constraints into the backing allocator +.Fa allocfn , +so even if +.Dv VM_SLEEP +is specified, +.Fn vmem_alloc +and +.Fn vmem_xalloc +may spuriously fail immediately with +.Fa align , +.Fa phase , +or +.Fa nocross , +or sleep forever with +.Fa minaddr +or +.Fa maxaddr .
CVS commit: src/share/man/man9
Module Name:src Committed By: riastradh Date: Sat Oct 15 14:54:21 UTC 2022 Modified Files: src/share/man/man9: vmem.9 Log Message: vmem(9): Clarify possible failure modes. Note that vmem_alloc and vmem_xalloc have failure modes -- failing with ENOMEM despite VM_SLEEP, or importing or sleeping forever -- that appear to be bugs when align/phase/nocross/minaddr/maxaddr are specified. To generate a diff of this commit: cvs rdiff -u -r1.20 -r1.21 src/share/man/man9/vmem.9 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/share/man/man9
Module Name:src Committed By: riastradh Date: Thu Sep 22 14:02:24 UTC 2022 Modified Files: src/share/man/man9: curproc.9 Log Message: curproc(9): Rework man page. To generate a diff of this commit: cvs rdiff -u -r1.5 -r1.6 src/share/man/man9/curproc.9 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/share/man/man9/curproc.9 diff -u src/share/man/man9/curproc.9:1.5 src/share/man/man9/curproc.9:1.6 --- src/share/man/man9/curproc.9:1.5 Thu Jul 1 15:12:31 2010 +++ src/share/man/man9/curproc.9 Thu Sep 22 14:02:24 2022 @@ -1,4 +1,4 @@ -.\" $NetBSD: curproc.9,v 1.5 2010/07/01 15:12:31 wiz Exp $ +.\" $NetBSD: curproc.9,v 1.6 2022/09/22 14:02:24 riastradh Exp $ .\" .\" Copyright (c) 2002 The NetBSD Foundation, Inc. .\" All rights reserved. @@ -40,41 +40,68 @@ .In sys/proc.h .Ft struct cpu_info * .Fn curcpu "void" -.Ft struct proc * -.Fn curproc "void" -.Ft struct lwp * -.Fn curlwp "void" +.Vt struct proc *curproc ; +.Vt struct lwp *curlwp ; .Sh DESCRIPTION -The following macros can be used to retrieve -the current processor, process, and light-weight process -.Pq Tn LWP , +The following macros retrieve +the current CPU, process, and thread +.Pq lightweight process, or Tn LWP , respectively: -.Bl -enum -offset indent -.It -The machine-dependent +.Bl -tag -width Dv +.It Fn curcpu +Returns a pointer to the +.Vt "struct cpu_info" +structure representing the CPU that the code calling it is running on. +.Pp +The value of .Fn curcpu -macro returns a pointer to a -.Em cpu_info -structure containing information of the -.Tn CPU -that this thread is running on. -.It -The machine-independent -.Fn curproc -macro refers to a pointer to the process currently running on this -.Tn CPU . -.It -The -.Fn curlwp -macro expands to a pointer to -.Em lwp -structure, containing information about the current -.Tn LWP . -This macro is machine-independent, -but machine-dependent -.In machine/cpu.h -may redefine it. +is unstable and may be stale as soon as it is read unless the caller +prevents preemption by raising the IPL +.Pq Xr spl 9 , Xr mutex 9 , +by disabling preemption +.Pq Xr kpreempt_disable 9 , +or by binding the thread to its CPU +.Pq Xr curlwp_bind 9 . +.It Dv curproc +Yields a pointer to the +.Vt "struct proc" +structure representing the currently running process. +.Pp +The value of +.Dv curproc +is stable and does not change during execution except in +machine-dependent logic to perform context switches, so it works like a +global constant, not like a stateful procedure. +.It Dv curlwp +Yields a pointer to the +.Vt "struct lwp" +structure representing the currently running thread. +.Pp +The value of +.Dv curlwp +is stable and does not change during execution except in +machine-dependent logic to perform context switches, so it works like a +global constant, not like a stateful procedure. .El +.Sh SOURCE REFERENCES +The +.Fn curcpu +macro is defined in the machine-independent +.Pa machine/cpu.h . +.Pp +The +.Dv curproc +macro is defined in +.Pa sys/lwp.h . +.Pp +The +.Dv curlwp +macro has a machine-independent definition in +.Pa sys/lwp.h , +but it may be overridden by +.Pa machine/cpu.h , +and must be overridden on architectures supporting multiprocessing and +kernel preemption. .Sh SEE ALSO .Xr cpu_number 9 , .Xr proc_find 9
CVS commit: src/share/man/man9
Module Name:src Committed By: riastradh Date: Thu Sep 22 14:02:24 UTC 2022 Modified Files: src/share/man/man9: curproc.9 Log Message: curproc(9): Rework man page. To generate a diff of this commit: cvs rdiff -u -r1.5 -r1.6 src/share/man/man9/curproc.9 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/share/man/man9
Module Name:src Committed By: pgoyette Date: Wed Sep 7 01:18:33 UTC 2022 Modified Files: src/share/man/man9: sysctl.9 Log Message: Update to match recent changes in implementation. To generate a diff of this commit: cvs rdiff -u -r1.23 -r1.24 src/share/man/man9/sysctl.9 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/share/man/man9/sysctl.9 diff -u src/share/man/man9/sysctl.9:1.23 src/share/man/man9/sysctl.9:1.24 --- src/share/man/man9/sysctl.9:1.23 Wed Aug 7 19:58:50 2019 +++ src/share/man/man9/sysctl.9 Wed Sep 7 01:18:32 2022 @@ -1,4 +1,4 @@ -.\" $NetBSD: sysctl.9,v 1.23 2019/08/07 19:58:50 wiz Exp $ +.\" $NetBSD: sysctl.9,v 1.24 2022/09/07 01:18:32 pgoyette Exp $ .\" .\" Copyright (c) 2004 The NetBSD Foundation, Inc. .\" All rights reserved. @@ -27,7 +27,7 @@ .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE .\" POSSIBILITY OF SUCH DAMAGE. .\" -.Dd August 7, 2019 +.Dd September 6, 2022 .Dt SYSCTL 9 .Os .Sh NAME @@ -546,7 +546,8 @@ specifically ignores any arguments given to zero, and returns success. .Sh SETUP FUNCTIONS Although nodes can be added to the SYSCTL tree at any time, in order to -add nodes during the kernel bootstrap phase, a proper +add nodes during the kernel bootstrap phase (and during loadable module +initialization), a proper .Dq setup function must be used. Setup functions are declared using the @@ -565,11 +566,11 @@ The address of the function is added to traverses during initialization. For loadable kernel modules (see .Xr module 9 ) , -the list of functions is called from the module loader after the module's +the list of functions is called from the module loader before the module's initialization routine. Any sysctl nodes created for the loadable module are removed using .Fn sysctl_teardown -before calling the module's termination code. +after calling the module's termination code. .Pp Setup functions do not have to add nodes to the main tree, but can set up their own trees for emulation or other purposes.
CVS commit: src/share/man/man9
Module Name:src Committed By: pgoyette Date: Wed Sep 7 01:18:33 UTC 2022 Modified Files: src/share/man/man9: sysctl.9 Log Message: Update to match recent changes in implementation. To generate a diff of this commit: cvs rdiff -u -r1.23 -r1.24 src/share/man/man9/sysctl.9 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/share/man/man9
Module Name:src Committed By: wiz Date: Mon Sep 5 16:42:59 UTC 2022 Modified Files: src/share/man/man9: pktqueue.9 Log Message: Fix logic error in pktq_set_maxlen() description. Ok thorpej@ To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/share/man/man9/pktqueue.9 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/share/man/man9/pktqueue.9 diff -u src/share/man/man9/pktqueue.9:1.2 src/share/man/man9/pktqueue.9:1.3 --- src/share/man/man9/pktqueue.9:1.2 Mon Sep 5 09:18:39 2022 +++ src/share/man/man9/pktqueue.9 Mon Sep 5 16:42:59 2022 @@ -1,4 +1,4 @@ -.\" $NetBSD: pktqueue.9,v 1.2 2022/09/05 09:18:39 wiz Exp $ +.\" $NetBSD: pktqueue.9,v 1.3 2022/09/05 16:42:59 wiz Exp $ .\" .\" Copyright (c) 2022 The NetBSD Foundation, Inc. .\" All rights reserved. @@ -138,7 +138,7 @@ Sets the maximum queue length to the val .Fa maxlen . If the new value of .Fa maxlen -is greater than the previous value, then this routine may block until +is smaller than the previous value, then this routine may block until all packets that were previously in the packet queue can be re-enqueued. .It Fn pktq_rps_hash "funcp" "m" Calculates the RPS hash for the packet
CVS commit: src/share/man/man9
Module Name:src Committed By: wiz Date: Mon Sep 5 16:42:59 UTC 2022 Modified Files: src/share/man/man9: pktqueue.9 Log Message: Fix logic error in pktq_set_maxlen() description. Ok thorpej@ To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/share/man/man9/pktqueue.9 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/share/man/man9
Module Name:src Committed By: wiz Date: Mon Sep 5 09:18:39 UTC 2022 Modified Files: src/share/man/man9: pktqueue.9 Log Message: pkgqueue(9): fix some nits, remove trailing whitespace To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/share/man/man9/pktqueue.9 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/share/man/man9/pktqueue.9 diff -u src/share/man/man9/pktqueue.9:1.1 src/share/man/man9/pktqueue.9:1.2 --- src/share/man/man9/pktqueue.9:1.1 Sun Sep 4 21:37:50 2022 +++ src/share/man/man9/pktqueue.9 Mon Sep 5 09:18:39 2022 @@ -1,4 +1,4 @@ -.\" $NetBSD: pktqueue.9,v 1.1 2022/09/04 21:37:50 thorpej Exp $ +.\" $NetBSD: pktqueue.9,v 1.2 2022/09/05 09:18:39 wiz Exp $ .\" .\" Copyright (c) 2022 The NetBSD Foundation, Inc. .\" All rights reserved. @@ -28,7 +28,7 @@ .\" POSSIBILITY OF SUCH DAMAGE. .\" .Dd September 3, 2022 -.Dt pktqueue 9 +.Dt PKTQUEUE 9 .Os .Sh NAME .Nm pktqueue , @@ -42,7 +42,7 @@ .Nm pktq_set_maxlen , .Nm pktq_rps_hash , .Nm pktq_sysctl_setup , -.Nm sysctl_pktq_rps_hash_handler , +.Nm sysctl_pktq_rps_hash_handler .Nd Lockless network protocol input queues with integrated ISR scheduling .Sh SYNOPSIS .In net/pktqueue.h @@ -96,7 +96,7 @@ will be established at .Dv SOFTINT_NET . .It Fn pktq_destroy "pq" Destroy the specified packet queue. -The caller is reponsible for ensuring that no packets remain in the queue +The caller is responsible for ensuring that no packets remain in the queue prior to calling this function. .It Fn pktq_enqueue "pq" "m" "hash" Enqueue the packet @@ -127,7 +127,7 @@ It performs a operation on all packet queues. .It Fn pktq_flush "pq" This function removes and frees all packets in the specified queue. -The caller is reponsible for ensuring that no calls to +The caller is responsible for ensuring that no calls to .Fn pktq_enqueue or .Fn pktq_dequeue @@ -204,8 +204,8 @@ cast to .Pc . .El .Sh CODE REFERENCES -The -.Nm +The +.Nm interface is implemented within the file .Pa net/pktqueue.c . .Pp @@ -247,13 +247,13 @@ may result in re-ordering the delivery o the queue. .\" .Sh EXAMPLES .Sh SEE ALSO +.Xr sysctl 8 , .Xr kpreempt 9 , .Xr pcq 9 , .Xr softintr 9 , -.Xr sysctl 8 , .Xr sysctl 9 .Sh HISTORY -The -.Nm +The +.Nm interface first appeared in .Nx 7.0 .
CVS commit: src/share/man/man9
Module Name:src Committed By: wiz Date: Mon Sep 5 09:18:39 UTC 2022 Modified Files: src/share/man/man9: pktqueue.9 Log Message: pkgqueue(9): fix some nits, remove trailing whitespace To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/share/man/man9/pktqueue.9 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/share/man/man9
Module Name:src Committed By: riastradh Date: Sat Aug 20 23:50:41 UTC 2022 Modified Files: src/share/man/man9: usbnet.9 Log Message: usbnet(9): Clarify how mii functions are used. To generate a diff of this commit: cvs rdiff -u -r1.19 -r1.20 src/share/man/man9/usbnet.9 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/share/man/man9/usbnet.9 diff -u src/share/man/man9/usbnet.9:1.19 src/share/man/man9/usbnet.9:1.20 --- src/share/man/man9/usbnet.9:1.19 Sat Aug 20 14:08:59 2022 +++ src/share/man/man9/usbnet.9 Sat Aug 20 23:50:41 2022 @@ -1,4 +1,4 @@ -.\" $NetBSD: usbnet.9,v 1.19 2022/08/20 14:08:59 riastradh Exp $ +.\" $NetBSD: usbnet.9,v 1.20 2022/08/20 23:50:41 riastradh Exp $ .\" .\" Copyright (c) 2019 Matthew R. Green .\" All rights reserved. @@ -403,29 +403,29 @@ when bringing the interface up. .It Ft int Fn (*uno_read_reg) "struct usbnet *un" "int phy" "int reg" "uint16_t *val" Read MII register. Required with MII. -Serialized with other MII functions, and with +Serialized with other MII functions, and only called after .Dq uno_init -and +and before .Dq uno_stop . .It Ft int Fn (*uno_write_reg) "struct usbnet *un" "int phy" "int reg" "uint16_t val" Write MII register. Required with MII. -Serialized with other MII functions, and with +Serialized with other MII functions, and only called after .Dq uno_init -and +and before .Dq uno_stop . .It Ft usbd_status Fn (*uno_statchg) "struct ifnet *ifp" Handle MII status change. Required with MII. -Serialized with other MII functions, and with +Serialized with other MII functions, and only called after .Dq uno_init -and +and before .Dq uno_stop . .It Ft unsigned Fn (*uno_tx_prepare) "struct usbnet *un" "struct mbuf *m" "struct usbnet_chain *c" Prepare an mbuf for transmit. Required. Called sequentially between, and not during, -.Dq uno_init . +.Dq uno_init and .Dq uno_stop . .It Ft void Fn (*uno_rx_loop) "struct usbnet *un" "struct usbnet_chain *c" "uint32_t total_len"
CVS commit: src/share/man/man9
Module Name:src Committed By: riastradh Date: Sat Aug 20 23:50:41 UTC 2022 Modified Files: src/share/man/man9: usbnet.9 Log Message: usbnet(9): Clarify how mii functions are used. To generate a diff of this commit: cvs rdiff -u -r1.19 -r1.20 src/share/man/man9/usbnet.9 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/share/man/man9
Module Name:src Committed By: riastradh Date: Sat Aug 20 14:17:36 UTC 2022 Modified Files: src/share/man/man9: mutex.9 Log Message: mutex(9): Note counterintuitive IPL change releasing spin locks. No functional change -- documentation only. Details: https://mail-index.netbsd.org/tech-kern/2010/11/12/msg009203.html To generate a diff of this commit: cvs rdiff -u -r1.31 -r1.32 src/share/man/man9/mutex.9 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/share/man/man9/mutex.9 diff -u src/share/man/man9/mutex.9:1.31 src/share/man/man9/mutex.9:1.32 --- src/share/man/man9/mutex.9:1.31 Sat Dec 9 16:00:19 2017 +++ src/share/man/man9/mutex.9 Sat Aug 20 14:17:36 2022 @@ -1,4 +1,4 @@ -.\" $NetBSD: mutex.9,v 1.31 2017/12/09 16:00:19 wiz Exp $ +.\" $NetBSD: mutex.9,v 1.32 2022/08/20 14:17:36 riastradh Exp $ .\" .\" Copyright (c) 2007, 2009 The NetBSD Foundation, Inc. .\" All rights reserved. @@ -141,6 +141,19 @@ try to acquire adaptive mutexes or other .Pp A processor will always busy-wait when attempting to acquire a spin mutex that is already held. +.Pp +.Sy Note : +Releasing a spin mutex may not lower the IPL to what it was when +entered. +If other spin mutexes are held, the IPL will not be lowered until the +last one is released. +.Pp +This is usually not a problem because spin mutexes should held only for +very short durations anyway, so blocking higher-priority interrupts a +little longer doesn't hurt much. +But it interferes with writing assertions that the IPL is +.Em no higher than +a specified level. .El .Pp See
CVS commit: src/share/man/man9
Module Name:src Committed By: riastradh Date: Sat Aug 20 14:17:36 UTC 2022 Modified Files: src/share/man/man9: mutex.9 Log Message: mutex(9): Note counterintuitive IPL change releasing spin locks. No functional change -- documentation only. Details: https://mail-index.netbsd.org/tech-kern/2010/11/12/msg009203.html To generate a diff of this commit: cvs rdiff -u -r1.31 -r1.32 src/share/man/man9/mutex.9 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/share/man/man9
Module Name:src Committed By: skrll Date: Sun Aug 14 19:12:23 UTC 2022 Modified Files: src/share/man/man9: usbdi.9 Log Message: usbd_do_request_async got deleted back in 2013 so remove the commented out reference to it here. To generate a diff of this commit: cvs rdiff -u -r1.36 -r1.37 src/share/man/man9/usbdi.9 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/share/man/man9/usbdi.9 diff -u src/share/man/man9/usbdi.9:1.36 src/share/man/man9/usbdi.9:1.37 --- src/share/man/man9/usbdi.9:1.36 Sat Dec 11 19:24:19 2021 +++ src/share/man/man9/usbdi.9 Sun Aug 14 19:12:23 2022 @@ -1,4 +1,4 @@ -.\" $NetBSD: usbdi.9,v 1.36 2021/12/11 19:24:19 mrg Exp $ +.\" $NetBSD: usbdi.9,v 1.37 2022/08/14 19:12:23 skrll Exp $ .\" .\" Copyright (c) 2012 Matthew R. Green .\" All rights reserved. @@ -133,7 +133,6 @@ .Fn usbd_do_request_flags "struct usbd_device *dev" \ "usb_device_request_t *req" "void *data" "uint16_t flags" "int *actlen" \ "uint32_t timo" -.\" usbd_do_request_async() not used outside of usbdi* .Ft usb_interface_descriptor_t * .Fn usbd_get_interface_descriptor "struct usbd_interface *iface" .Ft usb_config_descriptor_t *
CVS commit: src/share/man/man9
Module Name:src Committed By: skrll Date: Sun Aug 14 19:12:23 UTC 2022 Modified Files: src/share/man/man9: usbdi.9 Log Message: usbd_do_request_async got deleted back in 2013 so remove the commented out reference to it here. To generate a diff of this commit: cvs rdiff -u -r1.36 -r1.37 src/share/man/man9/usbdi.9 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/share/man/man9
Module Name:src Committed By: wiz Date: Sat Aug 13 17:06:55 UTC 2022 Modified Files: src/share/man/man9: bus_space.9 Log Message: Remove Li without effect. To generate a diff of this commit: cvs rdiff -u -r1.54 -r1.55 src/share/man/man9/bus_space.9 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/share/man/man9/bus_space.9 diff -u src/share/man/man9/bus_space.9:1.54 src/share/man/man9/bus_space.9:1.55 --- src/share/man/man9/bus_space.9:1.54 Fri Aug 12 13:24:37 2022 +++ src/share/man/man9/bus_space.9 Sat Aug 13 17:06:55 2022 @@ -1,4 +1,4 @@ -.\" $NetBSD: bus_space.9,v 1.54 2022/08/12 13:24:37 riastradh Exp $ +.\" $NetBSD: bus_space.9,v 1.55 2022/08/13 17:06:55 wiz Exp $ .\" .\" Copyright (c) 1997 The NetBSD Foundation, Inc. .\" All rights reserved. @@ -1369,7 +1369,7 @@ This functions similarly to but additionally orders bus space I/O which .Xr membar_ops 3 may not. -.It Dv "BUS_SPACE_BARRIER_READ" Li "|" Dv "BUS_SPACE_BARRIER_WRITE" +.It Dv "BUS_SPACE_BARRIER_READ" | Dv "BUS_SPACE_BARRIER_WRITE" Guarantee that any program-prior bus space read, bus space write, or memory access via .Fn bus_space_vaddr
CVS commit: src/share/man/man9
Module Name:src Committed By: wiz Date: Sat Aug 13 17:06:55 UTC 2022 Modified Files: src/share/man/man9: bus_space.9 Log Message: Remove Li without effect. To generate a diff of this commit: cvs rdiff -u -r1.54 -r1.55 src/share/man/man9/bus_space.9 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/share/man/man9
Module Name:src Committed By: riastradh Date: Fri Aug 12 15:30:41 UTC 2022 Modified Files: src/share/man/man9: usbnet.9 Log Message: usbnet(9): Tidy up language about init/rx/tx/stop in man page. To generate a diff of this commit: cvs rdiff -u -r1.17 -r1.18 src/share/man/man9/usbnet.9 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/share/man/man9/usbnet.9 diff -u src/share/man/man9/usbnet.9:1.17 src/share/man/man9/usbnet.9:1.18 --- src/share/man/man9/usbnet.9:1.17 Sat Mar 5 06:55:58 2022 +++ src/share/man/man9/usbnet.9 Fri Aug 12 15:30:41 2022 @@ -1,4 +1,4 @@ -.\" $NetBSD: usbnet.9,v 1.17 2022/03/05 06:55:58 riastradh Exp $ +.\" $NetBSD: usbnet.9,v 1.18 2022/08/12 15:30:41 riastradh Exp $ .\" .\" Copyright (c) 2019 Matthew R. Green .\" All rights reserved. @@ -503,7 +503,7 @@ and must be set before calling .Fn usbnet_attach_ifp . .Sh RECEIVE AND SEND -Receive and send routines are structured around a the +Receive and send routines are structured around the .Va usbnet_cdata and .Va usbnet_chain @@ -513,11 +513,11 @@ structures, the and .Dv un_tx_xfer_flags members, and the -.Fn uno_stop , .Fn uno_init , .Fn uno_tx_prepare , +.Fn uno_rx_loop , and -.Fn uno_rx_loop +.Fn uno_stop callbacks of .Va usbnet_ops . .Pp @@ -535,19 +535,12 @@ array entries filled in, and optionally .Dv USBNET_ENDPT_INTR entry filled in if applicable. .Pp -The optional -.Fn uno_stop -callback performs device-specific operations to shutdown the -transmit or receive handling. -.Pp The .Fn uno_init -callback both performs device-specific enablement and then calls -.Fn usbnet_rx_tx_init , -which sets up the receive, transmit, and, optionally, the interrupt -pipes, as well as starting the receive pipes. -All USB transfer setup is handled internally to the framework, and -the driver callbacks merely copy data in or out of a chain entry using +callback enables the hardware, and if necessary reprograms the hardware +multicast filter, before the framework initiates USB Tx/Rx transfers. +All USB transfer setup is handled by the framework. +The driver callbacks merely copy data in or out of a chain entry using what is typically a device-specific method. .Pp The @@ -560,8 +553,7 @@ enqueued with the higher layers using ei (for most devices) or .Fn usbnet_input for devices that use -.Fn if_input -. +.Fn if_input . (This currently relies upon the .Va struct ifnet having the @@ -593,6 +585,11 @@ It also contains pointers back to the ow and the .Va struct usbd_xfer associated with this transfer. +.Pp +After aborting all USB Tx/Rx transfers when bringing an interface down, +the framework calls the optional +.Fn uno_stop +callback to disable the hardware. .Sh MII For devices that have MII support these callbacks in .Fa struct usbnet_ops
CVS commit: src/share/man/man9
Module Name:src Committed By: riastradh Date: Fri Aug 12 15:30:41 UTC 2022 Modified Files: src/share/man/man9: usbnet.9 Log Message: usbnet(9): Tidy up language about init/rx/tx/stop in man page. To generate a diff of this commit: cvs rdiff -u -r1.17 -r1.18 src/share/man/man9/usbnet.9 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/share/man/man9
Module Name:src Committed By: riastradh Date: Fri Aug 12 13:24:37 UTC 2022 Modified Files: src/share/man/man9: bus_space.9 Log Message: bus_space(9): Update barrier semantics to match reality and sense. As proposed on tech-kern: https://mail-index.netbsd.org/tech-kern/2022/07/16/msg028249.html tl;dr: - bus_space_barrier is needed only with prefetchable/cacheable. - BUS_SPACE_BARRIER_READ is like membar_acquire. - BUS_SPACE_BARRIER_WRITE is like membar_release. - READ|WRITE is like membar_sync. To generate a diff of this commit: cvs rdiff -u -r1.53 -r1.54 src/share/man/man9/bus_space.9 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/share/man/man9/bus_space.9 diff -u src/share/man/man9/bus_space.9:1.53 src/share/man/man9/bus_space.9:1.54 --- src/share/man/man9/bus_space.9:1.53 Mon Nov 13 09:10:37 2017 +++ src/share/man/man9/bus_space.9 Fri Aug 12 13:24:37 2022 @@ -1,4 +1,4 @@ -.\" $NetBSD: bus_space.9,v 1.53 2017/11/13 09:10:37 wiz Exp $ +.\" $NetBSD: bus_space.9,v 1.54 2022/08/12 13:24:37 riastradh Exp $ .\" .\" Copyright (c) 1997 The NetBSD Foundation, Inc. .\" All rights reserved. @@ -27,7 +27,7 @@ .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE .\" POSSIBILITY OF SUCH DAMAGE. .\" -.Dd September 15, 2016 +.Dd August 12, 2022 .Dt BUS_SPACE 9 .Os .Sh NAME @@ -466,49 +466,30 @@ that all of the data being accessed is i handle describes. Trying to access data outside that region is an error. .Pp -Because some architectures' memory systems use buffering to improve -memory and device access performance, there is a mechanism which can be -used to create -.Dq barriers -in the bus space read and write stream. -.Pp -There are two types of barriers: ordering barriers and completion -barriers. -.Pp -Ordering barriers prevent some operations from bypassing other -operations. -They are relatively light weight and described in terms of the -operations they are intended to order. -The important thing to note is that they create specific ordering -constraint surrounding bus accesses but do not necessarily force any -synchronization themselves. -So, if there is enough distance between the memory operations being -ordered, the preceding ones could complete by themselves resulting -in no performance penalty. -.Pp -For instance, a write before read barrier will force any writes -issued before the barrier instruction to complete before any reads -after the barrier are issued. -This forces processors with write buffers to read data from memory rather -than from the pending write in the write buffer. -.Pp -Ordering barriers are usually sufficient for most circumstances, -and can be combined together. -For instance a read before write barrier can be combined with a write -before write barrier to force all memory operations to complete before -the next write is started. -.Pp -Completion barriers force all memory operations and any pending -exceptions to be completed before any instructions after the -barrier may be issued. -Completion barriers are extremely expensive and almost never required -in device driver code. -A single completion barrier can force the processor to stall on memory -for hundreds of cycles on some machines. -.Pp -Correctly-written drivers will include all appropriate barriers, -and assume only the read/write ordering imposed by the barrier -operations. +Bus space I/O operations on mappings made with +.Dv BUS_SPACE_MAP_PREFETCHABLE +or +.Dv BUS_SPACE_MAP_CACHEABLE +may be reordered or combined for performance on devices that support +it, such as write-combining +.Pq "a.k.a." Sq prefetchable +graphics framebuffers or cacheable ROM images. +The +.Fn bus_space_barrier +function orders reads and writes in prefetchable or cacheable mappings +relative to other reads and writes in bus spaces. +Barriers are needed +.Em only +when prefetchable or cacheable mappings are involved: +.Bl -bullet +.It +Bus space reads and writes on non-prefetchable, non-cacheable mappings +at a single device are totally ordered with one another. +.It +Ordering of memory operations on normal memory with bus space I/O +for triggering DMA or being notified of DMA completion requires +.Xr bus_dmamap_sync 9 . +.El .Pp People trying to write portable drivers with the .Nm @@ -1185,9 +1166,9 @@ be read, on others it may cause a system .Pp Read operations done by the .Fn bus_space_read_N -functions may be executed out -of order with respect to other pending read and write operations unless -order is enforced by use of the +functions may be executed out of order with respect to other read and +write operations if either are on prefetchable or cacheable mappings +unless order is enforced by use of the .Fn bus_space_barrier function. .Pp @@ -1223,8 +1204,8 @@ to be written, on others it may cause a .Pp Write operations done by the .Fn bus_space_write_N -functions may be
CVS commit: src/share/man/man9
Module Name:src Committed By: riastradh Date: Fri Aug 12 13:24:37 UTC 2022 Modified Files: src/share/man/man9: bus_space.9 Log Message: bus_space(9): Update barrier semantics to match reality and sense. As proposed on tech-kern: https://mail-index.netbsd.org/tech-kern/2022/07/16/msg028249.html tl;dr: - bus_space_barrier is needed only with prefetchable/cacheable. - BUS_SPACE_BARRIER_READ is like membar_acquire. - BUS_SPACE_BARRIER_WRITE is like membar_release. - READ|WRITE is like membar_sync. To generate a diff of this commit: cvs rdiff -u -r1.53 -r1.54 src/share/man/man9/bus_space.9 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/share/man/man9
Module Name:src Committed By: andvar Date: Thu Jul 7 20:22:03 UTC 2022 Modified Files: src/share/man/man9: ioctl.9 Log Message: fix reference to magma(4) by pointing to sparc/magma 4 and update the date. To generate a diff of this commit: cvs rdiff -u -r1.35 -r1.36 src/share/man/man9/ioctl.9 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/share/man/man9/ioctl.9 diff -u src/share/man/man9/ioctl.9:1.35 src/share/man/man9/ioctl.9:1.36 --- src/share/man/man9/ioctl.9:1.35 Thu Jul 7 20:07:47 2022 +++ src/share/man/man9/ioctl.9 Thu Jul 7 20:22:03 2022 @@ -1,4 +1,4 @@ -.\" $NetBSD: ioctl.9,v 1.35 2022/07/07 20:07:47 andvar Exp $ +.\" $NetBSD: ioctl.9,v 1.36 2022/07/07 20:22:03 andvar Exp $ .\" .\" Copyright (c) 1999 The NetBSD Foundation, Inc. .\" All rights reserved. @@ -27,7 +27,7 @@ .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE .\" POSSIBILITY OF SUCH DAMAGE. .\" -.Dd January 27, 2019 +.Dd July 7, 2022 .Dt IOCTL 9 .Os .Sh NAME @@ -164,7 +164,7 @@ pci(4) .It 'P' compat/ossaudio and soundcard.h .It 'P' -.Xr magma 4 +.Xr sparc/magma 4 bpp (sparc) .It 'q' .Xr altq 9
CVS commit: src/share/man/man9
Module Name:src Committed By: andvar Date: Thu Jul 7 20:22:03 UTC 2022 Modified Files: src/share/man/man9: ioctl.9 Log Message: fix reference to magma(4) by pointing to sparc/magma 4 and update the date. To generate a diff of this commit: cvs rdiff -u -r1.35 -r1.36 src/share/man/man9/ioctl.9 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/share/man/man9
Module Name:src Committed By: andvar Date: Thu Jul 7 20:07:47 UTC 2022 Modified Files: src/share/man/man9: ioctl.9 Log Message: remove reference to tb(4), which was removed back in 2005. To generate a diff of this commit: cvs rdiff -u -r1.34 -r1.35 src/share/man/man9/ioctl.9 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/share/man/man9/ioctl.9 diff -u src/share/man/man9/ioctl.9:1.34 src/share/man/man9/ioctl.9:1.35 --- src/share/man/man9/ioctl.9:1.34 Sun Jan 27 08:53:29 2019 +++ src/share/man/man9/ioctl.9 Thu Jul 7 20:07:47 2022 @@ -1,4 +1,4 @@ -.\" $NetBSD: ioctl.9,v 1.34 2019/01/27 08:53:29 maxv Exp $ +.\" $NetBSD: ioctl.9,v 1.35 2022/07/07 20:07:47 andvar Exp $ .\" .\" Copyright (c) 1999 The NetBSD Foundation, Inc. .\" All rights reserved. @@ -86,8 +86,6 @@ ADB devices (mac68k, macppc) .It 'A' .Xr audio 4 .It 'b' -.Xr \ 4 -.It 'b' Bluetooth HCI sockets, see .Xr bluetooth 4 .It 'b'
CVS commit: src/share/man/man9
Module Name:src Committed By: andvar Date: Thu Jul 7 20:07:47 UTC 2022 Modified Files: src/share/man/man9: ioctl.9 Log Message: remove reference to tb(4), which was removed back in 2005. To generate a diff of this commit: cvs rdiff -u -r1.34 -r1.35 src/share/man/man9/ioctl.9 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/share/man/man9
Module Name:src Committed By: rillig Date: Thu May 26 14:39:30 UTC 2022 Modified Files: src/share/man/man9: altq.9 Log Message: altq.9: remove CONSTCOND comment from example code Since 2021-01-31, lint no longer needs CONSTCOND in a do-while loop. To generate a diff of this commit: cvs rdiff -u -r1.17 -r1.18 src/share/man/man9/altq.9 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/share/man/man9
Module Name:src Committed By: rillig Date: Thu May 26 14:39:30 UTC 2022 Modified Files: src/share/man/man9: altq.9 Log Message: altq.9: remove CONSTCOND comment from example code Since 2021-01-31, lint no longer needs CONSTCOND in a do-while loop. To generate a diff of this commit: cvs rdiff -u -r1.17 -r1.18 src/share/man/man9/altq.9 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/share/man/man9/altq.9 diff -u src/share/man/man9/altq.9:1.17 src/share/man/man9/altq.9:1.18 --- src/share/man/man9/altq.9:1.17 Wed Mar 21 10:21:17 2018 +++ src/share/man/man9/altq.9 Thu May 26 14:39:30 2022 @@ -1,4 +1,4 @@ -.\" $NetBSD: altq.9,v 1.17 2018/03/21 10:21:17 wiz Exp $ +.\" $NetBSD: altq.9,v 1.18 2022/05/26 14:39:30 rillig Exp $ .\" $OpenBSD: altq.9,v 1.4 2001/07/12 12:41:42 itojun Exp $ .\" .\" Copyright (C) 2001 @@ -25,7 +25,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd March 20, 2018 +.Dd May 26, 2022 .Dt ALTQ 9 .Os .\" @@ -228,7 +228,7 @@ do { } \e if ((err))\e (ifq)->ifq_drops++; \e -} while (/*CONSTCOND*/ 0) +} while (false) .Ed .Pp .Fn IFQ_ENQUEUE
CVS commit: src/share/man/man9
Module Name:src Committed By: riastradh Date: Sun May 22 11:40:46 UTC 2022 Modified Files: src/share/man/man9: opencrypto.9 Log Message: opencrypto: Touch up man page a little. To generate a diff of this commit: cvs rdiff -u -r1.22 -r1.23 src/share/man/man9/opencrypto.9 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/share/man/man9/opencrypto.9 diff -u src/share/man/man9/opencrypto.9:1.22 src/share/man/man9/opencrypto.9:1.23 --- src/share/man/man9/opencrypto.9:1.22 Sun May 22 11:40:29 2022 +++ src/share/man/man9/opencrypto.9 Sun May 22 11:40:46 2022 @@ -1,5 +1,5 @@ .\" $OpenBSD: crypto.9,v 1.25 2003/07/11 13:47:41 jmc Exp $ -.\" $NetBSD: opencrypto.9,v 1.22 2022/05/22 11:40:29 riastradh Exp $ +.\" $NetBSD: opencrypto.9,v 1.23 2022/05/22 11:40:46 riastradh Exp $ .\" .\" The author of this man page is Angelos D. Keromytis (ange...@cis.upenn.edu) .\" @@ -276,15 +276,12 @@ buffer for the result (or for re-formatt .It Fa crp_callback This routine is invoked upon completion of the request, whether successful or not. -It is invoked through the +It is invoked by the driver through the .Fn crypto_done routine. If the request was not successful, an error code is set in the .Fa crp_etype field. -It is the responsibility of the callback routine to set the appropriate -.Xr spl 9 -level. .It Fa crp_etype Contains the error type, if any errors were encountered, or zero if the request was successfully processed. @@ -710,13 +707,3 @@ supported. Note that 3DES is considered one algorithm (and not three instances of DES). Thus, 3DES and DES could be mixed in the same request. -.Pp -A queue for completed operations should be implemented and processed -at some software -.Xr spl 9 -level, to avoid overall system latency issues, and potential kernel -stack exhaustion while processing a callback. -.Pp -When SMP time comes, we will support use of a second processor (or -more) as a crypto device (this is actually AMP, but we need the same -basic support).
CVS commit: src/share/man/man9
Module Name:src Committed By: riastradh Date: Sun May 22 11:40:46 UTC 2022 Modified Files: src/share/man/man9: opencrypto.9 Log Message: opencrypto: Touch up man page a little. To generate a diff of this commit: cvs rdiff -u -r1.22 -r1.23 src/share/man/man9/opencrypto.9 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/share/man/man9
Module Name:src Committed By: riastradh Date: Tue May 17 15:00:05 UTC 2022 Modified Files: src/share/man/man9: cprng.9 Log Message: cprng(9): Note ipl must be at most IPL_SOFTSERIAL now. To generate a diff of this commit: cvs rdiff -u -r1.15 -r1.16 src/share/man/man9/cprng.9 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/share/man/man9
Module Name:src Committed By: riastradh Date: Tue May 17 15:00:05 UTC 2022 Modified Files: src/share/man/man9: cprng.9 Log Message: cprng(9): Note ipl must be at most IPL_SOFTSERIAL now. To generate a diff of this commit: cvs rdiff -u -r1.15 -r1.16 src/share/man/man9/cprng.9 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/share/man/man9/cprng.9 diff -u src/share/man/man9/cprng.9:1.15 src/share/man/man9/cprng.9:1.16 --- src/share/man/man9/cprng.9:1.15 Wed Mar 16 23:56:33 2022 +++ src/share/man/man9/cprng.9 Tue May 17 15:00:05 2022 @@ -1,4 +1,4 @@ -.\" $NetBSD: cprng.9,v 1.15 2022/03/16 23:56:33 riastradh Exp $ +.\" $NetBSD: cprng.9,v 1.16 2022/05/17 15:00:05 riastradh Exp $ .\" .\" Copyright (c) 2011-2015 The NetBSD Foundation, Inc. .\" All rights reserved. @@ -131,7 +131,7 @@ argument specifies the interrupt priorit will serialize access to the new instance of the generator (see .Xr spl 9 ) , and must be no higher than -.Dv IPL_VM . +.Dv IPL_SOFTSERIAL . .Pp The .Fa flags
CVS commit: src/share/man/man9
Module Name:src Committed By: riastradh Date: Tue May 17 01:39:57 UTC 2022 Modified Files: src/share/man/man9: rnd.9 Log Message: rnd(9): Note that rndsource callbacks are never run in hardint. But they may be run in softint at IPL_SOFTSERIAL. To generate a diff of this commit: cvs rdiff -u -r1.30 -r1.31 src/share/man/man9/rnd.9 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/share/man/man9
Module Name:src Committed By: riastradh Date: Tue May 17 01:39:57 UTC 2022 Modified Files: src/share/man/man9: rnd.9 Log Message: rnd(9): Note that rndsource callbacks are never run in hardint. But they may be run in softint at IPL_SOFTSERIAL. To generate a diff of this commit: cvs rdiff -u -r1.30 -r1.31 src/share/man/man9/rnd.9 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/share/man/man9/rnd.9 diff -u src/share/man/man9/rnd.9:1.30 src/share/man/man9/rnd.9:1.31 --- src/share/man/man9/rnd.9:1.30 Sat Mar 19 11:54:53 2022 +++ src/share/man/man9/rnd.9 Tue May 17 01:39:57 2022 @@ -1,4 +1,4 @@ -.\" $NetBSD: rnd.9,v 1.30 2022/03/19 11:54:53 riastradh Exp $ +.\" $NetBSD: rnd.9,v 1.31 2022/05/17 01:39:57 riastradh Exp $ .\" .\" Copyright (c) 1997 The NetBSD Foundation, Inc. .\" All rights reserved. @@ -171,6 +171,17 @@ issues calls to each source's .Fa callback in serial \(em it never issues two calls to the same source's callback at the same time in two differen threads or on two different CPUs. +.Pp +The callback may be invoked in thread context or soft interrupt +context, up to +.Dv SOFTINT_SERIAL , +and as such must follow the rules of soft interrupt handlers in +.Xr softint 9 +\(em that is, the callback must never sleep, except on adaptive +.Xr mutex 9 +locks at +.Dv IPL_SOFTSERIAL . +The callback will never be called in hard interrupt context. .It Fn rnd_attach_source "rnd_source" "devname" "type" "flags" Makes .Fa rnd_source
CVS commit: src/share/man/man9
Module Name:src Committed By: christos Date: Sun Mar 27 16:36:12 UTC 2022 Modified Files: src/share/man/man9: secmodel_extensions.9 Log Message: Describe the hardlink restrictions. To generate a diff of this commit: cvs rdiff -u -r1.6 -r1.7 src/share/man/man9/secmodel_extensions.9 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/share/man/man9/secmodel_extensions.9 diff -u src/share/man/man9/secmodel_extensions.9:1.6 src/share/man/man9/secmodel_extensions.9:1.7 --- src/share/man/man9/secmodel_extensions.9:1.6 Mon Jan 20 08:08:40 2020 +++ src/share/man/man9/secmodel_extensions.9 Sun Mar 27 12:36:11 2022 @@ -1,4 +1,4 @@ -.\" $NetBSD: secmodel_extensions.9,v 1.6 2020/01/20 13:08:40 nia Exp $ +.\" $NetBSD: secmodel_extensions.9,v 1.7 2022/03/27 16:36:11 christos Exp $ .\" .\" Copyright (c) 2011 The NetBSD Foundation, Inc. .\" All rights reserved. @@ -27,7 +27,7 @@ .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE .\" POSSIBILITY OF SUCH DAMAGE. .\" -.Dd November 22, 2012 +.Dd March 27, 2022 .Dt SECMODEL_EXTENSIONS 9 .Os .Sh NAME @@ -106,6 +106,26 @@ It can be disabled at any time, but cann anymore when the .Em securelevel of the system is above 0. +.Sh Hardlink restrictions +Prevent hardlinks to files that the user does not own or has group access +to. +.Pp +To enable user ownership checks, set the +.Xr sysctl 7 +variable +.Pa security.models.extensions.hardlink_check_uid +to a non-zero value. +.Pp +To enable group membership checks, set the +.Xr sysctl 7 +variable +.Pa security.models.extensions.hardlink_check_gid +to a non-zero value. +.Pp +These variables can be enabled anytime, but cannot be disabled +anymore when the +.Em securelevel +of the system is above 0. .Sh SEE ALSO .Xr affinity 3 , .Xr sched 3 ,
CVS commit: src/share/man/man9
Module Name:src Committed By: christos Date: Sun Mar 27 16:36:12 UTC 2022 Modified Files: src/share/man/man9: secmodel_extensions.9 Log Message: Describe the hardlink restrictions. To generate a diff of this commit: cvs rdiff -u -r1.6 -r1.7 src/share/man/man9/secmodel_extensions.9 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/share/man/man9
Module Name:src Committed By: riastradh Date: Sat Mar 19 11:54:53 UTC 2022 Modified Files: src/share/man/man9: rnd.9 Log Message: rnd(9): Document the serial use of rndsource callbacks. This simplifies the rndsource API -- no need to lock, unless you're also coordinating with other driver logic like concurrent opencrypto(4) requests that share device requests. To generate a diff of this commit: cvs rdiff -u -r1.29 -r1.30 src/share/man/man9/rnd.9 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/share/man/man9/rnd.9 diff -u src/share/man/man9/rnd.9:1.29 src/share/man/man9/rnd.9:1.30 --- src/share/man/man9/rnd.9:1.29 Mon May 4 15:13:45 2020 +++ src/share/man/man9/rnd.9 Sat Mar 19 11:54:53 2022 @@ -1,4 +1,4 @@ -.\" $NetBSD: rnd.9,v 1.29 2020/05/04 15:13:45 wiz Exp $ +.\" $NetBSD: rnd.9,v 1.30 2022/03/19 11:54:53 riastradh Exp $ .\" .\" Copyright (c) 1997 The NetBSD Foundation, Inc. .\" All rights reserved. @@ -165,6 +165,12 @@ not or .Fn rnd_add_uint32 . .El +.Pp +.Nm +issues calls to each source's +.Fa callback +in serial \(em it never issues two calls to the same source's callback +at the same time in two differen threads or on two different CPUs. .It Fn rnd_attach_source "rnd_source" "devname" "type" "flags" Makes .Fa rnd_source
CVS commit: src/share/man/man9
Module Name:src Committed By: riastradh Date: Sat Mar 19 11:54:53 UTC 2022 Modified Files: src/share/man/man9: rnd.9 Log Message: rnd(9): Document the serial use of rndsource callbacks. This simplifies the rndsource API -- no need to lock, unless you're also coordinating with other driver logic like concurrent opencrypto(4) requests that share device requests. To generate a diff of this commit: cvs rdiff -u -r1.29 -r1.30 src/share/man/man9/rnd.9 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/share/man/man9
Module Name:src Committed By: riastradh Date: Sat Mar 5 06:55:58 UTC 2022 Modified Files: src/share/man/man9: usbnet.9 Log Message: usbnet(9): Clarify uno_stop contract in man page. To generate a diff of this commit: cvs rdiff -u -r1.16 -r1.17 src/share/man/man9/usbnet.9 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/share/man/man9
Module Name:src Committed By: riastradh Date: Sat Mar 5 06:55:58 UTC 2022 Modified Files: src/share/man/man9: usbnet.9 Log Message: usbnet(9): Clarify uno_stop contract in man page. To generate a diff of this commit: cvs rdiff -u -r1.16 -r1.17 src/share/man/man9/usbnet.9 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/share/man/man9/usbnet.9 diff -u src/share/man/man9/usbnet.9:1.16 src/share/man/man9/usbnet.9:1.17 --- src/share/man/man9/usbnet.9:1.16 Sat Mar 5 06:55:49 2022 +++ src/share/man/man9/usbnet.9 Sat Mar 5 06:55:58 2022 @@ -1,4 +1,4 @@ -.\" $NetBSD: usbnet.9,v 1.16 2022/03/05 06:55:49 riastradh Exp $ +.\" $NetBSD: usbnet.9,v 1.17 2022/03/05 06:55:58 riastradh Exp $ .\" .\" Copyright (c) 2019 Matthew R. Green .\" All rights reserved. @@ -355,7 +355,8 @@ Stop hardware activity .Pq optional . Called under .Xr IFNET_LOCK 9 -when bringing the interface down, except when the device is detaching. +when bringing the interface down, but skipped when the device is +detaching. .It Ft int Fn (*uno_ioctl) "struct ifnet *ifp" "u_long cmd" "void *data" Handle driver-specific ioctls .Pq optional .
CVS commit: src/share/man/man9
Module Name:src Committed By: riastradh Date: Thu Mar 3 05:57:05 UTC 2022 Modified Files: src/share/man/man9: usbnet.9 Log Message: usbnet(9): Update man page. To generate a diff of this commit: cvs rdiff -u -r1.14 -r1.15 src/share/man/man9/usbnet.9 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/share/man/man9/usbnet.9 diff -u src/share/man/man9/usbnet.9:1.14 src/share/man/man9/usbnet.9:1.15 --- src/share/man/man9/usbnet.9:1.14 Sat Dec 11 19:24:19 2021 +++ src/share/man/man9/usbnet.9 Thu Mar 3 05:57:05 2022 @@ -1,4 +1,4 @@ -.\" $NetBSD: usbnet.9,v 1.14 2021/12/11 19:24:19 mrg Exp $ +.\" $NetBSD: usbnet.9,v 1.15 2022/03/03 05:57:05 riastradh Exp $ .\" .\" Copyright (c) 2019 Matthew R. Green .\" All rights reserved. @@ -35,8 +35,6 @@ .Ss Functions offered by usbnet.h .Ft void .Fn usbnet_set_link "struct usbnet *un" "bool link" -.Ft void -.Fn usbnet_set_dying "struct usbnet *un" "bool dying" .Ft struct ifnet * .Fn usbnet_ifp "struct usbnet *un" .Ft struct ethercom * @@ -52,55 +50,17 @@ .Ft bool .Fn usbnet_isdying "struct usbnet *un" .Ft void -.Fn usbnet_lock_core "struct usbnet *un" -.Ft void -.Fn usbnet_unlock_core "struct usbnet *un" -.Ft kmutex_t * -.Fn usbnet_mutex_core "struct usbnet *un" -.Ft void -.Fn usbnet_isowned_core "struct usbnet *un" -.Ft void -.Fn usbnet_lock_rx "struct usbnet *un" -.Ft void -.Fn usbnet_unlock_rx "struct usbnet *un" -.Ft kmutex_t * -.Fn usbnet_mutex_rx "struct usbnet *un" -.Ft void -.Fn usbnet_isowned_rx "struct usbnet *un" -.Ft void -.Fn usbnet_lock_tx "struct usbnet *un" -.Ft void -.Fn usbnet_unlock_tx "struct usbnet *un" -.Ft kmutex_t * -.Fn usbnet_mutex_tx "struct usbnet *un" -.Ft void -.Fn usbnet_isowned_tx "struct usbnet *un" -.Ft int -.Fn usbnet_init_rx_tx "struct usbnet *un" "unsigned rxflags" "unsigned txflags" -.Ft int -.Fn usbnet_miibus_readreg "device_t dev" "int phy" "int reg" "uint16_t *val" -.Ft int -.Fn usbnet_miibus_writereg "device_t dev" "int phy" "int reg" "uint16_t val" -.Ft void -.Fn usbnet_miibus_statchg "struct ifnet *" -.Ft void -.Fn usbnet_busy "struct usbnet *un" -.Ft void -.Fn usbnet_unbusy "struct usbnet *un" -.Ft void .Fn usbnet_enqueue "struct usbnet *un" "uint8_t *buf" "size_t buflen" "int csum_flags" "uint32_t csum_data" "int mbuf_flags" .Ft void .Fn usbnet_input "struct usbnet *un" "uint8_t *buf" "size_t buflen" .Ft void -.Fn usbnet_attach "struct usbnet *un" "const char *detname" +.Fn usbnet_attach "struct usbnet *un" .Ft void .Fn usbnet_attach_ifp "struct usbnet *un" "unsigned if_flags" "unsigned if_extflags" "const struct usbnet_mii *unm" .Ft int .Fn usbnet_detach "device_t dev" "int flags" .Ft int .Fn usbnet_activate "device_t dev" "devact_t act" -.Ft void -.Fn usbnet_stop "struct usbnet *un" "struct ifnet *ifp" "int disable" .Sh DESCRIPTION The .Nm @@ -160,42 +120,69 @@ framework itself. The device activate function should be set to .Fn usbnet_activate . .Pp -To manage all Rx and Tx chains the -.Dq uno_init -callback of -.Va struct usbnet_ops -should perform any device specific initialization and then call -.Fn usbnet_init_rx_tx -which will allocate chains, set up and open pipes, and start the -Rx transfers so that packets can arrived. -These allocations and pipes can be closed and destroyed by calling -.Fn usbnet_stop . -Both of -.Fn usbnet_init_rx_tx -and -.Fn usbnet_stop -must be called with the +When bringing an interface up from +.Xr if_init 9 , +which happens under +.Xr IFNET_LOCK 9 , .Nm -lock held, see -.Fn usbnet_lock -and -.Fn usbnet_unlock . +will: +.Bl -enum +.It +call +.Dq uno_init +to initialize the hardware for sending and receiving packets, +.It +open the USB pipes, +.It +allocate Rx and Tx buffers for transfers, +.It +call +.Dq uno_mcast +to initially program the hardware multicast filter, and finally +.It +start the Rx transfers so packets can be received. +.El +.Pp See the .Sx RECEIVE AND SEND section for details on using the chains. .Pp -The interface init, ioctl, start, and stop, routines are handled by the -framework with callbacks for device-specific handling. -For interface init (i.e., when bringing the interface up), the -.Dq uno_init -callback should perform any device specific initialization and then call -.Fn usbnet_init_rx_tx -to finalize Rx and Tx queue initialization. -For interface ioctl, most of the handling is in the framework and the -optional +When bringing an interface down from +.Xr if_stop 9 , +which happens under +.Xr IFNET_LOCK 9 , +.Nm +will: +.Bl -enum +.It +abort the USB pipes, +.It +call +.Dq uno_stop +to stop the hardware from receiving packets (unless the device is +detaching), +.It +free Rx and Tx buffers for transfers, and +.It +close the USB pipes. +.El +.Pp +For interface ioctl, most of the handling is in the framework. +While the interface is running, the optional +.Dq uno_mcast +callback is invoked after handling the +.Dv
CVS commit: src/share/man/man9
Module Name:src Committed By: riastradh Date: Thu Mar 3 05:57:05 UTC 2022 Modified Files: src/share/man/man9: usbnet.9 Log Message: usbnet(9): Update man page. To generate a diff of this commit: cvs rdiff -u -r1.14 -r1.15 src/share/man/man9/usbnet.9 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/share/man/man9
Module Name:src Committed By: wiz Date: Tue Feb 15 22:58:25 UTC 2022 Modified Files: src/share/man/man9: KERNEL_LOCK.9 Log Message: Fix typo, use Nm instead of Xr to itself. To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/share/man/man9/KERNEL_LOCK.9 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/share/man/man9/KERNEL_LOCK.9 diff -u src/share/man/man9/KERNEL_LOCK.9:1.1 src/share/man/man9/KERNEL_LOCK.9:1.2 --- src/share/man/man9/KERNEL_LOCK.9:1.1 Tue Feb 15 22:46:29 2022 +++ src/share/man/man9/KERNEL_LOCK.9 Tue Feb 15 22:58:25 2022 @@ -1,4 +1,4 @@ -.\" $NetBSD: KERNEL_LOCK.9,v 1.1 2022/02/15 22:46:29 riastradh Exp $ +.\" $NetBSD: KERNEL_LOCK.9,v 1.2 2022/02/15 22:58:25 wiz Exp $ .\" .\" Copyright (c) 2022 The NetBSD Foundation, Inc. .\" All rights reserved. @@ -149,7 +149,7 @@ and .Xr mutex_exit 9 can break kernel-locked assumptions. Subsystems need to be consistently converted from -.Xr KERNEL_LOCK 9 +.Nm and .Xr spl 9 to @@ -237,7 +237,7 @@ which mean the same thing. .Sh NOTES Some .Nx -kernel abstractions execute caller-specified funtions with the kernel +kernel abstractions execute caller-specified functions with the kernel lock held by default, for compatibility with legacy code, but can be explicitly instructed .Em not
CVS commit: src/share/man/man9
Module Name:src Committed By: wiz Date: Tue Feb 15 22:58:25 UTC 2022 Modified Files: src/share/man/man9: KERNEL_LOCK.9 Log Message: Fix typo, use Nm instead of Xr to itself. To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/share/man/man9/KERNEL_LOCK.9 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/share/man/man9
Module Name:src Committed By: riastradh Date: Sat Feb 12 01:21:11 UTC 2022 Modified Files: src/share/man/man9: ipi.9 Log Message: ipi(9): Document memory ordering guarantees. To generate a diff of this commit: cvs rdiff -u -r1.5 -r1.6 src/share/man/man9/ipi.9 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/share/man/man9/ipi.9 diff -u src/share/man/man9/ipi.9:1.5 src/share/man/man9/ipi.9:1.6 --- src/share/man/man9/ipi.9:1.5 Wed Sep 2 19:04:05 2020 +++ src/share/man/man9/ipi.9 Sat Feb 12 01:21:11 2022 @@ -1,4 +1,4 @@ -.\" $NetBSD: ipi.9,v 1.5 2020/09/02 19:04:05 riastradh Exp $ +.\" $NetBSD: ipi.9,v 1.6 2022/02/12 01:21:11 riastradh Exp $ .\" .\" Copyright (c) 2014, 2019 The NetBSD Foundation, Inc. .\" All rights reserved. @@ -170,6 +170,23 @@ All synchronous IPI invocations must be function) before the IPI message structure can be destroyed or new cross-call requests can be performed. .\" - +.Sh MEMORY ORDER +All memory operations that happen before triggering an IPI, via +.Fn ipi_trigger , +.Fn ipi_trigger_multi , +.Fn ipi_trigger_broadcast , +.Fn ipi_unicast , +.Fn ipi_multicast , +or +.Fn ipi_broadcast , +also happen before any memory operations in the IPI handler function on +the remote CPU. +.Pp +For synchronous IPIs, all memory operations that happen before the IPI +handler function has returned on the remote CPU also happen before +.Fn ipi_wait +returns on the waiting CPU. +.\" - .Sh NOTES Functions being called must be lightweight. They run at
CVS commit: src/share/man/man9
Module Name:src Committed By: riastradh Date: Sat Feb 12 01:21:11 UTC 2022 Modified Files: src/share/man/man9: ipi.9 Log Message: ipi(9): Document memory ordering guarantees. To generate a diff of this commit: cvs rdiff -u -r1.5 -r1.6 src/share/man/man9/ipi.9 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/share/man/man9
Module Name:src Committed By: riastradh Date: Fri Feb 11 23:19:43 UTC 2022 Modified Files: src/share/man/man9: driver.9 Log Message: driver(9): Correct paragraph about the driver activate function. To generate a diff of this commit: cvs rdiff -u -r1.33 -r1.34 src/share/man/man9/driver.9 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/share/man/man9/driver.9 diff -u src/share/man/man9/driver.9:1.33 src/share/man/man9/driver.9:1.34 --- src/share/man/man9/driver.9:1.33 Fri Feb 11 23:19:34 2022 +++ src/share/man/man9/driver.9 Fri Feb 11 23:19:43 2022 @@ -1,4 +1,4 @@ -.\" $NetBSD: driver.9,v 1.33 2022/02/11 23:19:34 riastradh Exp $ +.\" $NetBSD: driver.9,v 1.34 2022/02/11 23:19:43 riastradh Exp $ .\" .\" Copyright (c) 2001 The NetBSD Foundation, Inc. .\" All rights reserved. @@ -268,31 +268,18 @@ Valid values are .Dv DETACH_QUIET (do not print a notice). .Pp -The autoconfiguration framework may call the driver's activate function -to notify the driver of a change in the resources that have been -allocated to it. -For example, an Ethernet driver has to be notified if the network stack -is being added or removed from the kernel. -The first argument to the activate function -.Fa self -is a pointer to the driver's device structure. -It is the same argument as passed to the attach function. -The second argument +The activate function is used by some buses to notify drivers from +interrupt context when detachment is imminent, with .Fa act -describes the action. -Valid actions are -.Dv DVACT_ACTIVATE -(activate the device) and -.Dv DVACT_DEACTIVATE -(deactivate the device). +set to +.Dv DVACT_DEACTIVATE . +Currently only +.Xr pcmcia 9 +and +.Xr cardbus 9 +use this. If the action is not supported the activate function should return .Er EOPNOTSUPP . -The -.Dv DVACT_DEACTIVATE -call will only be made if the -.Dv DVACT_ACTIVATE -call was successful. -The activate function is called in interrupt context. .Pp Most drivers will want to make use of interrupt facilities. Interrupt locators provided through the attachment structure should be
CVS commit: src/share/man/man9
Module Name:src Committed By: riastradh Date: Fri Feb 11 23:19:43 UTC 2022 Modified Files: src/share/man/man9: driver.9 Log Message: driver(9): Correct paragraph about the driver activate function. To generate a diff of this commit: cvs rdiff -u -r1.33 -r1.34 src/share/man/man9/driver.9 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/share/man/man9
Module Name:src Committed By: riastradh Date: Fri Feb 11 23:19:34 UTC 2022 Modified Files: src/share/man/man9: driver.9 Log Message: driver(9): Delete outdated info about softc and struct device. To generate a diff of this commit: cvs rdiff -u -r1.32 -r1.33 src/share/man/man9/driver.9 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/share/man/man9/driver.9 diff -u src/share/man/man9/driver.9:1.32 src/share/man/man9/driver.9:1.33 --- src/share/man/man9/driver.9:1.32 Fri Nov 17 07:42:29 2017 +++ src/share/man/man9/driver.9 Fri Feb 11 23:19:34 2022 @@ -1,4 +1,4 @@ -.\" $NetBSD: driver.9,v 1.32 2017/11/17 07:42:29 wiz Exp $ +.\" $NetBSD: driver.9,v 1.33 2022/02/11 23:19:34 riastradh Exp $ .\" .\" Copyright (c) 2001 The NetBSD Foundation, Inc. .\" All rights reserved. @@ -101,14 +101,6 @@ struct foo_softc { }; .Ed .Pp -The autoconfiguration framework mandates that the first member of the -.Em softc -structure must be the driver-independent -.Em device_t . -Probably its most useful aspect to the driver is that it contains the -device-instance name -.Em dv_xname . -.Pp If a driver has character device interfaces accessed from userland, the driver must define the .Em cdevsw
CVS commit: src/share/man/man9
Module Name:src Committed By: riastradh Date: Fri Feb 11 23:19:34 UTC 2022 Modified Files: src/share/man/man9: driver.9 Log Message: driver(9): Delete outdated info about softc and struct device. To generate a diff of this commit: cvs rdiff -u -r1.32 -r1.33 src/share/man/man9/driver.9 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/share/man/man9
Module Name:src Committed By: skrll Date: Sat Jan 22 15:16:37 UTC 2022 Modified Files: src/share/man/man9: bus_dma.9 Log Message: Add a note about bus_dmatag_subregion [min_addr, max_addr] To generate a diff of this commit: cvs rdiff -u -r1.66 -r1.67 src/share/man/man9/bus_dma.9 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/share/man/man9/bus_dma.9 diff -u src/share/man/man9/bus_dma.9:1.66 src/share/man/man9/bus_dma.9:1.67 --- src/share/man/man9/bus_dma.9:1.66 Mon Aug 20 14:23:27 2018 +++ src/share/man/man9/bus_dma.9 Sat Jan 22 15:16:37 2022 @@ -1,4 +1,4 @@ -.\" $NetBSD: bus_dma.9,v 1.66 2018/08/20 14:23:27 riastradh Exp $ +.\" $NetBSD: bus_dma.9,v 1.67 2022/01/22 15:16:37 skrll Exp $ .\" .\" Copyright (c) 1996, 1997, 1998, 2001, 2005, 2006 The NetBSD Foundation, Inc. .\" All rights reserved. @@ -28,7 +28,7 @@ .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE .\" POSSIBILITY OF SUCH DAMAGE. .\" -.Dd January 2, 2017 +.Dd January 22, 2022 .Dt BUS_DMA 9 .Os .Sh NAME @@ -822,6 +822,11 @@ It is safe to wait (sleep) for resources It is not safe to wait (sleep) for resources during this call. .El .El +The address range +.Fa min_addr +to +.Fa max_addr +is inclusive of both addresses. .It Fn bus_dmatag_destroy "tag" Free a tag created by .Fn bus_dmatag_subregion .
CVS commit: src/share/man/man9
Module Name:src Committed By: skrll Date: Sat Jan 22 15:16:37 UTC 2022 Modified Files: src/share/man/man9: bus_dma.9 Log Message: Add a note about bus_dmatag_subregion [min_addr, max_addr] To generate a diff of this commit: cvs rdiff -u -r1.66 -r1.67 src/share/man/man9/bus_dma.9 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/share/man/man9
Module Name:src Committed By: christos Date: Tue Jan 18 20:38:28 UTC 2022 Modified Files: src/share/man/man9: acl.9 Log Message: put back more links now that we have them. To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 src/share/man/man9/acl.9 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/share/man/man9/acl.9 diff -u src/share/man/man9/acl.9:1.3 src/share/man/man9/acl.9:1.4 --- src/share/man/man9/acl.9:1.3 Mon Jan 17 17:27:20 2022 +++ src/share/man/man9/acl.9 Tue Jan 18 15:38:28 2022 @@ -1,4 +1,4 @@ -.\" $NetBSD: acl.9,v 1.3 2022/01/17 22:27:20 wiz Exp $ +.\" $NetBSD: acl.9,v 1.4 2022/01/18 20:38:28 christos Exp $ .\"- .\" Copyright (c) 1999-2001 Robert N. M. Watson .\" All rights reserved. @@ -26,7 +26,7 @@ .\" .\" $FreeBSD: head/share/man/man9/acl.9 287445 2015-09-04 00:14:20Z delphij $ .\" -.Dd January 17, 2022 +.Dd January 18, 2022 .Dt ACL 9 .Os .Sh NAME @@ -214,7 +214,13 @@ and directories. .El .Sh SEE ALSO .Xr acl 3 , -.Xr genfs 9 +.Xr genfs 9 , +.Xr genfs_can_access 9 , +.Xr genfs_can_access_acl_nfs4 9 , +.Xr genfs_can_access_acl_posix1e 9 , +.Xr VOP_ACLCHECK 9 , +.Xr VOP_GETACL 9 , +.Xr VOP_SETACL 9 .Sh AUTHORS This manual page was written by .An Robert Watson .
CVS commit: src/share/man/man9
Module Name:src Committed By: christos Date: Tue Jan 18 20:38:28 UTC 2022 Modified Files: src/share/man/man9: acl.9 Log Message: put back more links now that we have them. To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 src/share/man/man9/acl.9 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/share/man/man9
Module Name:src Committed By: wiz Date: Mon Jan 17 23:12:41 UTC 2022 Modified Files: src/share/man/man9: VOP_ACLCHECK.9 VOP_GETACL.9 VOP_SETACL.9 Log Message: Sort ERRORS, mark up NULL. To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/share/man/man9/VOP_ACLCHECK.9 \ src/share/man/man9/VOP_GETACL.9 src/share/man/man9/VOP_SETACL.9 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/share/man/man9
Module Name:src Committed By: wiz Date: Mon Jan 17 23:12:41 UTC 2022 Modified Files: src/share/man/man9: VOP_ACLCHECK.9 VOP_GETACL.9 VOP_SETACL.9 Log Message: Sort ERRORS, mark up NULL. To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/share/man/man9/VOP_ACLCHECK.9 \ src/share/man/man9/VOP_GETACL.9 src/share/man/man9/VOP_SETACL.9 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/share/man/man9/VOP_ACLCHECK.9 diff -u src/share/man/man9/VOP_ACLCHECK.9:1.1 src/share/man/man9/VOP_ACLCHECK.9:1.2 --- src/share/man/man9/VOP_ACLCHECK.9:1.1 Mon Jan 17 22:47:43 2022 +++ src/share/man/man9/VOP_ACLCHECK.9 Mon Jan 17 23:12:41 2022 @@ -1,4 +1,4 @@ -.\" $NetBSD: VOP_ACLCHECK.9,v 1.1 2022/01/17 22:47:43 christos Exp $ +.\" $NetBSD: VOP_ACLCHECK.9,v 1.2 2022/01/17 23:12:41 wiz Exp $ .\"- .\" Copyright (c) 1999 Robert N. M. Watson .\" All rights reserved. @@ -56,7 +56,9 @@ The user credentials to use in authorizi .Pp The .Fa cred -pointer may be NULL to indicate that access control checks are not to be +pointer may be +.Dv NULL +to indicate that access control checks are not to be performed, if possible. This cred setting might be used to allow the kernel to authorize ACL verification that the active process might not be @@ -81,10 +83,10 @@ then zero is returned. Otherwise, an appropriate error code is returned. .Sh ERRORS .Bl -tag -width Er -.It Bq Er EINVAL -The ACL type passed is invalid for this vnode, or the ACL data is invalid. .It Bq Er EACCES The file or directory ACL does not permit access. +.It Bq Er EINVAL +The ACL type passed is invalid for this vnode, or the ACL data is invalid. .It Bq Er ENOMEM Sufficient memory is not available to fulfill the request. .It Bq Er EOPNOTSUPP Index: src/share/man/man9/VOP_GETACL.9 diff -u src/share/man/man9/VOP_GETACL.9:1.1 src/share/man/man9/VOP_GETACL.9:1.2 --- src/share/man/man9/VOP_GETACL.9:1.1 Mon Jan 17 22:47:43 2022 +++ src/share/man/man9/VOP_GETACL.9 Mon Jan 17 23:12:41 2022 @@ -1,4 +1,4 @@ -.\" $NetBSD: VOP_GETACL.9,v 1.1 2022/01/17 22:47:43 christos Exp $ +.\" $NetBSD: VOP_GETACL.9,v 1.2 2022/01/17 23:12:41 wiz Exp $ .\"- .\" Copyright (c) 1999, 2000, 2001 Robert N. M. Watson .\" All rights reserved. @@ -75,10 +75,10 @@ pointer will point to a valid ACL, then Otherwise, an appropriate error code is returned. .Sh ERRORS .Bl -tag -width Er -.It Bq Er EINVAL -The ACL type passed is invalid for this vnode. .It Bq Er EACCES The caller does not have the appropriate privilege. +.It Bq Er EINVAL +The ACL type passed is invalid for this vnode. .It Bq Er ENOMEM Sufficient memory is not available to fulfill the request. .It Bq Er EOPNOTSUPP Index: src/share/man/man9/VOP_SETACL.9 diff -u src/share/man/man9/VOP_SETACL.9:1.1 src/share/man/man9/VOP_SETACL.9:1.2 --- src/share/man/man9/VOP_SETACL.9:1.1 Mon Jan 17 22:47:43 2022 +++ src/share/man/man9/VOP_SETACL.9 Mon Jan 17 23:12:41 2022 @@ -1,4 +1,4 @@ -.\" $NetBSD: VOP_SETACL.9,v 1.1 2022/01/17 22:47:43 christos Exp $ +.\" $NetBSD: VOP_SETACL.9,v 1.2 2022/01/17 23:12:41 wiz Exp $ .\"- .\" Copyright (c) 1999, 2000, 2001 Robert N. M. Watson .\" All rights reserved. @@ -80,17 +80,17 @@ If the ACL is successfully set, then zer Otherwise, an appropriate error code is returned. .Sh ERRORS .Bl -tag -width Er -.It Bq Er EINVAL -The ACL type passed is invalid for this vnode, or the ACL data is invalid. .It Bq Er EACCES The caller does not have the appropriate privilege. +.It Bq Er EINVAL +The ACL type passed is invalid for this vnode, or the ACL data is invalid. .It Bq Er ENOMEM Sufficient memory is not available to fulfill the request. +.It Bq Er ENOSPC +The file system is out of space. .It Bq Er EOPNOTSUPP The file system does not support .Fn VOP_SETACL . -.It Bq Er ENOSPC -The file system is out of space. .It Bq Er EROFS The file system is read-only. .El
CVS commit: src/share/man/man9
Module Name:src Committed By: christos Date: Mon Jan 17 22:47:43 UTC 2022 Modified Files: src/share/man/man9: Makefile Added Files: src/share/man/man9: VOP_ACLCHECK.9 VOP_GETACL.9 VOP_SETACL.9 Log Message: Add new acl vnode op pages To generate a diff of this commit: cvs rdiff -u -r1.461 -r1.462 src/share/man/man9/Makefile cvs rdiff -u -r0 -r1.1 src/share/man/man9/VOP_ACLCHECK.9 \ src/share/man/man9/VOP_GETACL.9 src/share/man/man9/VOP_SETACL.9 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/share/man/man9/Makefile diff -u src/share/man/man9/Makefile:1.461 src/share/man/man9/Makefile:1.462 --- src/share/man/man9/Makefile:1.461 Mon Jan 17 14:08:06 2022 +++ src/share/man/man9/Makefile Mon Jan 17 17:47:43 2022 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.461 2022/01/17 19:08:06 christos Exp $ +# $NetBSD: Makefile,v 1.462 2022/01/17 22:47:43 christos Exp $ # Makefile for section 9 (kernel function and variable) manual pages. @@ -68,7 +68,8 @@ MAN= accept_filter.9 accf_data.9 accf_ht video.9 vme.9 vnfileops.9 vnode.9 vnodeops.9 vnsubr.9 vmem.9 \ wapbl.9 wdc.9 workqueue.9 \ wsbell.9 wscons.9 wsdisplay.9 wsfont.9 wskbd.9 wsmouse.9 \ - xcall.9 + xcall.9 \ + VOP_ACLCHECK.9 VOP_GETACL.9 VOP_SETACL.9 MAN+= atomic_loadstore.9 MLINKS+=atomic_loadstore.9 atomic_load_acquire.9 \ Added files: Index: src/share/man/man9/VOP_ACLCHECK.9 diff -u /dev/null src/share/man/man9/VOP_ACLCHECK.9:1.1 --- /dev/null Mon Jan 17 17:47:43 2022 +++ src/share/man/man9/VOP_ACLCHECK.9 Mon Jan 17 17:47:43 2022 @@ -0,0 +1,101 @@ +.\" $NetBSD: VOP_ACLCHECK.9,v 1.1 2022/01/17 22:47:43 christos Exp $ +.\"- +.\" Copyright (c) 1999 Robert N. M. Watson +.\" 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: head/share/man/man9/VOP_ACLCHECK.9 206622 2010-04-14 19:08:06Z uqs $ +.\" +.Dd January 17, 2022 +.Dt VOP_ACLCHECK 9 +.Os +.Sh NAME +.Nm VOP_ACLCHECK +.Nd check an access control list for a vnode +.Sh SYNOPSIS +.In sys/param.h +.In sys/vnode.h +.In sys/acl.h +.Ft int +.Fn VOP_ACLCHECK "struct vnode *vp" "acl_type_t type" "struct acl *aclp" "kauth_cred_t cred" +.Sh DESCRIPTION +This vnode call may be used to determine the validity of a particular access +control list (ACL) for a particular file or directory. +.Pp +Its arguments are: +.Bl -tag -width type +.It Fa vp +The vnode of the file or directory. +.It Fa type +The type of ACL to check. +.It Fa aclp +A pointer to an ACL structure from which to retrieve the ACL data. +.It Fa cred +The user credentials to use in authorizing the request. +.El +.Pp +The +.Fa cred +pointer may be NULL to indicate that access control checks are not to be +performed, if possible. +This cred setting might be used to allow the +kernel to authorize ACL verification that the active process might not be +permitted to do. +.Pp +The vnode ACL interface defines the syntax, and not semantics, of file and +directory ACL interfaces. +More information about ACL management in kernel +may be found in +.Xr acl 9 . +.Sh LOCKS +No locks are required to call this vnode method, and any locks held on +entry will be held on exit. +.Sh RETURN VALUES +If the +.Fa aclp +pointer points to a valid ACL of type +.Fa type +for the object +.Fa vp , +then zero is returned. +Otherwise, an appropriate error code is returned. +.Sh ERRORS +.Bl -tag -width Er +.It Bq Er EINVAL +The ACL type passed is invalid for this vnode, or the ACL data is invalid. +.It Bq Er EACCES +The file or directory ACL does not permit access. +.It Bq Er ENOMEM +Sufficient memory is not available to fulfill the request. +.It Bq Er
CVS commit: src/share/man/man9
Module Name:src Committed By: christos Date: Mon Jan 17 22:47:43 UTC 2022 Modified Files: src/share/man/man9: Makefile Added Files: src/share/man/man9: VOP_ACLCHECK.9 VOP_GETACL.9 VOP_SETACL.9 Log Message: Add new acl vnode op pages To generate a diff of this commit: cvs rdiff -u -r1.461 -r1.462 src/share/man/man9/Makefile cvs rdiff -u -r0 -r1.1 src/share/man/man9/VOP_ACLCHECK.9 \ src/share/man/man9/VOP_GETACL.9 src/share/man/man9/VOP_SETACL.9 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/share/man/man9
Module Name:src Committed By: wiz Date: Mon Jan 17 22:27:20 UTC 2022 Modified Files: src/share/man/man9: acl.9 genfs.9 genfs_can_access.9 Log Message: Sort SEE ALSO, fix punctuation. To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/share/man/man9/acl.9 cvs rdiff -u -r1.7 -r1.8 src/share/man/man9/genfs.9 cvs rdiff -u -r1.1 -r1.2 src/share/man/man9/genfs_can_access.9 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/share/man/man9/acl.9 diff -u src/share/man/man9/acl.9:1.2 src/share/man/man9/acl.9:1.3 --- src/share/man/man9/acl.9:1.2 Mon Jan 17 19:08:06 2022 +++ src/share/man/man9/acl.9 Mon Jan 17 22:27:20 2022 @@ -1,4 +1,4 @@ -.\" $NetBSD: acl.9,v 1.2 2022/01/17 19:08:06 christos Exp $ +.\" $NetBSD: acl.9,v 1.3 2022/01/17 22:27:20 wiz Exp $ .\"- .\" Copyright (c) 1999-2001 Robert N. M. Watson .\" All rights reserved. @@ -214,7 +214,7 @@ and directories. .El .Sh SEE ALSO .Xr acl 3 , -.Xr genfs 9 , +.Xr genfs 9 .Sh AUTHORS This manual page was written by .An Robert Watson . Index: src/share/man/man9/genfs.9 diff -u src/share/man/man9/genfs.9:1.7 src/share/man/man9/genfs.9:1.8 --- src/share/man/man9/genfs.9:1.7 Mon Jan 17 19:08:06 2022 +++ src/share/man/man9/genfs.9 Mon Jan 17 22:27:20 2022 @@ -1,4 +1,4 @@ -.\" $NetBSD: genfs.9,v 1.7 2022/01/17 19:08:06 christos Exp $ +.\" $NetBSD: genfs.9,v 1.8 2022/01/17 22:27:20 wiz Exp $ .\" .\" Copyright 2012 Elad Efrat .\" All rights reserved. @@ -104,11 +104,11 @@ Implements extended attributes access po Implements rename and delete policy from sticky directories. .El .Sh SEE ALSO +.Xr genfs_can_access 9 , +.Xr genfs_can_access_acl_nfs4 9 , +.Xr genfs_can_access_acl_posix1e 9 , +.Xr genfs_rename 9 , .Xr kauth 9 -.Xr genfs_rename 9 -.Xr genfs_can_access 9 -.Xr genfs_can_access_acl_posix1e 9 -.Xr genfs_can_access_acl_nfs4 9 .Sh AUTHORS .An Elad Efrat Aq Mt e...@netbsd.org wrote this manual page. Index: src/share/man/man9/genfs_can_access.9 diff -u src/share/man/man9/genfs_can_access.9:1.1 src/share/man/man9/genfs_can_access.9:1.2 --- src/share/man/man9/genfs_can_access.9:1.1 Mon Jan 17 19:08:06 2022 +++ src/share/man/man9/genfs_can_access.9 Mon Jan 17 22:27:20 2022 @@ -1,4 +1,4 @@ -.\" $NetBSD: genfs_can_access.9,v 1.1 2022/01/17 19:08:06 christos Exp $ +.\" $NetBSD: genfs_can_access.9,v 1.2 2022/01/17 22:27:20 wiz Exp $ .\"- .\" Copyright (c) 2001 Robert N. M. Watson .\" All rights reserved. @@ -66,7 +66,7 @@ access ACL for the file desired access mode .Fa accmode , .Pp -.This call is intended to support implementations of +This call is intended to support implementations of .Xr VOP_ACCESS 9 , which will use their own access methods to retrieve the vnode properties, and then invoke @@ -110,10 +110,10 @@ An attempt was made to perform an operat appropriate privileges or to the owner of a file or other resource. .El .Sh SEE ALSO +.Xr genfs 9 , .Xr genfs_can_access_acl_nfs4 9 , .Xr genfs_can_access_acl_posix1e 9 , .Xr vnode 9 , -.Xr genfs 9 , .Xr VOP_ACCESS 9 .Sh AUTHORS This manual page and the current implementation of
CVS commit: src/share/man/man9
Module Name:src Committed By: wiz Date: Mon Jan 17 22:27:20 UTC 2022 Modified Files: src/share/man/man9: acl.9 genfs.9 genfs_can_access.9 Log Message: Sort SEE ALSO, fix punctuation. To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/share/man/man9/acl.9 cvs rdiff -u -r1.7 -r1.8 src/share/man/man9/genfs.9 cvs rdiff -u -r1.1 -r1.2 src/share/man/man9/genfs_can_access.9 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/share/man/man9
Module Name:src Committed By: wiz Date: Mon Jan 17 22:27:10 UTC 2022 Modified Files: src/share/man/man9: genfs_rename.9 Log Message: use "non-null" instead of "nonnull" for readability To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 src/share/man/man9/genfs_rename.9 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/share/man/man9/genfs_rename.9 diff -u src/share/man/man9/genfs_rename.9:1.4 src/share/man/man9/genfs_rename.9:1.5 --- src/share/man/man9/genfs_rename.9:1.4 Thu Feb 8 09:03:23 2018 +++ src/share/man/man9/genfs_rename.9 Mon Jan 17 22:27:10 2022 @@ -1,4 +1,4 @@ -.\" $NetBSD: genfs_rename.9,v 1.4 2018/02/08 09:03:23 dholland Exp $ +.\" $NetBSD: genfs_rename.9,v 1.5 2022/01/17 22:27:10 wiz Exp $ .\" .\" Copyright (c) 2013 The NetBSD Foundation, Inc. .\" All rights reserved. @@ -257,7 +257,7 @@ Return zero on success or error on failu .Fa fdvp and .Fa tdvp -are guaranteed to be distinct, nonnull, referenced, and unlocked. +are guaranteed to be distinct, non-null, referenced, and unlocked. Since no locks are held on entry except for the file-system-wide rename lock, .Fa gro_genealogy @@ -304,7 +304,7 @@ as required for this check by some file .Fa dvp and .Fa vp -are guaranteed to be distinct, nonnull, referenced, and locked. +are guaranteed to be distinct, non-null, referenced, and locked. .It Ft int Fn "(*gro_rename_check_possible)" "struct mount *mp" "struct vnode *fdvp" "struct vnode *fvp" "struct vnode *tdvp" "struct vnode *tvp" Return zero if the file system might allow the rename independent of credentials, or error if not. @@ -321,7 +321,7 @@ distinct. .Fa tvp may be .Dv NULL ; -every other vnode is guaranteed to be nonnull. +every other vnode is guaranteed to be non-null. All three or four vnodes are guaranteed to be referenced and locked. .It Ft int Fn "(*gro_rename_check_permitted)" "struct mount *mp" "kauth_cred_t cred" "struct vnode *fdvp" "struct vnode *fvp" "struct vnode *tdvp" "struct vnode *tvp" Return zero if the file system allows the rename given the credentials @@ -340,7 +340,7 @@ distinct. .Fa tvp may be .Dv NULL ; -every other vnode is guaranteed to be nonnull. +every other vnode is guaranteed to be non-null. All three or four vnodes are guaranteed to be referenced and locked. .It Ft int Fn "(*gro_rename)" "struct mount *mp" "kauth_cred_t cred" "struct vnode *fdvp" "struct componentname *fcnp" "void *fde" "struct vnode *fvp" "struct vnode *tdvp" "struct componentname *tcnp" "void *tde" "struct vnode *tvp" Perform the physical file system rename operation, report any knotes, @@ -378,7 +378,7 @@ and may be the same; every other pair of vnodes is guaranteed to be distinct. .Fa tvp -may be null; every other vnode is guaranteed to be nonnull. +may be null; every other vnode is guaranteed to be non-null. All three or four vnodes are guaranteed to be referenced and locked. .It Ft int Fn "(*gro_remove_check_possible)" "struct mount *mp" "struct vnode *dvp" "struct vnode *vp" Return zero if the file system might allow removing an entry in @@ -393,7 +393,7 @@ for file systems similar to UFS/FFS. .Fa dvp and .Fa vp -are guaranteed to be distinct, nonnull, referenced, and locked. +are guaranteed to be distinct, non-null, referenced, and locked. .Pp This, and .Fa gro_remove_check_permitted @@ -419,7 +419,7 @@ for file systems similar to UFS/FFS. .Fa dvp and .Fa vp -are guaranteed to be distinct, nonnull, referenced, and locked. +are guaranteed to be distinct, non-null, referenced, and locked. .It Ft int Fn "(*gro_remove)" "struct mount *mp" "kauth_cred_t cred" "struct vnode *dvp" "struct componentname *cnp" "void *de" "struct vnode *vp" For a rename that is effectively a remove, perform the physical file system remove operation, report any knotes, and purge the namecache @@ -456,7 +456,7 @@ depending on whether this removed the la .Fa dvp and .Fa vp -are guaranteed to be distinct, nonnull, referenced, and locked. +are guaranteed to be distinct, non-null, referenced, and locked. .El .Pp The following utilities are provided for implementing the
CVS commit: src/share/man/man9
Module Name:src Committed By: wiz Date: Mon Jan 17 22:27:10 UTC 2022 Modified Files: src/share/man/man9: genfs_rename.9 Log Message: use "non-null" instead of "nonnull" for readability To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 src/share/man/man9/genfs_rename.9 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/share/man/man9
Module Name:src Committed By: christos Date: Mon Jan 17 19:08:07 UTC 2022 Modified Files: src/share/man/man9: Makefile acl.9 genfs.9 vnode.9 Added Files: src/share/man/man9: genfs_can_access.9 genfs_can_access_acl_nfs4.9 genfs_can_access_acl_posix1e.9 Log Message: Add acl related changes; there is no more vaccess; document the genfs functions instead. To generate a diff of this commit: cvs rdiff -u -r1.460 -r1.461 src/share/man/man9/Makefile cvs rdiff -u -r1.1 -r1.2 src/share/man/man9/acl.9 cvs rdiff -u -r1.6 -r1.7 src/share/man/man9/genfs.9 cvs rdiff -u -r0 -r1.1 src/share/man/man9/genfs_can_access.9 \ src/share/man/man9/genfs_can_access_acl_nfs4.9 \ src/share/man/man9/genfs_can_access_acl_posix1e.9 cvs rdiff -u -r1.82 -r1.83 src/share/man/man9/vnode.9 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/share/man/man9/Makefile diff -u src/share/man/man9/Makefile:1.460 src/share/man/man9/Makefile:1.461 --- src/share/man/man9/Makefile:1.460 Wed Dec 22 12:28:17 2021 +++ src/share/man/man9/Makefile Mon Jan 17 14:08:06 2022 @@ -1,8 +1,8 @@ -# $NetBSD: Makefile,v 1.460 2021/12/22 17:28:17 thorpej Exp $ +# $NetBSD: Makefile,v 1.461 2022/01/17 19:08:06 christos Exp $ # Makefile for section 9 (kernel function and variable) manual pages. -MAN= accept_filter.9 accf_data.9 accf_http.9 \ +MAN= accept_filter.9 accf_data.9 accf_http.9 acl.9 \ altq.9 arp.9 audio.9 autoconf.9 \ bcdtobin.9 bcmp.9 bcopy.9 bintime_add.9 bluetooth.9 boothowto.9 bpf.9 \ buffercache.9 bufferio.9 bufq.9 bus_dma.9 bus_space.9 byteorder.9 \ @@ -22,7 +22,8 @@ MAN= accept_filter.9 accf_data.9 accf_ht edid.9 errno.9 ethersubr.9 evcnt.9 extattr.9 extent.9 \ file.9 fileassoc.9 filedesc.9 firmload.9 flash.9 \ fork1.9 fsetown.9 fstrans.9 \ - genfs.9 genfs_rename.9 \ + genfs.9 genfs_can_access.9 genfs_can_access_acl_nfs4.9 \ + genfs_can_access_acl_posix1e.9 genfs_rename.9 \ hash.9 hashinit.9 hardclock.9 humanize_number.9 hz.9 \ ieee80211.9 ieee80211_crypto.9 ieee80211_input.9 ieee80211_ioctl.9 \ ieee80211_node.9 ieee80211_output.9 ieee80211_proto.9 \ @@ -1059,7 +1060,6 @@ MLINKS+=vnode.9 vref.9 \ vnode.9 vgonel.9 \ vnode.9 vdead_check.9 \ vnode.9 vflush.9 \ - vnode.9 vaccess.9 \ vnode.9 bdevvp.9 \ vnode.9 cdevvp.9 \ vnode.9 vfinddev.9 \ Index: src/share/man/man9/acl.9 diff -u src/share/man/man9/acl.9:1.1 src/share/man/man9/acl.9:1.2 --- src/share/man/man9/acl.9:1.1 Thu Jun 18 16:38:42 2020 +++ src/share/man/man9/acl.9 Mon Jan 17 14:08:06 2022 @@ -1,4 +1,4 @@ -.\" $NetBSD: acl.9,v 1.1 2020/06/18 20:38:42 wiz Exp $ +.\" $NetBSD: acl.9,v 1.2 2022/01/17 19:08:06 christos Exp $ .\"- .\" Copyright (c) 1999-2001 Robert N. M. Watson .\" All rights reserved. @@ -26,7 +26,7 @@ .\" .\" $FreeBSD: head/share/man/man9/acl.9 287445 2015-09-04 00:14:20Z delphij $ .\" -.Dd September 4, 2015 +.Dd January 17, 2022 .Dt ACL 9 .Os .Sh NAME @@ -214,13 +214,7 @@ and directories. .El .Sh SEE ALSO .Xr acl 3 , -.Xr vaccess 9 , -.Xr vaccess_acl_nfs4 9 , -.Xr vaccess_acl_posix1e 9 , -.Xr VFS 9 , -.Xr VOP_ACLCHECK 9 , -.Xr VOP_GETACL 9 , -.Xr VOP_SETACL 9 +.Xr genfs 9 , .Sh AUTHORS This manual page was written by .An Robert Watson . Index: src/share/man/man9/genfs.9 diff -u src/share/man/man9/genfs.9:1.6 src/share/man/man9/genfs.9:1.7 --- src/share/man/man9/genfs.9:1.6 Fri Aug 7 16:17:59 2020 +++ src/share/man/man9/genfs.9 Mon Jan 17 14:08:06 2022 @@ -1,4 +1,4 @@ -.\" $NetBSD: genfs.9,v 1.6 2020/08/07 20:17:59 wiz Exp $ +.\" $NetBSD: genfs.9,v 1.7 2022/01/17 19:08:06 christos Exp $ .\" .\" Copyright 2012 Elad Efrat .\" All rights reserved. @@ -26,7 +26,7 @@ .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE .\" POSSIBILITY OF SUCH DAMAGE. .\" -.Dd August 7, 2020 +.Dd January 17, 2022 .Dt GENFS 9 .Os .Sh NAME @@ -35,9 +35,6 @@ .Sh SYNOPSIS .In miscfs/genfs/genfs.h .Ft int -.Fn genfs_can_access "vnode_t *vp" "kauth_cred_t cred" "uid_t uid" \ -"gid_t gid" "mode_t file_mode" "struct acl *acl" "accmode_t accmode" -.Ft int .Fn genfs_can_chflags "vnode_t *vp" kauth_cred_t cred" "uid_t owner_uid" \ "bool changing_sysflags" .Ft int @@ -79,9 +76,6 @@ error = kauth_authorize_vnode(..., genfs .Ed .Sh FUNCTIONS .Bl -tag -width compact -.It Fn genfs_can_access "vnode_t *vp" "kauth_cred_t cred" "uid_t uid" \ -"gid_t gid" "mode_t file_mode" "struct acl *" "accmode_t accmode" -Implements file access checking based on traditional Unix permissions. .It Fn genfs_can_chflags "vnode_t *vp" "kauth_cred_t cred" "uid_t owner_uid" "bool changing_sysflags" Implements @@ -111,6 +105,10 @@ Implements rename and delete policy from .El .Sh SEE ALSO .Xr kauth 9 +.Xr genfs_rename 9 +.Xr genfs_can_access 9 +.Xr genfs_can_access_acl_posix1e 9 +.Xr genfs_can_access_acl_nfs4 9 .Sh AUTHORS .An Elad Efrat Aq Mt e...@netbsd.org wrote this manual page. Index:
CVS commit: src/share/man/man9
Module Name:src Committed By: christos Date: Mon Jan 17 19:08:07 UTC 2022 Modified Files: src/share/man/man9: Makefile acl.9 genfs.9 vnode.9 Added Files: src/share/man/man9: genfs_can_access.9 genfs_can_access_acl_nfs4.9 genfs_can_access_acl_posix1e.9 Log Message: Add acl related changes; there is no more vaccess; document the genfs functions instead. To generate a diff of this commit: cvs rdiff -u -r1.460 -r1.461 src/share/man/man9/Makefile cvs rdiff -u -r1.1 -r1.2 src/share/man/man9/acl.9 cvs rdiff -u -r1.6 -r1.7 src/share/man/man9/genfs.9 cvs rdiff -u -r0 -r1.1 src/share/man/man9/genfs_can_access.9 \ src/share/man/man9/genfs_can_access_acl_nfs4.9 \ src/share/man/man9/genfs_can_access_acl_posix1e.9 cvs rdiff -u -r1.82 -r1.83 src/share/man/man9/vnode.9 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/share/man/man9
Module Name:src Committed By: wiz Date: Sat Jan 15 17:54:01 UTC 2022 Modified Files: src/share/man/man9: pfil.9 Log Message: whitespace fix To generate a diff of this commit: cvs rdiff -u -r1.39 -r1.40 src/share/man/man9/pfil.9 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/share/man/man9/pfil.9 diff -u src/share/man/man9/pfil.9:1.39 src/share/man/man9/pfil.9:1.40 --- src/share/man/man9/pfil.9:1.39 Sat Jan 15 15:37:15 2022 +++ src/share/man/man9/pfil.9 Sat Jan 15 17:54:01 2022 @@ -1,4 +1,4 @@ -.\" $NetBSD: pfil.9,v 1.39 2022/01/15 15:37:15 christos Exp $ +.\" $NetBSD: pfil.9,v 1.40 2022/01/15 17:54:01 wiz Exp $ .\" .\" Copyright (c) 1996 Matthew R. Green .\" All rights reserved. @@ -98,13 +98,13 @@ then the function returns .Dv NULL . Packet filters use the -.Fn pfil_head_get +.Fn pfil_head_get function specifying the data link .Fa type and the .Fa key to look up the filtering point with which they register themselves. -The +The .Fa key is unique to the filtering point. The data link @@ -129,7 +129,7 @@ The head is looked up using the function, which takes the data link .Fa type and the -.Fa key +.Fa key that the packet filter expects. Filters may provide an argument to be passed to the filter when invoked on a packet.
CVS commit: src/share/man/man9
Module Name:src Committed By: wiz Date: Sat Jan 15 17:54:01 UTC 2022 Modified Files: src/share/man/man9: pfil.9 Log Message: whitespace fix To generate a diff of this commit: cvs rdiff -u -r1.39 -r1.40 src/share/man/man9/pfil.9 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/share/man/man9
Module Name:src Committed By: christos Date: Sat Jan 15 15:37:15 UTC 2022 Modified Files: src/share/man/man9: pfil.9 Log Message: PR/56629: Andreas Gustafsson: Update documentation about the filter head maintainance functions. To generate a diff of this commit: cvs rdiff -u -r1.38 -r1.39 src/share/man/man9/pfil.9 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/share/man/man9/pfil.9 diff -u src/share/man/man9/pfil.9:1.38 src/share/man/man9/pfil.9:1.39 --- src/share/man/man9/pfil.9:1.38 Wed Jan 17 03:34:15 2018 +++ src/share/man/man9/pfil.9 Sat Jan 15 10:37:15 2022 @@ -1,4 +1,4 @@ -.\" $NetBSD: pfil.9,v 1.38 2018/01/17 08:34:15 uwe Exp $ +.\" $NetBSD: pfil.9,v 1.39 2022/01/15 15:37:15 christos Exp $ .\" .\" Copyright (c) 1996 Matthew R. Green .\" All rights reserved. @@ -24,13 +24,13 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd January 17, 2018 +.Dd January 15, 2022 .Dt PFIL 9 .Os .Sh NAME .Nm pfil , -.Nm pfil_head_register , -.Nm pfil_head_unregister , +.Nm pfil_head_create , +.Nm pfil_head_destroy , .Nm pfil_head_get , .Nm pfil_hook_get , .Nm pfil_add_hook , @@ -46,32 +46,32 @@ .In sys/mbuf.h .In net/if.h .In net/pfil.h +.Ft pfil_head_t * +.Fn pfil_head_create "int type" "void *key" .Ft int -.Fn pfil_head_register "struct pfil_head *ph" -.Ft int -.Fn pfil_head_unregister "struct pfil_head *ph" -.Ft struct pfil_head * -.Fn pfil_head_get "int af" "u_long dlt" +.Fn pfil_head_destroy "pfil_head_t *ph" +.Ft pfil_head_t * +.Fn pfil_head_get "int type" "void *key" .Ft struct packet_filter_hook * -.Fn pfil_hook_get "int dir" "struct pfil_head *ph" +.Fn pfil_hook_get "int dir" "pfil_head_t *ph" .Ft int -.Fn pfil_add_hook "int (*func)()" "void *arg" "int flags" "struct pfil_head *ph" +.Fn pfil_add_hook "pfil_func_t func" "void *arg" "int flags" "pfil_head_t *ph" .Ft int -.Fn pfil_remove_hook "int (*func)()" "void *arg" "int flags" "struct pfil_head *ph" +.Fn pfil_remove_hook "pfil_func_t func" "void *arg" "int flags" "pfil_head_t *ph" .Ft int .Fn (*func) "void *arg" "struct mbuf **mp" "struct ifnet *" "int dir" .Ft int -.Fn pfil_run_hooks "struct pfil_head *ph" "struct mbuf **mp" "struct ifnet *ifp" "int dir" +.Fn pfil_run_hooks "pfil_head_t *ph" "struct mbuf **mp" "struct ifnet *ifp" "int dir" .Ft int -.Fn pfil_add_ihook "void (*ifunc)()" "void *arg" "int flags" "struct pfil_head *ph" +.Fn pfil_add_ihook "pfil_ifunc_t ifunc" "void *arg" "int flags" "pfil_head_t *ph" .Ft int -.Fn pfil_remove_ihook "void (*ifunc)()" "void *arg" "int flags" "struct pfil_head *ph" +.Fn pfil_remove_ihook "pfil_ifunc_t ifunc" "void *arg" "int flags" "pfil_head_t *ph" .Ft void .Fn (*ifunc) "void *arg" "unsigned long cmd" "void *ptr" .Ft void -.Fn pfil_run_addrhooks "struct pfil_head *ph" "unsigned long" "struct ifaddr *ifa" +.Fn pfil_run_addrhooks "pfil_head_t *ph" "unsigned long" "struct ifaddr *ifa" .Ft void -.Fn pfil_run_ifhooks "struct pfil_head *ph" "unsigned long" "struct ifnet *ifp" +.Fn pfil_run_ifhooks "pfil_head_t *ph" "unsigned long" "struct ifnet *ifp" .Sh DESCRIPTION The .Nm @@ -80,25 +80,42 @@ incoming or outgoing packet for a partic These hooks may be used to implement a firewall or perform packet transformations. .Pp -Packet filtering points are registered with -.Fn pfil_head_register . -Filtering points are identified by a key -.Vt ( void * ) -and a data link type +Packet filtering points are created with +.Fn pfil_head_create . +Filtering points are identified by a +data link .Vt ( int ) -in the -.Vt pfil_head -structure. -Packet filters use the key and data link type to look up the filtering -point with which they register themselves. -The key is unique to the filtering point. -The data link type is a +.Fa type +and a +.Vt ( void * ) +.Fa key . +If a packet filtering point already exists for that data link +.Fa type +and +.Fa key +then the +.Fn pfil_head_create +function returns +.Dv NULL . +Packet filters use the +.Fn pfil_head_get +function specifying the data link +.Fa type +and the +.Fa key +to look up the filtering point with which they register themselves. +The +.Fa key +is unique to the filtering point. +The data link +.Fa type +is a .Xr bpf 4 .Dv DLT_ Ns Ar type constant indicating what kind of header is present on the packet at the filtering point. -Filtering points may be unregistered with the -.Fn pfil_head_unregister +Filtering points may be destroyed with the +.Fn pfil_head_destroy function. .Pp Packet filters register/unregister themselves with a filtering point @@ -109,8 +126,11 @@ and functions, respectively. The head is looked up using the .Fn pfil_head_get -function, which takes the key and data link type that the packet filter -expects. +function, which takes the data link +.Fa type +and the +.Fa key +that the packet filter expects. Filters may provide an argument to be
CVS commit: src/share/man/man9
Module Name:src Committed By: christos Date: Sat Jan 15 15:37:15 UTC 2022 Modified Files: src/share/man/man9: pfil.9 Log Message: PR/56629: Andreas Gustafsson: Update documentation about the filter head maintainance functions. To generate a diff of this commit: cvs rdiff -u -r1.38 -r1.39 src/share/man/man9/pfil.9 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/share/man/man9
Module Name:src Committed By: andvar Date: Sun Dec 26 16:41:09 UTC 2021 Modified Files: src/share/man/man9: namei.9 Log Message: namei(9): s/operatoins/operations/ To generate a diff of this commit: cvs rdiff -u -r1.51 -r1.52 src/share/man/man9/namei.9 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/share/man/man9/namei.9 diff -u src/share/man/man9/namei.9:1.51 src/share/man/man9/namei.9:1.52 --- src/share/man/man9/namei.9:1.51 Sun May 5 20:10:57 2019 +++ src/share/man/man9/namei.9 Sun Dec 26 16:41:09 2021 @@ -1,4 +1,4 @@ -.\" $NetBSD: namei.9,v 1.51 2019/05/05 20:10:57 christos Exp $ +.\" $NetBSD: namei.9,v 1.52 2021/12/26 16:41:09 andvar Exp $ .\" .\" Copyright (c) 2001, 2005, 2006, 2017 The NetBSD Foundation, Inc. .\" All rights reserved. @@ -479,7 +479,7 @@ the .Xr namecache 9 . May be used to make additional caching decisions, e.g. to store an mtime for determining whether our cache for a remote vnode is stale. -May not be used by subsequent directory operatoins. +May not be used by subsequent directory operations. .El .Pp A file system may set the following flag on return from
CVS commit: src/share/man/man9
Module Name:src Committed By: andvar Date: Sun Dec 26 16:41:09 UTC 2021 Modified Files: src/share/man/man9: namei.9 Log Message: namei(9): s/operatoins/operations/ To generate a diff of this commit: cvs rdiff -u -r1.51 -r1.52 src/share/man/man9/namei.9 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/share/man/man9
Module Name:src Committed By: riastradh Date: Sat Dec 11 23:47:53 UTC 2021 Modified Files: src/share/man/man9: crashme.9 Log Message: crashme(9): Touch up man page markup. Better consistency with sysctl(7), less random widthing and offsetting. To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 src/share/man/man9/crashme.9 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/share/man/man9
Module Name:src Committed By: riastradh Date: Sat Dec 11 23:47:53 UTC 2021 Modified Files: src/share/man/man9: crashme.9 Log Message: crashme(9): Touch up man page markup. Better consistency with sysctl(7), less random widthing and offsetting. To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 src/share/man/man9/crashme.9 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/share/man/man9/crashme.9 diff -u src/share/man/man9/crashme.9:1.4 src/share/man/man9/crashme.9:1.5 --- src/share/man/man9/crashme.9:1.4 Sat Dec 11 19:24:19 2021 +++ src/share/man/man9/crashme.9 Sat Dec 11 23:47:53 2021 @@ -1,4 +1,4 @@ -.\" $NetBSD: crashme.9,v 1.4 2021/12/11 19:24:19 mrg Exp $ +.\" $NetBSD: crashme.9,v 1.5 2021/12/11 23:47:53 riastradh Exp $ .\" .\" Copyright (c) 2019 Matthew R. Green .\" All rights reserved. @@ -81,8 +81,8 @@ The following variables are provided by the .Nm subsystem: -.Bl -tag -width "123456" -offset indent -.It Ic debug.crashme_enable +.Bl -tag -width Li +.It Li debug.crashme_enable Must be set to 1 for any .Nm node to be executed. @@ -91,16 +91,16 @@ node to be executed. The following .Xr sysctl 8 nodes trigger crashes in different ways when written: -.Bl -tag -width "123456" -offset indent -.It Ic debug.crashme.panic +.Bl -tag -width ".Li debug.crashme.null_deref" +.It Li debug.crashme.panic Call .Xr panic 9 . -.It Ic debug.crashme.null_deref +.It Li debug.crashme.null_deref Dereference a null pointer. -.It Ic debug.crashme.null_jump +.It Li debug.crashme.null_jump Call a null function pointer, i.e., jump to the instruction address zero. -.It Ic debug.crashme.ddb +.It Li debug.crashme.ddb Enter .Xr ddb 9 directly by calling
CVS commit: src/share/man/man9
Module Name:src Committed By: riastradh Date: Sat Dec 11 19:16:48 UTC 2021 Modified Files: src/share/man/man9: crashme.9 Log Message: Update crashme(9) man page for recent additions. Reorganize slightly. To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/share/man/man9/crashme.9 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/share/man/man9/crashme.9 diff -u src/share/man/man9/crashme.9:1.2 src/share/man/man9/crashme.9:1.3 --- src/share/man/man9/crashme.9:1.2 Wed Jan 9 09:48:44 2019 +++ src/share/man/man9/crashme.9 Sat Dec 11 19:16:48 2021 @@ -1,4 +1,4 @@ -.\" $NetBSD: crashme.9,v 1.2 2019/01/09 09:48:44 wiz Exp $ +.\" $NetBSD: crashme.9,v 1.3 2021/12/11 19:16:48 riastradh Exp $ .\" .\" Copyright (c) 2019 Matthew R. Green .\" All rights reserved. @@ -88,12 +88,28 @@ subsystem: Must be set to 1 for any .Nm node to be executed. +.El +.Pp +The following +.Xr sysctl 8 +nodes trigger crashes in different ways when written: +.Bl -tag -width "123456" -offset indent .It Ic debug.crashme.panic -Basic panic node. +Call +.Xr panic 9 . .It Ic debug.crashme.null_deref -Dereference -.Dv NULL -node. +Dereference a null pointer. +.It Ic debug.crashme.null_jump +Call a null function pointer, i.e., jump to the instruction address +zero. +.It Ic debug.crashme.ddb +Enter +.Xr ddb 9 +directly by calling +.Xr Debugger 9 . +Requires +.Xr options 4 +.Dv DDB . .El .Sh SEE ALSO .Xr options 4 ,
CVS commit: src/share/man/man9
Module Name:src Committed By: riastradh Date: Sat Dec 11 19:16:48 UTC 2021 Modified Files: src/share/man/man9: crashme.9 Log Message: Update crashme(9) man page for recent additions. Reorganize slightly. To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/share/man/man9/crashme.9 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/share/man/man9
Module Name:src Committed By: riastradh Date: Sat Nov 6 23:29:04 UTC 2021 Modified Files: src/share/man/man9: pslist.9 Log Message: pslist(9): No need to serialize pserialize_perform any more. So take it out of the mutex section. To generate a diff of this commit: cvs rdiff -u -r1.18 -r1.19 src/share/man/man9/pslist.9 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/share/man/man9/pslist.9 diff -u src/share/man/man9/pslist.9:1.18 src/share/man/man9/pslist.9:1.19 --- src/share/man/man9/pslist.9:1.18 Mon Jul 3 21:28:48 2017 +++ src/share/man/man9/pslist.9 Sat Nov 6 23:29:03 2021 @@ -1,4 +1,4 @@ -.\" $NetBSD: pslist.9,v 1.18 2017/07/03 21:28:48 wiz Exp $ +.\" $NetBSD: pslist.9,v 1.19 2021/11/06 23:29:03 riastradh Exp $ .\" .\" Copyright (c) 2016 The NetBSD Foundation, Inc. .\" All rights reserved. @@ -400,9 +400,10 @@ the memory allocated for it: mutex_enter(); PSLIST_WRITER_REMOVE(f, f_entry); - pserialize_perform(); mutex_exit(); + pserialize_perform(); + PSLIST_ENTRY_DESTROY(f, f_entry); pool_put(, f); .Ed
CVS commit: src/share/man/man9
Module Name:src Committed By: riastradh Date: Sat Nov 6 23:29:04 UTC 2021 Modified Files: src/share/man/man9: pslist.9 Log Message: pslist(9): No need to serialize pserialize_perform any more. So take it out of the mutex section. To generate a diff of this commit: cvs rdiff -u -r1.18 -r1.19 src/share/man/man9/pslist.9 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/share/man/man9
Module Name:src Committed By: nia Date: Mon Oct 11 18:19:27 UTC 2021 Modified Files: src/share/man/man9: wsmouse.9 Log Message: wsmouse.9: document scrolling bits To generate a diff of this commit: cvs rdiff -u -r1.18 -r1.19 src/share/man/man9/wsmouse.9 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/share/man/man9/wsmouse.9 diff -u src/share/man/man9/wsmouse.9:1.18 src/share/man/man9/wsmouse.9:1.19 --- src/share/man/man9/wsmouse.9:1.18 Fri Dec 18 02:29:50 2020 +++ src/share/man/man9/wsmouse.9 Mon Oct 11 18:19:27 2021 @@ -1,4 +1,4 @@ -.\" $NetBSD: wsmouse.9,v 1.18 2020/12/18 02:29:50 pgoyette Exp $ +.\" $NetBSD: wsmouse.9,v 1.19 2021/10/11 18:19:27 nia Exp $ .\" .\" Copyright (c) 2001 The NetBSD Foundation, Inc. .\" All rights reserved. @@ -27,7 +27,7 @@ .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE .\" POSSIBILITY OF SUCH DAMAGE. .\" -.Dd November 12, 2006 +.Dd October 11, 2021 .Dt WSMOUSE 9 .Os .Sh NAME @@ -171,6 +171,30 @@ Absolute mode in axis. .El .El +.It Fn wsmouse_precision_scroll "msdev" "x" "y" +Callback from the mouse driver to the wsmouse interface driver. +.Pp +This is used when higher precision scrolling events are required +than what can be provided by a typical scroll wheel. +This function generates +.Dv WSCONS_EVENT_HSCROLL +(for scrolling on the X axis) and +.Dv WSCONS_EVENT_VSCROLL +(for scrolling on the X axis) events. +.Pp +The coordinates are adjusted for speed according to the formula: +.Li x * 4096 / scroll_unit +.Pp +The +.Dv scroll_unit +is configured through the +.Xr wsmouse 4 +ioctl interface, specifically the +.Dv WSMOUSEIO_SETPARAMS +keys +.Dv WSMOUSECFG_HORIZSCROLLDIST +and +.Dv WSMOUSECFG_VERTSCROLLDIST . .It Fn wsmousedevprint "aux" "pnp" The default wsmouse printing routine used by .Fn config_found .
CVS commit: src/share/man/man9
Module Name:src Committed By: nia Date: Mon Oct 11 18:19:27 UTC 2021 Modified Files: src/share/man/man9: wsmouse.9 Log Message: wsmouse.9: document scrolling bits To generate a diff of this commit: cvs rdiff -u -r1.18 -r1.19 src/share/man/man9/wsmouse.9 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/share/man/man9
Module Name:src Committed By: tsutsui Date: Sat Sep 18 18:01:18 UTC 2021 Modified Files: src/share/man/man9: timecounter.9 Log Message: Update description of struct timecounter (u_int64_t -> uint64_t). It has been changed since src/sys/sys/timetc.h rev 1.8. Bump date. To generate a diff of this commit: cvs rdiff -u -r1.10 -r1.11 src/share/man/man9/timecounter.9 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/share/man/man9/timecounter.9 diff -u src/share/man/man9/timecounter.9:1.10 src/share/man/man9/timecounter.9:1.11 --- src/share/man/man9/timecounter.9:1.10 Thu Aug 27 14:14:00 2020 +++ src/share/man/man9/timecounter.9 Sat Sep 18 18:01:18 2021 @@ -1,4 +1,4 @@ -.\" $NetBSD: timecounter.9,v 1.10 2020/08/27 14:14:00 fcambus Exp $ +.\" $NetBSD: timecounter.9,v 1.11 2021/09/18 18:01:18 tsutsui Exp $ .\" $OpenBSD: tc_init.9,v 1.4 2007/05/31 19:20:01 jmc Exp $ .\" .\" Copyright (c) 2004 Alexander Yurchenko @@ -37,7 +37,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 June 8, 2010 +.Dd September 18, 2021 .Dt TIMECOUNTER 9 .Os .Sh NAME @@ -74,7 +74,7 @@ struct timecounter { timecounter_get_t *tc_get_timecount; timecounter_pps_t *tc_poll_pps; u_int tc_counter_mask; - u_int64_t tc_frequency; + uint64_t tc_frequency; const char *tc_name; int tc_quality; void *tc_priv;
CVS commit: src/share/man/man9
Module Name:src Committed By: tsutsui Date: Sat Sep 18 18:01:18 UTC 2021 Modified Files: src/share/man/man9: timecounter.9 Log Message: Update description of struct timecounter (u_int64_t -> uint64_t). It has been changed since src/sys/sys/timetc.h rev 1.8. Bump date. To generate a diff of this commit: cvs rdiff -u -r1.10 -r1.11 src/share/man/man9/timecounter.9 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.