Greg Kroah-Hartman | b244131 | 2017-11-01 15:07:57 +0100 | [diff] [blame] | 1 | /* SPDX-License-Identifier: GPL-2.0 */ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 2 | /* |
| 3 | * The proc filesystem constants/structures |
| 4 | */ |
David Howells | 59d8053 | 2013-04-11 13:34:43 +0100 | [diff] [blame] | 5 | #ifndef _LINUX_PROC_FS_H |
| 6 | #define _LINUX_PROC_FS_H |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 7 | |
Alexey Dobriyan | d919b33 | 2020-04-06 20:09:01 -0700 | [diff] [blame] | 8 | #include <linux/compiler.h> |
David Howells | 59d8053 | 2013-04-11 13:34:43 +0100 | [diff] [blame] | 9 | #include <linux/types.h> |
| 10 | #include <linux/fs.h> |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 11 | |
David Howells | 59d8053 | 2013-04-11 13:34:43 +0100 | [diff] [blame] | 12 | struct proc_dir_entry; |
Christoph Hellwig | 3f3942a | 2018-05-15 15:57:23 +0200 | [diff] [blame] | 13 | struct seq_file; |
Christoph Hellwig | fddda2b | 2018-04-13 19:44:18 +0200 | [diff] [blame] | 14 | struct seq_operations; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 15 | |
Alexey Dobriyan | d919b33 | 2020-04-06 20:09:01 -0700 | [diff] [blame] | 16 | enum { |
| 17 | /* |
| 18 | * All /proc entries using this ->proc_ops instance are never removed. |
| 19 | * |
| 20 | * If in doubt, ignore this flag. |
| 21 | */ |
| 22 | #ifdef MODULE |
| 23 | PROC_ENTRY_PERMANENT = 0U, |
| 24 | #else |
| 25 | PROC_ENTRY_PERMANENT = 1U << 0, |
| 26 | #endif |
| 27 | }; |
| 28 | |
Alexey Dobriyan | d56c0d4 | 2020-02-03 17:37:14 -0800 | [diff] [blame] | 29 | struct proc_ops { |
Alexey Dobriyan | d919b33 | 2020-04-06 20:09:01 -0700 | [diff] [blame] | 30 | unsigned int proc_flags; |
Alexey Dobriyan | d56c0d4 | 2020-02-03 17:37:14 -0800 | [diff] [blame] | 31 | int (*proc_open)(struct inode *, struct file *); |
| 32 | ssize_t (*proc_read)(struct file *, char __user *, size_t, loff_t *); |
Christoph Hellwig | fd5a13f | 2020-09-03 16:22:31 +0200 | [diff] [blame] | 33 | ssize_t (*proc_read_iter)(struct kiocb *, struct iov_iter *); |
Alexey Dobriyan | d56c0d4 | 2020-02-03 17:37:14 -0800 | [diff] [blame] | 34 | ssize_t (*proc_write)(struct file *, const char __user *, size_t, loff_t *); |
Alexey Dobriyan | d4455fa | 2021-05-06 18:02:16 -0700 | [diff] [blame] | 35 | /* mandatory unless nonseekable_open() or equivalent is used */ |
Alexey Dobriyan | d56c0d4 | 2020-02-03 17:37:14 -0800 | [diff] [blame] | 36 | loff_t (*proc_lseek)(struct file *, loff_t, int); |
| 37 | int (*proc_release)(struct inode *, struct file *); |
| 38 | __poll_t (*proc_poll)(struct file *, struct poll_table_struct *); |
| 39 | long (*proc_ioctl)(struct file *, unsigned int, unsigned long); |
| 40 | #ifdef CONFIG_COMPAT |
| 41 | long (*proc_compat_ioctl)(struct file *, unsigned int, unsigned long); |
| 42 | #endif |
| 43 | int (*proc_mmap)(struct file *, struct vm_area_struct *); |
| 44 | unsigned long (*proc_get_unmapped_area)(struct file *, unsigned long, unsigned long, unsigned long, unsigned long); |
Alexey Dobriyan | d919b33 | 2020-04-06 20:09:01 -0700 | [diff] [blame] | 45 | } __randomize_layout; |
Alexey Dobriyan | d56c0d4 | 2020-02-03 17:37:14 -0800 | [diff] [blame] | 46 | |
Alexey Gladkov | fa10fed | 2020-04-19 16:10:52 +0200 | [diff] [blame] | 47 | /* definitions for hide_pid field */ |
Alexey Gladkov | e61bb8b | 2020-04-19 16:10:57 +0200 | [diff] [blame] | 48 | enum proc_hidepid { |
Alexey Gladkov | fa10fed | 2020-04-19 16:10:52 +0200 | [diff] [blame] | 49 | HIDEPID_OFF = 0, |
| 50 | HIDEPID_NO_ACCESS = 1, |
| 51 | HIDEPID_INVISIBLE = 2, |
Alexey Gladkov | 24a71ce | 2020-04-19 16:10:53 +0200 | [diff] [blame] | 52 | HIDEPID_NOT_PTRACEABLE = 4, /* Limit pids to only ptraceable pids */ |
Alexey Gladkov | fa10fed | 2020-04-19 16:10:52 +0200 | [diff] [blame] | 53 | }; |
| 54 | |
Alexey Gladkov | 6814ef2 | 2020-04-19 16:10:54 +0200 | [diff] [blame] | 55 | /* definitions for proc mount option pidonly */ |
Alexey Gladkov | e61bb8b | 2020-04-19 16:10:57 +0200 | [diff] [blame] | 56 | enum proc_pidonly { |
Alexey Gladkov | 6814ef2 | 2020-04-19 16:10:54 +0200 | [diff] [blame] | 57 | PROC_PIDONLY_OFF = 0, |
| 58 | PROC_PIDONLY_ON = 1, |
| 59 | }; |
| 60 | |
Alexey Gladkov | fa10fed | 2020-04-19 16:10:52 +0200 | [diff] [blame] | 61 | struct proc_fs_info { |
| 62 | struct pid_namespace *pid_ns; |
| 63 | struct dentry *proc_self; /* For /proc/self */ |
| 64 | struct dentry *proc_thread_self; /* For /proc/thread-self */ |
| 65 | kgid_t pid_gid; |
Alexey Gladkov | e61bb8b | 2020-04-19 16:10:57 +0200 | [diff] [blame] | 66 | enum proc_hidepid hide_pid; |
| 67 | enum proc_pidonly pidonly; |
Alexey Gladkov | fa10fed | 2020-04-19 16:10:52 +0200 | [diff] [blame] | 68 | }; |
| 69 | |
| 70 | static inline struct proc_fs_info *proc_sb_info(struct super_block *sb) |
| 71 | { |
| 72 | return sb->s_fs_info; |
| 73 | } |
| 74 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 75 | #ifdef CONFIG_PROC_FS |
| 76 | |
David Howells | 564def7 | 2018-05-18 11:46:15 +0100 | [diff] [blame] | 77 | typedef int (*proc_write_t)(struct file *, char *, size_t); |
| 78 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 79 | extern void proc_root_init(void); |
Eric W. Biederman | 7bc3e6e | 2020-02-19 18:22:26 -0600 | [diff] [blame] | 80 | extern void proc_flush_pid(struct pid *); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 81 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 82 | extern struct proc_dir_entry *proc_symlink(const char *, |
| 83 | struct proc_dir_entry *, const char *); |
Alexey Dobriyan | c6c75de | 2020-12-15 20:42:39 -0800 | [diff] [blame] | 84 | struct proc_dir_entry *_proc_mkdir(const char *, umode_t, struct proc_dir_entry *, void *, bool); |
David Howells | 59d8053 | 2013-04-11 13:34:43 +0100 | [diff] [blame] | 85 | extern struct proc_dir_entry *proc_mkdir(const char *, struct proc_dir_entry *); |
David Howells | 270b5ac | 2013-04-12 02:48:30 +0100 | [diff] [blame] | 86 | extern struct proc_dir_entry *proc_mkdir_data(const char *, umode_t, |
| 87 | struct proc_dir_entry *, void *); |
David Howells | 59d8053 | 2013-04-11 13:34:43 +0100 | [diff] [blame] | 88 | extern struct proc_dir_entry *proc_mkdir_mode(const char *, umode_t, |
| 89 | struct proc_dir_entry *); |
Seth Forshee | f97df70 | 2016-11-14 11:12:56 +0000 | [diff] [blame] | 90 | struct proc_dir_entry *proc_create_mount_point(const char *name); |
Christoph Hellwig | fddda2b | 2018-04-13 19:44:18 +0200 | [diff] [blame] | 91 | |
Christoph Hellwig | 44414d8 | 2018-04-24 17:05:17 +0200 | [diff] [blame] | 92 | struct proc_dir_entry *proc_create_seq_private(const char *name, umode_t mode, |
Christoph Hellwig | fddda2b | 2018-04-13 19:44:18 +0200 | [diff] [blame] | 93 | struct proc_dir_entry *parent, const struct seq_operations *ops, |
Christoph Hellwig | 44414d8 | 2018-04-24 17:05:17 +0200 | [diff] [blame] | 94 | unsigned int state_size, void *data); |
| 95 | #define proc_create_seq_data(name, mode, parent, ops, data) \ |
| 96 | proc_create_seq_private(name, mode, parent, ops, 0, data) |
Christoph Hellwig | fddda2b | 2018-04-13 19:44:18 +0200 | [diff] [blame] | 97 | #define proc_create_seq(name, mode, parent, ops) \ |
Christoph Hellwig | 44414d8 | 2018-04-24 17:05:17 +0200 | [diff] [blame] | 98 | proc_create_seq_private(name, mode, parent, ops, 0, NULL) |
Christoph Hellwig | 3f3942a | 2018-05-15 15:57:23 +0200 | [diff] [blame] | 99 | struct proc_dir_entry *proc_create_single_data(const char *name, umode_t mode, |
| 100 | struct proc_dir_entry *parent, |
| 101 | int (*show)(struct seq_file *, void *), void *data); |
| 102 | #define proc_create_single(name, mode, parent, show) \ |
| 103 | proc_create_single_data(name, mode, parent, show, NULL) |
David Howells | 59d8053 | 2013-04-11 13:34:43 +0100 | [diff] [blame] | 104 | |
| 105 | extern struct proc_dir_entry *proc_create_data(const char *, umode_t, |
| 106 | struct proc_dir_entry *, |
Alexey Dobriyan | d56c0d4 | 2020-02-03 17:37:14 -0800 | [diff] [blame] | 107 | const struct proc_ops *, |
David Howells | 59d8053 | 2013-04-11 13:34:43 +0100 | [diff] [blame] | 108 | void *); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 109 | |
Alexey Dobriyan | d56c0d4 | 2020-02-03 17:37:14 -0800 | [diff] [blame] | 110 | struct proc_dir_entry *proc_create(const char *name, umode_t mode, struct proc_dir_entry *parent, const struct proc_ops *proc_ops); |
David Howells | 271a15e | 2013-04-12 00:38:51 +0100 | [diff] [blame] | 111 | extern void proc_set_size(struct proc_dir_entry *, loff_t); |
| 112 | extern void proc_set_user(struct proc_dir_entry *, kuid_t, kgid_t); |
Muchun Song | 6dfbbae | 2022-01-21 22:14:20 -0800 | [diff] [blame] | 113 | |
| 114 | /* |
| 115 | * Obtain the private data passed by user through proc_create_data() or |
| 116 | * related. |
| 117 | */ |
| 118 | static inline void *pde_data(const struct inode *inode) |
| 119 | { |
| 120 | return inode->i_private; |
| 121 | } |
| 122 | |
David Howells | 4a520d2 | 2013-04-12 14:06:01 +0100 | [diff] [blame] | 123 | extern void *proc_get_parent_data(const struct inode *); |
David Howells | 59d8053 | 2013-04-11 13:34:43 +0100 | [diff] [blame] | 124 | extern void proc_remove(struct proc_dir_entry *); |
| 125 | extern void remove_proc_entry(const char *, struct proc_dir_entry *); |
| 126 | extern int remove_proc_subtree(const char *, struct proc_dir_entry *); |
| 127 | |
Christoph Hellwig | c350637 | 2018-04-10 19:42:55 +0200 | [diff] [blame] | 128 | struct proc_dir_entry *proc_create_net_data(const char *name, umode_t mode, |
| 129 | struct proc_dir_entry *parent, const struct seq_operations *ops, |
| 130 | unsigned int state_size, void *data); |
Miaohe Lin | 9573e8f | 2019-12-04 16:50:08 -0800 | [diff] [blame] | 131 | #define proc_create_net(name, mode, parent, ops, state_size) \ |
| 132 | proc_create_net_data(name, mode, parent, ops, state_size, NULL) |
Christoph Hellwig | 3617d94 | 2018-04-13 20:38:35 +0200 | [diff] [blame] | 133 | struct proc_dir_entry *proc_create_net_single(const char *name, umode_t mode, |
| 134 | struct proc_dir_entry *parent, |
| 135 | int (*show)(struct seq_file *, void *), void *data); |
David Howells | 564def7 | 2018-05-18 11:46:15 +0100 | [diff] [blame] | 136 | struct proc_dir_entry *proc_create_net_data_write(const char *name, umode_t mode, |
| 137 | struct proc_dir_entry *parent, |
| 138 | const struct seq_operations *ops, |
| 139 | proc_write_t write, |
| 140 | unsigned int state_size, void *data); |
| 141 | struct proc_dir_entry *proc_create_net_single_write(const char *name, umode_t mode, |
| 142 | struct proc_dir_entry *parent, |
| 143 | int (*show)(struct seq_file *, void *), |
| 144 | proc_write_t write, |
| 145 | void *data); |
Christian Brauner | 3eb39f4 | 2018-11-19 00:51:56 +0100 | [diff] [blame] | 146 | extern struct pid *tgid_pidfd_to_pid(const struct file *file); |
Christoph Hellwig | c350637 | 2018-04-10 19:42:55 +0200 | [diff] [blame] | 147 | |
Yonghong Song | f9c7927 | 2020-07-23 11:41:10 -0700 | [diff] [blame] | 148 | struct bpf_iter_aux_info; |
| 149 | extern int bpf_iter_init_seq_net(void *priv_data, struct bpf_iter_aux_info *aux); |
Yonghong Song | 138d0be | 2020-05-09 10:59:10 -0700 | [diff] [blame] | 150 | extern void bpf_iter_fini_seq_net(void *priv_data); |
| 151 | |
Aubrey Li | 68bc30b | 2019-06-06 09:22:34 +0800 | [diff] [blame] | 152 | #ifdef CONFIG_PROC_PID_ARCH_STATUS |
| 153 | /* |
| 154 | * The architecture which selects CONFIG_PROC_PID_ARCH_STATUS must |
| 155 | * provide proc_pid_arch_status() definition. |
| 156 | */ |
| 157 | int proc_pid_arch_status(struct seq_file *m, struct pid_namespace *ns, |
| 158 | struct pid *pid, struct task_struct *task); |
| 159 | #endif /* CONFIG_PROC_PID_ARCH_STATUS */ |
| 160 | |
Arnd Bergmann | ef10444 | 2023-05-16 21:57:29 +0200 | [diff] [blame] | 161 | void arch_report_meminfo(struct seq_file *m); |
Rick Edgecombe | 0ee4488 | 2023-06-12 17:11:02 -0700 | [diff] [blame] | 162 | void arch_proc_pid_thread_features(struct seq_file *m, struct task_struct *task); |
Arnd Bergmann | ef10444 | 2023-05-16 21:57:29 +0200 | [diff] [blame] | 163 | |
David Howells | 59d8053 | 2013-04-11 13:34:43 +0100 | [diff] [blame] | 164 | #else /* CONFIG_PROC_FS */ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 165 | |
Andrew Morton | 647f010 | 2014-06-04 16:12:20 -0700 | [diff] [blame] | 166 | static inline void proc_root_init(void) |
| 167 | { |
| 168 | } |
| 169 | |
Eric W. Biederman | 7bc3e6e | 2020-02-19 18:22:26 -0600 | [diff] [blame] | 170 | static inline void proc_flush_pid(struct pid *pid) |
Pavel Emelyanov | 60347f6 | 2007-10-18 23:40:03 -0700 | [diff] [blame] | 171 | { |
| 172 | } |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 173 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 174 | static inline struct proc_dir_entry *proc_symlink(const char *name, |
David Howells | 59d8053 | 2013-04-11 13:34:43 +0100 | [diff] [blame] | 175 | struct proc_dir_entry *parent,const char *dest) { return NULL;} |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 176 | static inline struct proc_dir_entry *proc_mkdir(const char *name, |
| 177 | struct proc_dir_entry *parent) {return NULL;} |
Seth Forshee | f97df70 | 2016-11-14 11:12:56 +0000 | [diff] [blame] | 178 | static inline struct proc_dir_entry *proc_create_mount_point(const char *name) { return NULL; } |
Alexey Dobriyan | c6c75de | 2020-12-15 20:42:39 -0800 | [diff] [blame] | 179 | static inline struct proc_dir_entry *_proc_mkdir(const char *name, umode_t mode, |
| 180 | struct proc_dir_entry *parent, void *data, bool force_lookup) |
| 181 | { |
| 182 | return NULL; |
| 183 | } |
David Howells | 270b5ac | 2013-04-12 02:48:30 +0100 | [diff] [blame] | 184 | static inline struct proc_dir_entry *proc_mkdir_data(const char *name, |
| 185 | umode_t mode, struct proc_dir_entry *parent, void *data) { return NULL; } |
Randy Dunlap | f12a20f | 2011-05-17 15:44:12 -0700 | [diff] [blame] | 186 | static inline struct proc_dir_entry *proc_mkdir_mode(const char *name, |
Al Viro | d161a13 | 2011-07-24 03:36:29 -0400 | [diff] [blame] | 187 | umode_t mode, struct proc_dir_entry *parent) { return NULL; } |
Christoph Hellwig | 3f3942a | 2018-05-15 15:57:23 +0200 | [diff] [blame] | 188 | #define proc_create_seq_private(name, mode, parent, ops, size, data) ({NULL;}) |
Christoph Hellwig | fddda2b | 2018-04-13 19:44:18 +0200 | [diff] [blame] | 189 | #define proc_create_seq_data(name, mode, parent, ops, data) ({NULL;}) |
| 190 | #define proc_create_seq(name, mode, parent, ops) ({NULL;}) |
Christoph Hellwig | 3f3942a | 2018-05-15 15:57:23 +0200 | [diff] [blame] | 191 | #define proc_create_single(name, mode, parent, show) ({NULL;}) |
| 192 | #define proc_create_single_data(name, mode, parent, show, data) ({NULL;}) |
Hans de Goede | ae62fbe | 2022-01-19 18:08:00 -0800 | [diff] [blame] | 193 | |
| 194 | static inline struct proc_dir_entry * |
| 195 | proc_create(const char *name, umode_t mode, struct proc_dir_entry *parent, |
| 196 | const struct proc_ops *proc_ops) |
| 197 | { return NULL; } |
| 198 | |
| 199 | static inline struct proc_dir_entry * |
| 200 | proc_create_data(const char *name, umode_t mode, struct proc_dir_entry *parent, |
| 201 | const struct proc_ops *proc_ops, void *data) |
| 202 | { return NULL; } |
David Howells | 59d8053 | 2013-04-11 13:34:43 +0100 | [diff] [blame] | 203 | |
David Howells | 271a15e | 2013-04-12 00:38:51 +0100 | [diff] [blame] | 204 | static inline void proc_set_size(struct proc_dir_entry *de, loff_t size) {} |
| 205 | static inline void proc_set_user(struct proc_dir_entry *de, kuid_t uid, kgid_t gid) {} |
Muchun Song | 359745d | 2022-01-21 22:14:23 -0800 | [diff] [blame] | 206 | static inline void *pde_data(const struct inode *inode) {BUG(); return NULL;} |
David Howells | 59d8053 | 2013-04-11 13:34:43 +0100 | [diff] [blame] | 207 | static inline void *proc_get_parent_data(const struct inode *inode) { BUG(); return NULL; } |
| 208 | |
| 209 | static inline void proc_remove(struct proc_dir_entry *de) {} |
| 210 | #define remove_proc_entry(name, parent) do {} while (0) |
| 211 | static inline int remove_proc_subtree(const char *name, struct proc_dir_entry *parent) { return 0; } |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 212 | |
Christoph Hellwig | c350637 | 2018-04-10 19:42:55 +0200 | [diff] [blame] | 213 | #define proc_create_net_data(name, mode, parent, ops, state_size, data) ({NULL;}) |
David Howells | c3d96f6 | 2022-10-03 07:34:21 +0100 | [diff] [blame] | 214 | #define proc_create_net_data_write(name, mode, parent, ops, write, state_size, data) ({NULL;}) |
Christoph Hellwig | c350637 | 2018-04-10 19:42:55 +0200 | [diff] [blame] | 215 | #define proc_create_net(name, mode, parent, state_size, ops) ({NULL;}) |
Christoph Hellwig | 3617d94 | 2018-04-13 20:38:35 +0200 | [diff] [blame] | 216 | #define proc_create_net_single(name, mode, parent, show, data) ({NULL;}) |
David Howells | c3d96f6 | 2022-10-03 07:34:21 +0100 | [diff] [blame] | 217 | #define proc_create_net_single_write(name, mode, parent, show, write, data) ({NULL;}) |
Christoph Hellwig | c350637 | 2018-04-10 19:42:55 +0200 | [diff] [blame] | 218 | |
Christian Brauner | 3eb39f4 | 2018-11-19 00:51:56 +0100 | [diff] [blame] | 219 | static inline struct pid *tgid_pidfd_to_pid(const struct file *file) |
| 220 | { |
| 221 | return ERR_PTR(-EBADF); |
| 222 | } |
| 223 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 224 | #endif /* CONFIG_PROC_FS */ |
| 225 | |
Jeff Layton | f779002 | 2014-09-12 16:40:20 -0400 | [diff] [blame] | 226 | struct net; |
| 227 | |
David Howells | 270b5ac | 2013-04-12 02:48:30 +0100 | [diff] [blame] | 228 | static inline struct proc_dir_entry *proc_net_mkdir( |
| 229 | struct net *net, const char *name, struct proc_dir_entry *parent) |
| 230 | { |
Alexey Dobriyan | c6c75de | 2020-12-15 20:42:39 -0800 | [diff] [blame] | 231 | return _proc_mkdir(name, 0, parent, net, true); |
David Howells | 270b5ac | 2013-04-12 02:48:30 +0100 | [diff] [blame] | 232 | } |
| 233 | |
Andrey Vagin | c62cce2 | 2016-10-24 18:29:13 -0700 | [diff] [blame] | 234 | struct ns_common; |
| 235 | int open_related_ns(struct ns_common *ns, |
| 236 | struct ns_common *(*get_ns)(struct ns_common *ns)); |
| 237 | |
Christoph Hellwig | 76f668b | 2018-05-16 07:19:01 +0200 | [diff] [blame] | 238 | /* get the associated pid namespace for a file in procfs */ |
Alexey Gladkov | 9d78ede | 2020-05-18 20:07:38 +0200 | [diff] [blame] | 239 | static inline struct pid_namespace *proc_pid_ns(struct super_block *sb) |
Christoph Hellwig | 76f668b | 2018-05-16 07:19:01 +0200 | [diff] [blame] | 240 | { |
Alexey Gladkov | 9d78ede | 2020-05-18 20:07:38 +0200 | [diff] [blame] | 241 | return proc_sb_info(sb)->pid_ns; |
Christoph Hellwig | 76f668b | 2018-05-16 07:19:01 +0200 | [diff] [blame] | 242 | } |
| 243 | |
Christian Brauner | 303cc57 | 2020-05-05 16:04:31 +0200 | [diff] [blame] | 244 | bool proc_ns_file(const struct file *file); |
| 245 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 246 | #endif /* _LINUX_PROC_FS_H */ |