From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=100.103.45.18 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1795910413; b=ze58UmUAFb4UKXoCQSn1oGem/J/6RPDKkW1hcfH3aZPva6IOQfpPPUtC+gF1u+q2xOKl x+9Wwox4nPhAjTr1bklei/MIT/hj7GJtFltTfjfxoIgiu1vWEE8J6PDRBPxaL9dEjDagS YzWftB47xwA0G3QeXNFz/M7TxFJw8iCMNiCEBkrk/VJDOLS3Yt3LQtr8N0V2Y57CIR94L rIeFvfeKehyfFwfG53IY5s7+LZMyXmAiKHKStLMsudoareVNoZGh0IYJFftm3ra6VoLS9 wsfsJOj+qow8jb2AVg2bHGkzOdYJhUJSrWQsEnjCkUTq2g607fSDeSt6XqvuPjfKWnQ== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1795910413; h=Received:DKIM-Signature:From:To:Cc:Subject:Date:Message-ID:X-Mailer: In-Reply-To:References:MIME-Version:Content-Transfer-Encoding; bh=lKuvDTI6FKXAAEbVhrzFDmxnTT5Wc4CNv/2+sIEwHRc=; b=vzpqLRDERUi+9dYfkwYf59IR/3XQIWY7QNwTBL5wQtmK9nuLecx5rSTfBTCnI5pwVFBY tEGbyMv7MhjOauUjL02Xv+UxVZZIeYyv8hqDdIpYkWr3F3MQK9wou3WcB5DvrtZIx6v6h Y6vE3glVFsCapHCrSpkP7GnWqpMrAW6G8/FNHjNlILVwOCQ4atk28cpS+57JrF2AU89nz B1ZDLGIFFDMTBXhsZO+ifdPQRp65Xy2XT6VwKQLdeYoY+ujY6bGNuD31gzWUCT8oVCOf7 WCE4w/WUJfuDdI9HyQEtIy3md3XDotZRPicztNGYiom1A9jEMYbeh3aZsDa9l7bEeMg== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=gR5C9pZx; arc=none smtp.remote-ip=100.103.45.18 Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with UTF8SMTPS id F064160A2639; Sun, 29 Nov 2026 00:00:12 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=gR5C9pZx Received: by smtp.kernel.org (Postfix) with UTF8SMTPSA id 6E9111F00A22; Sun, 29 Nov 2026 00:00:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1795910412; bh=lKuvDTI6FKXAAEbVhrzFDmxnTT5Wc4CNv/2+sIEwHRc=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=gR5C9pZxZkAaB4hm5oyXo1Kd8Lx63+873DnFNOd9IlJWfe5SNqi6zfQH5QDrQKHdS b+Of/va+xdQs+aT00ieYft0TuCsVg18To/yCQp/XRtffFeyGgJ5+ycPy9MHdZHczve 4NG4gqnNFfLaRuSTf6nTeO0ASkP8UR3vGKERbbKu5KIVa6YjFsvCYpXqdLN+ZrCClP 7Ld/Kf2wD6NUQW9UKhq6JX/TAx7UrUrIV/+p1Yl5i91aPpNvjwooi1+eTZguQQDSoz QyfUwx3J4blJrjo78hNXI0Mzw4zsv4QD3nulfth5fXndpgU7FKNyVrev/7cC1dCT17 M/DsueczV2D6Q== From: Jarkko Sakkinen To: fsdevel@vger.kernel.org Cc: Jarkko Sakkinen , bpf@vger.kernel.org, containers@lists.linux.dev, linux-api@vger.kernel.org, linux-arch@vger.kernel.org, linux-doc@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org, linux-mm@kvack.org, linux-security-module@vger.kernel.org, Aleksa Sarai , Alexander Mikhalitsyn , Alexander Viro , Andy Lutomirski , Arnd Bergmann , Christian Brauner , David Howells , Eric Biggers , Georgia Garcia , Giuseppe Scrivano , Hugh Dickins , James Morris , Jan Kara , Jeff Layton , John Johansen , Jonathan Corbet , Josef Bacik , Kees Cook , KP Singh , Lennart Poettering , Matt Bobrowski , =?UTF-8?q?Micka=C3=ABl=20Sala=C3=BCn?= , Neal Gompa , Oleg Nesterov , Paul Moore , Pavel Tikhomirov , Serge Hallyn , Shuah Khan , Stephen Smalley , Zygmunt Krynicki Subject: [RFC PATCH v8 27/29] docs: Document userland uAPI Date: Sun, 29 Nov 2026 01:58:06 +0200 Message-ID: <20261128235808.2369970-28-jarkko@kernel.org> X-Mailer: git-send-email 2.47.3 In-Reply-To: <20261128235808.2369970-1-jarkko@kernel.org> References: <20261128235808.2369970-1-jarkko@kernel.org> X-Mailing-List: linux-fsdevel@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Userspace orchestrators need a clear specification of what a userland is, its build and live state transitions, USERLAND_GET_NSFD, USERLAND_SHARE_NSFD, waitid(P_USERLAND), pidfd_send_signal(), mount-tree construction, user namespace ID mapping, credential rules, and process creation semantics. Add Documentation/userspace-api/userland.rst including the kernel-doc sections, type definitions, ioctl descriptions, and system call reference from include/linux/userland.h, include/uapi/linux/userland.h, include/uapi/linux/nsfs.h, kernel/userland.c, kernel/user_namespace.c, fs/fsopen.c, and fs/namespace.c, and register the userland ioctl magic in ioctl-number.rst. Signed-off-by: Jarkko Sakkinen --- Documentation/userspace-api/index.rst | 1 + .../userspace-api/ioctl/ioctl-number.rst | 1 + Documentation/userspace-api/userland.rst | 77 +++++++++++++++++++ 3 files changed, 79 insertions(+) create mode 100644 Documentation/userspace-api/userland.rst diff --git a/Documentation/userspace-api/index.rst b/Documentation/userspace-api/index.rst index a68b1bea57a8..ac665b8fea72 100644 --- a/Documentation/userspace-api/index.rst +++ b/Documentation/userspace-api/index.rst @@ -17,6 +17,7 @@ System calls :maxdepth: 1 unshare + userland futex2 ebpf/index ioctl/index diff --git a/Documentation/userspace-api/ioctl/ioctl-number.rst b/Documentation/userspace-api/ioctl/ioctl-number.rst index dbe462040999..4cf194e7b648 100644 --- a/Documentation/userspace-api/ioctl/ioctl-number.rst +++ b/Documentation/userspace-api/ioctl/ioctl-number.rst @@ -385,6 +385,7 @@ Code Seq# Include File Comments 0xB8 01-02 uapi/misc/mrvl_cn10k_dpi.h Marvell CN10K DPI driver 0xB8 all uapi/linux/mshv.h Microsoft Hyper-V /dev/mshv driver +0xB9 00-0F uapi/linux/userland.h userland uAPI 0xBA 00-0F uapi/linux/liveupdate.h Pasha Tatashin 0xC0 00-0F linux/usb/iowarrior.h diff --git a/Documentation/userspace-api/userland.rst b/Documentation/userspace-api/userland.rst new file mode 100644 index 000000000000..e32ea3501472 --- /dev/null +++ b/Documentation/userspace-api/userland.rst @@ -0,0 +1,77 @@ +.. SPDX-License-Identifier: GPL-2.0 + +============= +userland uAPI +============= + +Overview +======== + +.. kernel-doc:: kernel/userland.c + :doc: Overview + +Lifecycle +========= + +.. kernel-doc:: include/linux/userland.h + :identifiers: userland_state + +Flags +===== + +.. kernel-doc:: include/uapi/linux/userland.h + :identifiers: userland_flags + +Ioctls +====== + +.. kernel-doc:: include/uapi/linux/userland.h + :doc: USERLAND_GET_NSFD + +.. kernel-doc:: include/uapi/linux/userland.h + :doc: USERLAND_SHARE_NSFD + +System calls +============ + +.. kernel-doc:: kernel/userland.c + :identifiers: sys_userland_open + +Process creation +================ + +.. kernel-doc:: kernel/userland.c + :doc: CLONE_INTO_USERLAND + +Process waiting +=============== + +.. kernel-doc:: kernel/userland.c + :doc: P_USERLAND + +Signal delivery +=============== + +.. kernel-doc:: kernel/userland.c + :doc: pidfd_send_signal + +Filesystem configuration +======================== + +.. kernel-doc:: fs/fsopen.c + :doc: FSCONFIG_SET_USERLAND + +Mount tree installation +======================= + +.. kernel-doc:: fs/namespace.c + :doc: MOVE_MOUNT_T_MNTNS + +User namespace ID mapping +========================= + +.. kernel-doc:: include/uapi/linux/nsfs.h + :identifiers: userns_idmap_extent userns_flags userns_idmap + +.. kernel-doc:: kernel/user_namespace.c + :identifiers: sys_userns_set_idmap -- 2.47.3