diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2011-05-25 21:10:16 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2011-05-25 21:10:16 -0400 |
commit | 14d74e0cab7a7779a7ff0c3863c04c8a8e507106 (patch) | |
tree | 5e27d7495f8f7ce178b637d588ec42bd7b4173d8 /include/linux/proc_fs.h | |
parent | 49a78d085fa6b44d6ed791923c7172a6433589c2 (diff) | |
parent | 956c920786694f51601a0ef7ee12956fd6aa216e (diff) |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/ebiederm/linux-2.6-nsfd
* git://git.kernel.org/pub/scm/linux/kernel/git/ebiederm/linux-2.6-nsfd:
net: fix get_net_ns_by_fd for !CONFIG_NET_NS
ns proc: Return -ENOENT for a nonexistent /proc/self/ns/ entry.
ns: Declare sys_setns in syscalls.h
net: Allow setting the network namespace by fd
ns proc: Add support for the ipc namespace
ns proc: Add support for the uts namespace
ns proc: Add support for the network namespace.
ns: Introduce the setns syscall
ns: proc files for namespace naming policy.
Diffstat (limited to 'include/linux/proc_fs.h')
-rw-r--r-- | include/linux/proc_fs.h | 21 |
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); | |||
179 | extern struct file *get_mm_exe_file(struct mm_struct *mm); | 179 | extern struct file *get_mm_exe_file(struct mm_struct *mm); |
180 | extern void dup_mm_exe_file(struct mm_struct *oldmm, struct mm_struct *newmm); | 180 | extern void dup_mm_exe_file(struct mm_struct *oldmm, struct mm_struct *newmm); |
181 | 181 | ||
182 | extern 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 | ||
246 | static 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) | |||
252 | extern void kclist_add(struct kcore_list *, void *, size_t, int type); | 259 | extern void kclist_add(struct kcore_list *, void *, size_t, int type); |
253 | #endif | 260 | #endif |
254 | 261 | ||
262 | struct nsproxy; | ||
263 | struct 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 | }; | ||
270 | extern const struct proc_ns_operations netns_operations; | ||
271 | extern const struct proc_ns_operations utsns_operations; | ||
272 | extern const struct proc_ns_operations ipcns_operations; | ||
273 | |||
255 | union proc_op { | 274 | union 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 | ||