aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/proc_fs.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/proc_fs.h')
-rw-r--r--include/linux/proc_fs.h21
1 files changed, 21 insertions, 0 deletions
diff --git a/include/linux/proc_fs.h b/include/linux/proc_fs.h
index 3686cd6c9aca..648c9c58add7 100644
--- a/include/linux/proc_fs.h
+++ b/include/linux/proc_fs.h
@@ -179,6 +179,8 @@ extern void set_mm_exe_file(struct mm_struct *mm, struct file *new_exe_file);
179extern struct file *get_mm_exe_file(struct mm_struct *mm); 179extern struct file *get_mm_exe_file(struct mm_struct *mm);
180extern void dup_mm_exe_file(struct mm_struct *oldmm, struct mm_struct *newmm); 180extern void dup_mm_exe_file(struct mm_struct *oldmm, struct mm_struct *newmm);
181 181
182extern struct file *proc_ns_fget(int fd);
183
182#else 184#else
183 185
184#define proc_net_fops_create(net, name, mode, fops) ({ (void)(mode), NULL; }) 186#define proc_net_fops_create(net, name, mode, fops) ({ (void)(mode), NULL; })
@@ -241,6 +243,11 @@ static inline void dup_mm_exe_file(struct mm_struct *oldmm,
241 struct mm_struct *newmm) 243 struct mm_struct *newmm)
242{} 244{}
243 245
246static inline struct file *proc_ns_fget(int fd)
247{
248 return ERR_PTR(-EINVAL);
249}
250
244#endif /* CONFIG_PROC_FS */ 251#endif /* CONFIG_PROC_FS */
245 252
246#if !defined(CONFIG_PROC_KCORE) 253#if !defined(CONFIG_PROC_KCORE)
@@ -252,6 +259,18 @@ kclist_add(struct kcore_list *new, void *addr, size_t size, int type)
252extern void kclist_add(struct kcore_list *, void *, size_t, int type); 259extern void kclist_add(struct kcore_list *, void *, size_t, int type);
253#endif 260#endif
254 261
262struct nsproxy;
263struct proc_ns_operations {
264 const char *name;
265 int type;
266 void *(*get)(struct task_struct *task);
267 void (*put)(void *ns);
268 int (*install)(struct nsproxy *nsproxy, void *ns);
269};
270extern const struct proc_ns_operations netns_operations;
271extern const struct proc_ns_operations utsns_operations;
272extern const struct proc_ns_operations ipcns_operations;
273
255union proc_op { 274union proc_op {
256 int (*proc_get_link)(struct inode *, struct path *); 275 int (*proc_get_link)(struct inode *, struct path *);
257 int (*proc_read)(struct task_struct *task, char *page); 276 int (*proc_read)(struct task_struct *task, char *page);
@@ -270,6 +289,8 @@ struct proc_inode {
270 struct proc_dir_entry *pde; 289 struct proc_dir_entry *pde;
271 struct ctl_table_header *sysctl; 290 struct ctl_table_header *sysctl;
272 struct ctl_table *sysctl_entry; 291 struct ctl_table *sysctl_entry;
292 void *ns;
293 const struct proc_ns_operations *ns_ops;
273 struct inode vfs_inode; 294 struct inode vfs_inode;
274}; 295};
275 296