summaryrefslogtreecommitdiff
path: root/include/uapi/linux
diff options
context:
space:
mode:
authorChristian Brauner <brauner@kernel.org>2025-06-11 11:59:13 +0200
committerChristian Brauner <brauner@kernel.org>2025-06-11 11:59:13 +0200
commitcd267cdef5fe98006a6b989c5cda035032bb839f (patch)
tree552a87c24c71f2fbaa69871a470889dda0ca9896 /include/uapi/linux
parent19272b37aa4f83ca52bdf9c16d5d81bdd1354494 (diff)
parent7f4f229195b73606ded77e56943f463b78adf635 (diff)
Merge patch series "nsfs: expose the stable inode numbers in a public header"
Christian Brauner <brauner@kernel.org> says: Userspace heavily relies on the root inode numbers for namespaces to identify the initial namespaces. That's already a hard dependency. So we cannot change that anymore. Move the initial inode numbers to a public header and align the only two namespaces that currently don't do that with all the other namespaces. * patches from https://lore.kernel.org/20250606-work-nsfs-v1-0-b8749c9a8844@kernel.org: mntns: use stable inode number for initial mount ns netns: use stable inode number for initial mount ns nsfs: move root inode number to uapi Link: https://lore.kernel.org/20250606-work-nsfs-v1-0-b8749c9a8844@kernel.org Signed-off-by: Christian Brauner <brauner@kernel.org>
Diffstat (limited to 'include/uapi/linux')
-rw-r--r--include/uapi/linux/nsfs.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/include/uapi/linux/nsfs.h b/include/uapi/linux/nsfs.h
index 34127653fd00..97d8d80d139f 100644
--- a/include/uapi/linux/nsfs.h
+++ b/include/uapi/linux/nsfs.h
@@ -42,4 +42,15 @@ struct mnt_ns_info {
/* Get previous namespace. */
#define NS_MNT_GET_PREV _IOR(NSIO, 12, struct mnt_ns_info)
+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 */