Unified · Split
| @@ -699,7 +699,7 @@ int proc_setattr(struct dentry *dentry, struct iattr *attr) · 698 unmodified lines | ||
| 699 | 699 | */ |
| 700 | 700 | static bool has_pid_permissions(struct proc_fs_info *fs_info, |
| 701 | 701 | struct task_struct *task, |
| 702 | − int hide_pid_min) | |
| 702 | + enum proc_hidepid hide_pid_min) | |
| 703 | 703 | { |
| 704 | 704 | /* |
| 705 | 705 | * If 'hidpid' mount option is set force a ptrace check, |
| @@ -166,7 +166,7 @@ void proc_invalidate_siblings_dcache(struct hlist_head *inodes, spinlock_t *lock · 165 unmodified lines | ||
| 166 | 166 | deactivate_super(old_sb); |
| 167 | 167 | } |
| 168 | 168 | |
| 169 | −static inline const char *hidepid2str(int v) | |
| 169 | +static inline const char *hidepid2str(enum proc_hidepid v) | |
| 170 | 170 | { |
| 171 | 171 | switch (v) { |
| 172 | 172 | case HIDEPID_OFF: return "off"; |
| @@ -32,9 +32,9 @@ · 31 unmodified lines | ||
| 32 | 32 | struct proc_fs_context { |
| 33 | 33 | struct pid_namespace *pid_ns; |
| 34 | 34 | unsigned int mask; |
| 35 | − int hidepid; | |
| 35 | + enum proc_hidepid hidepid; | |
| 36 | 36 | int gid; |
| 37 | − int pidonly; | |
| 37 | + enum proc_pidonly pidonly; | |
| 38 | 38 | }; |
| 39 | 39 | |
| 40 | 40 | enum proc_param { |
| @@ -43,7 +43,7 @@ struct proc_ops { · 42 unmodified lines | ||
| 43 | 43 | } __randomize_layout; |
| 44 | 44 | |
| 45 | 45 | /* definitions for hide_pid field */ |
| 46 | −enum { | |
| 46 | +enum proc_hidepid { | |
| 47 | 47 | HIDEPID_OFF = 0, |
| 48 | 48 | HIDEPID_NO_ACCESS = 1, |
| 49 | 49 | HIDEPID_INVISIBLE = 2, |
| @@ -51,7 +51,7 @@ enum { · 1 unmodified line | ||
| 51 | 51 | }; |
| 52 | 52 | |
| 53 | 53 | /* definitions for proc mount option pidonly */ |
| 54 | −enum { | |
| 54 | +enum proc_pidonly { | |
| 55 | 55 | PROC_PIDONLY_OFF = 0, |
| 56 | 56 | PROC_PIDONLY_ON = 1, |
| 57 | 57 | }; |
| @@ -61,8 +61,8 @@ struct proc_fs_info { · 3 unmodified lines | ||
| 61 | 61 | struct dentry *proc_self; /* For /proc/self */ |
| 62 | 62 | struct dentry *proc_thread_self; /* For /proc/thread-self */ |
| 63 | 63 | kgid_t pid_gid; |
| 64 | − int hide_pid; | |
| 65 | − int pidonly; | |
| 64 | + enum proc_hidepid hide_pid; | |
| 65 | + enum proc_pidonly pidonly; | |
| 66 | 66 | }; |
| 67 | 67 | |
| 68 | 68 | static inline struct proc_fs_info *proc_sb_info(struct super_block *sb) |