[PATCH 7/9] man/man2/statmount.2: Document STATMOUNT_{UIDMAP,GIDMAP}
Bhavik Sachdev <[email protected]> Wed, 28 Jan 2026 19:27:36 +0530
| Newsgroups | dev.linux.lists.criu,org.kernel.vger.linux-man |
|---|---|
| Message-ID | <03658d771bb50174b5bbba2e9d794430da3b7a15.1769608658.git.b.sachdev1904@gmail.com> |
Document the STATMOUNT_{UIDMAP,GIDMAP} flags and the corresponding
fields introduced by them. Most of this is based on the commit message
provided here [1].
Link [1]:
<https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=37c4a9590e1efcae7749682239fc22a330d2d325>
Signed-off-by: Bhavik Sachdev <[email protected]>
---
man/man2/statmount.2 | 33 +++++++++++++++++++++++++++++++++
1 file changed, 33 insertions(+)
diff --git a/man/man2/statmount.2 b/man/man2/statmount.2
index 4dc312ec8..4ae609818 100644
--- a/man/man2/statmount.2
+++ b/man/man2/statmount.2
@@ -56,6 +56,10 @@ .SH SYNOPSIS
.B " __u32 opt_array;"
.B " __u32 opt_sec_num;"
.B " __u32 opt_sec_array;"
+.B " __u32 mnt_uidmap_num;"
+.B " __u32 mnt_uidmap;"
+.B " __u32 mnt_gidmap_num;"
+.B " __u32 mnt_gidmap;"
.B " char str[];"
.B };
.EE
@@ -120,6 +124,8 @@ .SS The mnt_id_req structure
STATMOUNT_SB_SOURCE /* Want/got sb_source */
STATMOUNT_OPT_ARRAY /* Want/got opt_... */
STATMOUNT_OPT_SEC_ARRAY /* Want/got opt_sec... */
+STATMOUNT_MNT_UIDMAP /* Want/got uidmap... */
+STATMOUNT_MNT_GIDMAP /* Want/got gidmap... */
.TE
.in
.P
@@ -307,6 +313,33 @@ .SS The returned information
They can be iterated over the help of
.IR smbuf.opt_sec_num .
.TP
+.I smbuf.mnt_uidmap_num
+The number of uid mappings in case of an idmapped mount.
+If STATMOUNT_UIDMAP was not unset and this field is 0, the mount is not an idmapped mount.
+.TP
+.TP
+.I smbuf.mnt_uidmap
+The offset to the location in the
+.I smbuf.str
+buffer that contains uid mappings as string array separated by null bytes.
+They can be iterated over with the help of
+.IR smbuf.mnt_uidmap_num .
+The whole range of uid mappings must be resolvable in the caller's user namespace.
+.TP
+.TP
+.I smbuf.mnt_gidmap_num
+The number of gid mappings in case of an idmapped mount.
+If STATMOUNT_GIDMAP was not unset and this field is 0, the mount is not an idmapped mount.
+.TP
+.TP
+.I smbuf.mnt_gidmap
+The offset to the location in the
+.I smbuf.str
+buffer that contains uid mappings as string array separated by null bytes.
+They can be iterated over with the help of
+.IR smbuf.mnt_gidmap_num .
+The whole range of gid mappings must be resolvable in the caller's user namespace.
+.TP
.SH RETURN VALUE
On success, zero is returned.
On error, \-1 is returned, and
--
2.52.0