]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
tools: update nsfs.h uapi header
authorChristian Brauner <brauner@kernel.org>
Fri, 12 Sep 2025 11:52:54 +0000 (13:52 +0200)
committerChristian Brauner <brauner@kernel.org>
Fri, 19 Sep 2025 12:26:16 +0000 (14:26 +0200)
Update the nsfs.h tools header to the uapi/nsfs.h header so we can rely
on it in the selftests.

Signed-off-by: Christian Brauner <brauner@kernel.org>
tools/include/uapi/linux/nsfs.h

index 34127653fd0070f80cf7cacd0a7c32e63993180e..33c9b578b3b243b3c9162c0de69fdfcebbb4f77a 100644 (file)
@@ -16,8 +16,6 @@
 #define NS_GET_NSTYPE          _IO(NSIO, 0x3)
 /* Get owner UID (in the caller's user namespace) for a user namespace */
 #define NS_GET_OWNER_UID       _IO(NSIO, 0x4)
-/* Get the id for a mount namespace */
-#define NS_GET_MNTNS_ID                _IOR(NSIO, 0x5, __u64)
 /* Translate pid from target pid namespace into the caller's pid namespace. */
 #define NS_GET_PID_FROM_PIDNS  _IOR(NSIO, 0x6, int)
 /* Return thread-group leader id of pid in the callers pid namespace. */
@@ -42,4 +40,19 @@ struct mnt_ns_info {
 /* Get previous namespace. */
 #define NS_MNT_GET_PREV                _IOR(NSIO, 12, struct mnt_ns_info)
 
+/* Retrieve namespace identifiers. */
+#define NS_GET_MNTNS_ID                _IOR(NSIO, 5,  __u64)
+#define NS_GET_ID              _IOR(NSIO, 13, __u64)
+
+enum init_ns_ino {
+       IPC_NS_INIT_INO         = 0xEFFFFFFFU,
+       UTS_NS_INIT_INO         = 0xEFFFFFFEU,
+       USER_NS_INIT_INO        = 0xEFFFFFFDU,
+       PID_NS_INIT_INO         = 0xEFFFFFFCU,
+       CGROUP_NS_INIT_INO      = 0xEFFFFFFBU,
+       TIME_NS_INIT_INO        = 0xEFFFFFFAU,
+       NET_NS_INIT_INO         = 0xEFFFFFF9U,
+       MNT_NS_INIT_INO         = 0xEFFFFFF8U,
+};
+
 #endif /* __LINUX_NSFS_H */