[RFC PATCH 11/13] docs: Document root namespace uAPI

From: Jarkko Sakkinen

Date: Tue Nov 17 2026 - 00:09:49 EST


Userspace container managers need a clear specification of rootns state
transitions, mount-tree construction, credential rules, and namespace
isolation guarantees.

Add Documentation/userspace-api/rootns.rst to include the kernel-doc
sections and system call reference from kernel/rootns.c,
include/uapi/linux/rootns.h, fs/fsopen.c, and fs/namespace.c.

Co-developed-by: David Howells <dhowells@xxxxxxxxxx>
Signed-off-by: David Howells <dhowells@xxxxxxxxxx>
Signed-off-by: Jarkko Sakkinen <jarkko@xxxxxxxxxx>
---
Documentation/userspace-api/index.rst | 1 +
Documentation/userspace-api/rootns.rst | 35 ++++++++++++++++++++++++++
2 files changed, 36 insertions(+)
create mode 100644 Documentation/userspace-api/rootns.rst

diff --git a/Documentation/userspace-api/index.rst b/Documentation/userspace-api/index.rst
index a68b1bea57a8..56d0ac4eb087 100644
--- a/Documentation/userspace-api/index.rst
+++ b/Documentation/userspace-api/index.rst
@@ -17,6 +17,7 @@ System calls
:maxdepth: 1

unshare
+ rootns
futex2
ebpf/index
ioctl/index
diff --git a/Documentation/userspace-api/rootns.rst b/Documentation/userspace-api/rootns.rst
new file mode 100644
index 000000000000..66c6dbc0e937
--- /dev/null
+++ b/Documentation/userspace-api/rootns.rst
@@ -0,0 +1,35 @@
+.. SPDX-License-Identifier: GPL-2.0
+
+===================
+Root namespace uAPI
+===================
+
+Overview
+========
+
+.. kernel-doc:: kernel/rootns.c
+ :doc: Overview
+
+Flags
+=====
+
+.. kernel-doc:: include/uapi/linux/rootns.h
+
+System calls
+============
+
+.. kernel-doc:: kernel/rootns.c
+ :identifiers: sys_rootns_create sys_rootns_enter sys_rootns_wait
+ sys_rootns_kill
+
+Filesystem configuration
+========================
+
+.. kernel-doc:: fs/fsopen.c
+ :doc: FSCONFIG_SET_ROOTNS
+
+Mount tree installation
+=======================
+
+.. kernel-doc:: fs/namespace.c
+ :doc: MOVE_MOUNT_T_ROOTNS_ROOT
--
2.47.3