diff options
Diffstat (limited to 'share/man/man9')
-rw-r--r-- | share/man/man9/BUF_ISLOCKED.9 | 5 | ||||
-rw-r--r-- | share/man/man9/MODULE_PNP_INFO.9 | 2 | ||||
-rw-r--r-- | share/man/man9/Makefile | 12 | ||||
-rw-r--r-- | share/man/man9/VFS.9 | 1 | ||||
-rw-r--r-- | share/man/man9/VNET.9 (renamed from share/man/man9/vnet.9) | 52 | ||||
-rw-r--r-- | share/man/man9/backlight.9 | 2 | ||||
-rw-r--r-- | share/man/man9/g_geom.9 | 15 | ||||
-rw-r--r-- | share/man/man9/namei.9 | 8 | ||||
-rw-r--r-- | share/man/man9/sysctl.9 | 8 | ||||
-rw-r--r-- | share/man/man9/taskqueue.9 | 2 | ||||
-rw-r--r-- | share/man/man9/ucred.9 | 28 | ||||
-rw-r--r-- | share/man/man9/vn_fullpath.9 | 120 |
12 files changed, 147 insertions, 108 deletions
diff --git a/share/man/man9/BUF_ISLOCKED.9 b/share/man/man9/BUF_ISLOCKED.9 index 09dfc458c834..c50d79c889fd 100644 --- a/share/man/man9/BUF_ISLOCKED.9 +++ b/share/man/man9/BUF_ISLOCKED.9 @@ -25,7 +25,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH .\" DAMAGE. .\" -.Dd January 22, 2008 +.Dd September 26, 2025 .Dt BUF_ISLOCKED 9 .Os .Sh NAME @@ -60,8 +60,7 @@ The lock is not held by anyone. .Xr buf 9 , .Xr BUF_LOCK 9 , .Xr BUF_UNLOCK 9 , -.Xr lockmgr 9 , -.Xr lockstatus 9 +.Xr lockmgr 9 .Sh AUTHORS This manual page was written by .An Attilio Rao Aq Mt attilio@FreeBSD.org . diff --git a/share/man/man9/MODULE_PNP_INFO.9 b/share/man/man9/MODULE_PNP_INFO.9 index 529afd70096d..b1cc935b1aca 100644 --- a/share/man/man9/MODULE_PNP_INFO.9 +++ b/share/man/man9/MODULE_PNP_INFO.9 @@ -65,7 +65,7 @@ The second name is encoded by appending a forward slash and the second name after the first.) .Pp Types are one of the following: -.Bl -tag -width U16 +.Bl -tag -width indent .It Dq Vt U8 .Vt uint8_t element. diff --git a/share/man/man9/Makefile b/share/man/man9/Makefile index 5bcde3030ebc..3bccc92572d6 100644 --- a/share/man/man9/Makefile +++ b/share/man/man9/Makefile @@ -1,6 +1,6 @@ .include <src.opts.mk> -PACKAGE= kernel +PACKAGE= kernel-man MAN= accept_filter.9 \ accf_data.9 \ @@ -417,7 +417,7 @@ MAN= accept_filter.9 \ vn_deallocate.9 \ vn_fullpath.9 \ vn_isdisk.9 \ - vnet.9 \ + VNET.9 \ vnode.9 \ vnode_pager_setsize.9 \ vnode_pager_purge_range.9 \ @@ -2455,6 +2455,9 @@ MLINKS+=vm_page_insert.9 vm_page_remove.9 MLINKS+=vm_page_wire.9 vm_page_unwire.9 \ vm_page_wire.9 vm_page_unwire_noq.9 \ vm_page_wire.9 vm_page_wire_mapped.9 +MLINKS+=vn_fullpath.9 vn_fullpath_jail.9 \ + vn_fullpath.9 vn_fullpath_global.9 \ + vn_fullpath.9 vn_fullpath_hardlink.9 MLINKS+=VOP_ACCESS.9 VOP_ACCESSX.9 MLINKS+=VOP_ATTRIB.9 VOP_GETATTR.9 \ VOP_ATTRIB.9 VOP_SETATTR.9 \ @@ -2474,9 +2477,8 @@ MLINKS+=VOP_OPENCLOSE.9 VOP_CLOSE.9 \ MLINKS+=VOP_RDWR.9 VOP_READ.9 \ VOP_RDWR.9 VOP_WRITE.9 MLINKS+=VOP_REMOVE.9 VOP_RMDIR.9 -MLINKS+=vnet.9 vimage.9 -MLINKS+=vref.9 VREF.9 \ - vref.9 vrefl.9 +MLINKS+=VNET.9 VIMAGE.9 +MLINKS+=vref.9 vrefl.9 MLINKS+=vrele.9 vput.9 \ vrele.9 vunref.9 MLINKS+=vslock.9 vsunlock.9 diff --git a/share/man/man9/VFS.9 b/share/man/man9/VFS.9 index a269d8d070cf..a1d0a19bec13 100644 --- a/share/man/man9/VFS.9 +++ b/share/man/man9/VFS.9 @@ -44,7 +44,6 @@ rather than implementing empty functions or casting to .Sh SEE ALSO .Xr VFS_CHECKEXP 9 , .Xr VFS_FHTOVP 9 , -.Xr VFS_INIT 9 , .Xr VFS_MOUNT 9 , .Xr VFS_QUOTACTL 9 , .Xr VFS_SET 9 , diff --git a/share/man/man9/vnet.9 b/share/man/man9/VNET.9 index 28e28bfd3242..679ccc3f9a06 100644 --- a/share/man/man9/vnet.9 +++ b/share/man/man9/VNET.9 @@ -25,7 +25,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd December 10, 2020 +.Dd September 19, 2025 .Dt VNET 9 .Os .Sh NAME @@ -162,26 +162,6 @@ .Fa "int priority" .Fc .\" ------------------------------------------------------------ -.Ss "Sysctl Handling" -.Fo SYSCTL_VNET_INT -.Fa parent nbr name access ptr val descr -.Fc -.Fo SYSCTL_VNET_PROC -.Fa parent nbr name access ptr arg handler fmt descr -.Fc -.Fo SYSCTL_VNET_STRING -.Fa parent nbr name access arg len descr -.Fc -.Fo SYSCTL_VNET_STRUCT -.Fa parent nbr name access ptr type descr -.Fc -.Fo SYSCTL_VNET_UINT -.Fa parent nbr name access ptr val descr -.Fc -.Fo VNET_SYSCTL_ARG -.Fa req arg1 -.Fc -.\" ------------------------------------------------------------ .Sh DESCRIPTION .Nm is the name of a technique to virtualize the network stack. @@ -250,9 +230,6 @@ The .Fn VNET_NAME macro returns the offset within the memory region of the virtual network stack instance. -It is usually only used with -.Fn SYSCTL_VNET_* -macros. .\" ------------------------------------------------------------ .Ss "Virtual Instance Selection" .\" @@ -459,30 +436,9 @@ call will be ignored. .\" A .Xr sysctl 9 -can be virtualized by using one of the -.Fn SYSCTL_VNET_* -macros. -.Pp -They take the same arguments as the standard -.Xr sysctl 9 -functions, with the only difference, that the -.Fa ptr -argument has to be passed as -.Ql &VNET_NAME(foo) -instead of -.Ql &foo -so that the variable can be selected from the correct memory -region of the virtual network stack instance of the caller. -.Pp -For the very rare case a sysctl handler function would want to -handle -.Fa arg1 -itself the -.Fn VNET_SYSCTL_ARG req arg1 -is provided that will translate the -.Fa arg1 -argument to the correct memory address in the virtual network stack -context of the caller. +can be virtualized by adding the +.Dv CTLFLAG_VNET +control flag to the ctlflags bitmask of the macros. .\" ------------------------------------------------------------ .Sh SEE ALSO .Xr jail 2 , diff --git a/share/man/man9/backlight.9 b/share/man/man9/backlight.9 index 926a723b3859..c4c338ce56ca 100644 --- a/share/man/man9/backlight.9 +++ b/share/man/man9/backlight.9 @@ -65,6 +65,8 @@ struct. .Bl -tag -width "/dev/backlight/*" .It Pa /dev/backlight/* .El +.Sh SEE ALSO +.Xr backlight 8 .Sh HISTORY The .Nm backlight diff --git a/share/man/man9/g_geom.9 b/share/man/man9/g_geom.9 index 74c6979fceda..c5b0c0aded2d 100644 --- a/share/man/man9/g_geom.9 +++ b/share/man/man9/g_geom.9 @@ -27,12 +27,15 @@ .Os .Sh NAME .Nm g_new_geomf , +.Nm g_new_geom , .Nm g_destroy_geom .Nd "geom management" .Sh SYNOPSIS .In geom/geom.h .Ft "struct g_geom *" .Fn g_new_geomf "struct g_class *mp" "const char *fmt" ... +.Ft "struct g_geom *" +.Fn g_new_geom "struct g_class *mp" "const char *name" .Ft void .Fn g_destroy_geom "struct g_geom *gp" .Sh DESCRIPTION @@ -58,6 +61,14 @@ The geom's name is created in a -like way from the rest of the arguments. .Pp The +.Fn g_new_geom +function is very similar to +.Fn g_new_geomf +except that it accepts a regular string instead of a +.Xr printf 3 Ns +-like format strng as the geom's name. +.Pp +The .Fn g_destroy_geom function destroys the given geom immediately and cancels all related pending events. @@ -94,7 +105,9 @@ and .Va access for it. .Pp -.Fn g_new_geomf : +.Fn g_new_geomf +and +.Fn g_new_geom : .Bl -item -offset indent .It Class diff --git a/share/man/man9/namei.9 b/share/man/man9/namei.9 index 5bdffce8c360..a42043587432 100644 --- a/share/man/man9/namei.9 +++ b/share/man/man9/namei.9 @@ -31,7 +31,7 @@ .\" If you integrate this manpage in another OS, I'd appreciate a note .\" - eivind@FreeBSD.org .\" -.Dd May 16, 2025 +.Dd September 30, 2025 .Dt NAMEI 9 .Os .Sh NAME @@ -206,12 +206,6 @@ This flag allows the function to return the parent (directory) vnode in an unlocked state. The parent vnode must be released separately by using .Xr vrele 9 . -.It Dv WANTPARENT -This flag allows the -.Fn namei -function to return the parent (directory) vnode in an unlocked state. -The parent vnode must be released separately by using -.Xr vrele 9 . .It Dv FAILIFEXISTS Makes the .Nm diff --git a/share/man/man9/sysctl.9 b/share/man/man9/sysctl.9 index 92c8532c8ed2..31031e64f713 100644 --- a/share/man/man9/sysctl.9 +++ b/share/man/man9/sysctl.9 @@ -23,7 +23,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd September 1, 2020 +.Dd September 28, 2025 .Dt SYSCTL 9 .Os .Sh NAME @@ -863,14 +863,14 @@ flags to be set indicating the read and write disposition of the sysctl: .It Dv CTLFLAG_RD This is a read-only sysctl. .It Dv CTLFLAG_RDTUN -This is a read-only sysctl and tunable which is tried fetched once +This is a read-only sysctl and tunable which is fetched once from the system environment early during module load or system boot. .It Dv CTLFLAG_WR This is a writable sysctl. .It Dv CTLFLAG_RW This sysctl is readable and writable. .It Dv CTLFLAG_RWTUN -This is a readable and writeable sysctl and tunable which is tried +This is a readable and writeable sysctl and tunable which is fetched once from the system environment early during module load or system boot. .It Dv CTLFLAG_NOFETCH @@ -907,7 +907,7 @@ This sysctl can be written to by processes in When iterating the sysctl name space, do not list this sysctl. .It Dv CTLFLAG_TUN Advisory flag that a system tunable also exists for this variable. -The initial sysctl value is tried fetched once from the system +The initial sysctl value is fetched once from the system environment early during module load or system boot. .It Dv CTLFLAG_DYN Dynamically created OIDs automatically get this flag set. diff --git a/share/man/man9/taskqueue.9 b/share/man/man9/taskqueue.9 index 5afeffcb558b..8ffa9a96d816 100644 --- a/share/man/man9/taskqueue.9 +++ b/share/man/man9/taskqueue.9 @@ -530,7 +530,7 @@ If queueing delays cannot be tolerated then a private taskqueue should be created with a dedicated processing thread. .Sh SEE ALSO .Xr callout 9 , -.Xr ithread 9 , +.Xr intr_event 9 , .Xr kthread 9 , .Xr swi 9 .Sh HISTORY diff --git a/share/man/man9/ucred.9 b/share/man/man9/ucred.9 index 38759bddb5b0..453df386ff18 100644 --- a/share/man/man9/ucred.9 +++ b/share/man/man9/ucred.9 @@ -24,7 +24,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH .\" DAMAGE. .\" -.Dd July 29, 2025 +.Dd August 29, 2025 .Dt UCRED 9 .Os .Sh NAME @@ -113,28 +113,26 @@ The actual copying is performed by .Pp The .Fn crsetgroups -and -.Fn crsetgroups_and_egid -functions set the +function sets the .Va cr_groups and .Va cr_ngroups -variables and allocates space as needed. -They also truncate the group list to the current maximum number of -groups. -No other mechanism should be used to modify the -.Va cr_groups -array. -Note that +variables representing the supplementary groups, allocating space as needed. +It also truncates the group list to the current maximum number of groups. +The .Fn crsetgroups_and_egid -will interpret the first element of +function is similar, but interprets separately the first group of .Va groups -as the new effective GID and the rest of the array as the supplementary groups, -and +as the effective GID to set, only setting the subsequent groups as supplementary +ones. +It will use .Va default_egid -will be used as the new effective GID only if +as the new effective GID if .Va groups is empty. +No other mechanism should be used to modify the +.Va cr_groups +array. .Pp The .Fn cru2x diff --git a/share/man/man9/vn_fullpath.9 b/share/man/man9/vn_fullpath.9 index 116f519ec8aa..9815abc3c86c 100644 --- a/share/man/man9/vn_fullpath.9 +++ b/share/man/man9/vn_fullpath.9 @@ -1,6 +1,13 @@ +.\"- +.\" SPDX-License-Identifier: BSD-2-Clause .\" .\" Copyright (c) 2003 Robert N. M. Watson. .\" All rights reserved. +.\" Copyright (c) 2025 The FreeBSD Foundation +.\" +.\" Portions of this documentation were written by Olivier Certner +.\" <olce@FreeBSD.org> at Kumacom SARL under sponsorship from the FreeBSD +.\" Foundation. .\" .\" Redistribution and use in source and binary forms, with or without .\" modification, are permitted provided that the following conditions @@ -25,7 +32,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH .\" DAMAGE. .\" -.Dd June 15, 2021 +.Dd September 29, 2025 .Dt VN_FULLPATH 9 .Os .Sh NAME @@ -35,23 +42,64 @@ .In sys/param.h .In sys/vnode.h .Ft int -.Fo vn_fullpath -.Fa "struct vnode *vp" "char **retbuf" "char **freebuf" +.Fn vn_fullpath "struct vnode *vp" "char **retbuf" "char **freebuf" +.Ft int +.Fn vn_fullpath_jail "struct vnode *vp" "char **retbuf" "char **freebuf" +.Ft int +.Fn vn_fullpath_global "struct vnode *vp" "char **retbuf" "char **freebuf" +.Ft int +.Fo vn_fullpath_hardlink +.Fa "struct vnode *vp" "struct vnode *dvp" +.Fa "const char *hrdl_name" "size_t hrdl_name_length" +.Fa "char **retbuf" "char **freebuf" "size_t *buflen" .Fc .Sh DESCRIPTION The +.Fn vn_fullpath , +.Fn vn_fullpath_jail , +.Fn vn_fullpath_global +and +.Fn vn_fullpath_hardlink +functions make a +.Dq best effort +attempt at generating a string pathname for the passed vnode. +They differ in which directory the returned path is relative to, except for +.Fn vn_fullpath_hardlink +which behaves like .Fn vn_fullpath -function makes a -.Dq "best effort" -attempt to generate a string pathname for -the passed vnode; the resulting path, if any, will be relative to -the root directory of the process associated with the passed thread pointer. +in this respect and is described at the end. +.Pp The .Fn vn_fullpath -function -is implemented by inspecting the VFS name cache, and attempting to -reconstruct a path from the process root to the object. +function returns a path relative to the root directory of the process associated +with the passed thread pointer. +That root directory is either the system's or the thread's process' containing +jail's root directory, or some descendant directory of such established by some +.Xr chroot 2 +call. +The +.Fn vn_fullpath_jail +function returns a path relative to the passed thread's process' current jail's +root, ignoring intervening +.Xr chroot 2 +calls possibly made inside that jail. +The +.Fn vn_fullpath_global +function returns the full path from the system root, ignoring all jail roots and +.Xr chroot 2 +calls. +.Pp +Paths that the kernel intends to communicate to the passed user thread should +exclusively be obtained via +.Fn vn_fullpath . +Paths obtained via +.Fn vn_fullpath_jail +or +.Fn vn_fullpath_global +are only useful for specific kernel checks or auditing purposes. .Pp +All these functions are implemented by inspecting the VFS name cache, and +attempting to reconstruct a path from the process root to the object. This process is necessarily unreliable for several reasons: intermediate entries in the path may not be found in the cache; files may have more than one name (hard links), not all file systems use the name cache @@ -64,7 +112,7 @@ a vnode pointer value, or a device number and inode number. Code consuming the results of this function should anticipate (and properly handle) failure. .Pp -Its arguments are: +These functions take the following arguments: .Bl -tag -width ".Fa freebuf" .It Fa vp The vnode to search for. @@ -72,17 +120,13 @@ No need to be locked by the caller. .It Fa retbuf Pointer to a .Vt "char *" -that -.Fn vn_fullpath -may (on success) point at a newly -allocated buffer containing the resulting pathname. +that may be set (on success) to point at a newly allocated buffer containing the +resulting pathname. .It Fa freebuf Pointer to a .Vt "char *" -that -.Fn vn_fullpath -may (on success) point at a buffer -to be freed, when the caller is done with +that may be set (on success) to point at a buffer to be freed, when the caller +is done with .Fa retbuf . .El .Pp @@ -110,11 +154,43 @@ and if so, invoke .Xr free 9 with a pool type of .Dv M_TEMP . +.Pp +The +.Fn vn_fullpath_hardlink +function is a convenience wrapper which automatically appends the hardlink name +passed via arguments +.Fa hrdl_name +and +.Fa hrdl_name_length +to the result of calling +.Fn vn_fullpath +on the vnode's parent directory. +It requires the results of a prior call to +.Xr namei 9 +with flag +.Dv WANTPARENT +to be passed in the +.Fa vp +and +.Fa dvp +arguments. +Argument +.Fa buflen +must point to a valid storage containing the size of the desired buffer, which +will be reduced to +.Dv MAXPATHLEN +if in excess of it. .Sh RETURN VALUES If the vnode is successfully converted to a pathname, 0 is returned; otherwise, an error number is returned. .Sh SEE ALSO .Xr free 9 .Sh AUTHORS -This manual page was written by -.An Robert Watson Aq Mt rwatson@FreeBSD.org . +.An -nosplit +This manual page was initally written by +.An Robert Watson Aq Mt rwatson@FreeBSD.org +to describe the +.Fn vn_fullpath +function. +The descriptions of the other related functions were added by +.An Olivier Certner Aq Mt olce@FreeBSD.org . |