Re: [PATCH v1 06/10] man/man2/statmount.2: Document STATMOUNT_OPT_SEC_ARRAY

Alejandro Colomar <[email protected]> Wed, 11 Feb 2026 14:49:39 +0100
Newsgroups dev.linux.lists.criu,org.kernel.vger.linux-man
Message-ID <aYyIAQxaZCHKwSDx@devuan>
On 2026-02-10T02:47:39+0530, Bhavik Sachdev wrote:
> Document STATMOUNT_OPT_SEC_ARRAY flag and the corresponding fields
> introduced by it. This text is based this commit message [1].
> 
> Retrieves only security options separated by null bytes.
> 
> Link [1]:
> <https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=aefff51e1c2986e16f2780ca8e4c97b784800ab5>
> 
> Signed-off-by: Bhavik Sachdev <[email protected]>
> ---
>  man/man2/statmount.2 | 12 ++++++++++++
>  1 file changed, 12 insertions(+)
> 
> diff --git a/man/man2/statmount.2 b/man/man2/statmount.2
> index e47af22c3..b7acde8f4 100644
> --- a/man/man2/statmount.2
> +++ b/man/man2/statmount.2
> @@ -54,6 +54,8 @@ .SH SYNOPSIS
>  .B "    __u32  sb_source;"
>  .B "    __u32  opt_num;"
>  .B "    __u32  opt_array;"
> +.B "    __u32  opt_sec_num;"
> +.B "    __u32  opt_sec_array;"
>  .B "    char   str[];"
>  .B };
>  .EE
> @@ -117,6 +119,7 @@ .SS The mnt_id_req structure
>  STATMOUNT_FS_SUBTYPE	/* Want/got fs_subtype */
>  STATMOUNT_SB_SOURCE	/* Want/got sb_source */
>  STATMOUNT_OPT_ARRAY	/* Want/got opt_... */
> +STATMOUNT_OPT_SEC_ARRAY	/* Want/got opt_sec... */
>  .TE
>  .in
>  .P
> @@ -287,6 +290,15 @@ .SS The returned information
>  buffer that contains file system options separated by null bytes.
>  They can be iterated over the help of
>  .IR smbuf.opt_num .
> +.I smbuf.opt_sec_num

Missing .TP above this.  You could check patches with diffman-git(1) to
check that they look good.

See for example how it shows the effects of this patch:

	$ MANWIDTH=64 diffman-git HEAD
	<standard input>:109: warning: table wider than line length minus indentation
	<standard input>:111: warning: table wider than line length minus indentation
	--- HEAD^:man/man2/statmount.2
	+++ HEAD:man/man2/statmount.2
	@@ -48,6 +48,8 @@ SYNOPSIS
		  __u32  sb_source;
		  __u32  opt_num;
		  __u32  opt_array;
	+         __u32  opt_sec_num;
	+         __u32  opt_sec_array;
		  char   str[];
	      };
	 
	@@ -93,6 +95,7 @@ DESCRIPTION
		  STATMOUNT_FS_SUBTYPE       /* Want/got fs_subtype */
		  STATMOUNT_SB_SOURCE        /* Want/got sb_source */
		  STATMOUNT_OPT_ARRAY        /* Want/got opt_... */
	+         STATMOUNT_OPT_SEC_ARRAY    /* Want/got opt_sec... */
	 
	      In general, the kernel does not reject values in req.param
	      other than the above.  (For an exception, see EINVAL in
	@@ -218,7 +221,14 @@ DESCRIPTION
		     The offset to the location in the smbuf.str buffer
		     that contains file system options separated by null
		     bytes.  They can be iterated over the help of sm‐
	-            buf.opt_num.
	+            buf.opt_num.  smbuf.opt_sec_num The number of secu‐
	+            rity options set on the mount.
	+
	+     smbuf.opt_sec_array
	+            The offset to the location in the smbuf.str buffer
	+            that contains security options separated by null
	+            bytes.  They can be iterated over the help of sm‐
	+            buf.opt_sec_num.
	 
	 RETURN VALUE
	      On success, zero is returned.  On error, -1 is returned,

The diffman-git(1) script is part of the repository.  You can install
it with `make -R install`.  Or you can use it directly from src/bin/.


Cheers,
Alex

> +The number of security options set on the mount.
> +.TP
> +.I smbuf.opt_sec_array
> +The offset to the location in the
> +.I smbuf.str
> +buffer that contains security options separated by null bytes.
> +They can be iterated over the help of
> +.IR smbuf.opt_sec_num .
>  .SH RETURN VALUE
>  On success, zero is returned.
>  On error, \-1 is returned, and
> -- 
> 2.53.0
> 
> 

-- 
<https://www.alejandro-colomar.es>
signature.asc (application/pgp-signature, 833 B)
-----BEGIN PGP SIGNATURE-----

iQIzBAABCgAdFiEES7Jt9u9GbmlWADAi64mZXMKQwqkFAmmMiPMACgkQ64mZXMKQ
wqm4mRAAvATsEvcJtvFGI8j8/68RFhd4S4zVQqq/rPaiEUIJbL1jlJ3THl/YqcPe
tXya5akJVsaKBRu7IJwFF/xn41NAdKwDz+pa3XanapRif7PQjsv0xguGNF62O50k
UySWoGN/oXF2Nn1RfW1a8DJUtqVEXk0eCkOnqRgz5YoRo+LLxYte2w/4HTQfp0dC
loLS4W2LPoMgA6OyYnGXUSEdpy4LGqB/yC6fxj9cYfFIf9JSWebW+3IRWFLj+u0W
qFi9/EmCoYomX//bEXn0gRm2HWfChpwIf5cpZdfo3/PYRVMRkK7lSP/dsbHN1xNl
6zQ0rR1n3/x/bTQJSfNEQYc0jryQ7xCtdoi81G2b926Q2VtvJJucgSHnLtS4DX7f
R3v38W2eKxBbakWsh0bMDDyep2Uojug58KQtImTttqM3x1xlBs2sC/qo4uizbVJ7
PMDcXN4djhheHYfgHqfp53044+VNZtzPLeIQmJ7aBeY4fayVbTJMqGD3aym35RhN
2Ds9IrUdH80OQz6hsuo8Cm9WHWmvN9ZUI/H1j5JWLQsZyJnCQ/cY+vONF/62hW6d
X9maYh4vzVPeq9Q1TXFN+kYYvJnruC7vGgEx4o644fx7P2/6+SP/3FTGVQAKCTHm
ix2mP5wnaYnLbHrMEbo6I3mEzwXSjxJFpKZaZp5cRy4fJwFm0oE=
=1R2k
-----END PGP SIGNATURE-----