History

nsfs: move root inode number to uapi

Userspace relies on the root inode numbers 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.

Christian Brauner committed 1 year ago

Commit 6a9e2fb1 parent 19272b32 files · +16 −6Browse files

Showing the changes to include/uapi (1 of 2 files). Show all

Unified · Split

include/uapi/linux/nsfs.h+9−0
@@ -42,4 +42,13 @@ struct mnt_ns_info { · 41 unmodified lines
4242 /* Get previous namespace. */
4343 #define NS_MNT_GET_PREV _IOR(NSIO, 12, struct mnt_ns_info)
4444
45+enum init_ns_ino {
46+ IPC_NS_INIT_INO = 0xEFFFFFFFU,
47+ UTS_NS_INIT_INO = 0xEFFFFFFEU,
48+ USER_NS_INIT_INO = 0xEFFFFFFDU,
49+ PID_NS_INIT_INO = 0xEFFFFFFCU,
50+ CGROUP_NS_INIT_INO = 0xEFFFFFFBU,
51+ TIME_NS_INIT_INO = 0xEFFFFFFAU,
52+};
53+
4554 #endif /* __LINUX_NSFS_H */