hc
2023-12-08 01573e231f18eb2d99162747186f59511f56b64d
kernel/include/linux/user_namespace.h
....@@ -46,6 +46,7 @@
4646 UCOUNT_NET_NAMESPACES,
4747 UCOUNT_MNT_NAMESPACES,
4848 UCOUNT_CGROUP_NAMESPACES,
49
+ UCOUNT_TIME_NAMESPACES,
4950 #ifdef CONFIG_INOTIFY_USER
5051 UCOUNT_INOTIFY_INSTANCES,
5152 UCOUNT_INOTIFY_WATCHES,
....@@ -64,11 +65,24 @@
6465 kgid_t group;
6566 struct ns_common ns;
6667 unsigned long flags;
68
+ /* parent_could_setfcap: true if the creator if this ns had CAP_SETFCAP
69
+ * in its effective capability set at the child ns creation time. */
70
+ bool parent_could_setfcap;
71
+
72
+#ifdef CONFIG_KEYS
73
+ /* List of joinable keyrings in this namespace. Modification access of
74
+ * these pointers is controlled by keyring_sem. Once
75
+ * user_keyring_register is set, it won't be changed, so it can be
76
+ * accessed directly with READ_ONCE().
77
+ */
78
+ struct list_head keyring_name_list;
79
+ struct key *user_keyring_register;
80
+ struct rw_semaphore keyring_sem;
81
+#endif
6782
6883 /* Register of per-UID persistent keyrings for this namespace */
6984 #ifdef CONFIG_PERSISTENT_KEYRINGS
7085 struct key *persistent_keyring_register;
71
- struct rw_semaphore persistent_keyring_register_sem;
7286 #endif
7387 struct work_struct work;
7488 #ifdef CONFIG_SYSCTL