.. | .. |
---|
8 | 8 | #include <linux/ns_common.h> |
---|
9 | 9 | |
---|
10 | 10 | struct pid_namespace; |
---|
11 | | -struct nsproxy; |
---|
| 11 | +struct nsset; |
---|
12 | 12 | struct path; |
---|
13 | 13 | struct task_struct; |
---|
14 | 14 | struct inode; |
---|
.. | .. |
---|
19 | 19 | int type; |
---|
20 | 20 | struct ns_common *(*get)(struct task_struct *task); |
---|
21 | 21 | void (*put)(struct ns_common *ns); |
---|
22 | | - int (*install)(struct nsproxy *nsproxy, struct ns_common *ns); |
---|
| 22 | + int (*install)(struct nsset *nsset, struct ns_common *ns); |
---|
23 | 23 | struct user_namespace *(*owner)(struct ns_common *ns); |
---|
24 | 24 | struct ns_common *(*get_parent)(struct ns_common *ns); |
---|
25 | 25 | } __randomize_layout; |
---|
.. | .. |
---|
32 | 32 | extern const struct proc_ns_operations userns_operations; |
---|
33 | 33 | extern const struct proc_ns_operations mntns_operations; |
---|
34 | 34 | extern const struct proc_ns_operations cgroupns_operations; |
---|
| 35 | +extern const struct proc_ns_operations timens_operations; |
---|
| 36 | +extern const struct proc_ns_operations timens_for_children_operations; |
---|
35 | 37 | |
---|
36 | 38 | /* |
---|
37 | 39 | * We always define these enumerators |
---|
.. | .. |
---|
43 | 45 | PROC_USER_INIT_INO = 0xEFFFFFFDU, |
---|
44 | 46 | PROC_PID_INIT_INO = 0xEFFFFFFCU, |
---|
45 | 47 | PROC_CGROUP_INIT_INO = 0xEFFFFFFBU, |
---|
| 48 | + PROC_TIME_INIT_INO = 0xEFFFFFFAU, |
---|
46 | 49 | }; |
---|
47 | 50 | |
---|
48 | 51 | #ifdef CONFIG_PROC_FS |
---|
49 | 52 | |
---|
50 | | -extern int pid_ns_prepare_proc(struct pid_namespace *ns); |
---|
51 | | -extern void pid_ns_release_proc(struct pid_namespace *ns); |
---|
52 | 53 | extern int proc_alloc_inum(unsigned int *pino); |
---|
53 | 54 | extern void proc_free_inum(unsigned int inum); |
---|
54 | 55 | |
---|
55 | 56 | #else /* CONFIG_PROC_FS */ |
---|
56 | | - |
---|
57 | | -static inline int pid_ns_prepare_proc(struct pid_namespace *ns) { return 0; } |
---|
58 | | -static inline void pid_ns_release_proc(struct pid_namespace *ns) {} |
---|
59 | 57 | |
---|
60 | 58 | static inline int proc_alloc_inum(unsigned int *inum) |
---|
61 | 59 | { |
---|
.. | .. |
---|
76 | 74 | |
---|
77 | 75 | extern struct file *proc_ns_fget(int fd); |
---|
78 | 76 | #define get_proc_ns(inode) ((struct ns_common *)(inode)->i_private) |
---|
79 | | -extern void *ns_get_path(struct path *path, struct task_struct *task, |
---|
| 77 | +extern int ns_get_path(struct path *path, struct task_struct *task, |
---|
80 | 78 | const struct proc_ns_operations *ns_ops); |
---|
81 | 79 | typedef struct ns_common *ns_get_path_helper_t(void *); |
---|
82 | | -extern void *ns_get_path_cb(struct path *path, ns_get_path_helper_t ns_get_cb, |
---|
| 80 | +extern int ns_get_path_cb(struct path *path, ns_get_path_helper_t ns_get_cb, |
---|
83 | 81 | void *private_data); |
---|
84 | 82 | |
---|
| 83 | +extern bool ns_match(const struct ns_common *ns, dev_t dev, ino_t ino); |
---|
| 84 | + |
---|
85 | 85 | extern int ns_get_name(char *buf, size_t size, struct task_struct *task, |
---|
86 | 86 | const struct proc_ns_operations *ns_ops); |
---|
87 | 87 | extern void nsfs_init(void); |
---|