diff options
author | Jiri Kosina <jkosina@suse.cz> | 2017-05-01 21:49:28 +0200 |
---|---|---|
committer | Jiri Kosina <jkosina@suse.cz> | 2017-05-01 21:49:28 +0200 |
commit | a0841609f658c77f066af9c61a2e13143564fcb4 (patch) | |
tree | 0f0df468b6f852501cd4ed1570701e695b9f5d56 /fs/proc | |
parent | 77f8f39a2e463eca89a19b916189d0e4e38f75d8 (diff) | |
parent | e679af627fe875a51d40b9a2b17f08fbde36e0e2 (diff) | |
download | linux-a0841609f658c77f066af9c61a2e13143564fcb4.tar.bz2 |
Merge branches 'for-4.12/upstream' and 'for-4.12/klp-hybrid-consistency-model' into for-linus
Diffstat (limited to 'fs/proc')
-rw-r--r-- | fs/proc/base.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/fs/proc/base.c b/fs/proc/base.c index c87b6b9a8a76..9e3ac5c11780 100644 --- a/fs/proc/base.c +++ b/fs/proc/base.c @@ -2834,6 +2834,15 @@ static int proc_pid_personality(struct seq_file *m, struct pid_namespace *ns, return err; } +#ifdef CONFIG_LIVEPATCH +static int proc_pid_patch_state(struct seq_file *m, struct pid_namespace *ns, + struct pid *pid, struct task_struct *task) +{ + seq_printf(m, "%d\n", task->patch_state); + return 0; +} +#endif /* CONFIG_LIVEPATCH */ + /* * Thread groups */ @@ -2933,6 +2942,9 @@ static const struct pid_entry tgid_base_stuff[] = { REG("timers", S_IRUGO, proc_timers_operations), #endif REG("timerslack_ns", S_IRUGO|S_IWUGO, proc_pid_set_timerslack_ns_operations), +#ifdef CONFIG_LIVEPATCH + ONE("patch_state", S_IRUSR, proc_pid_patch_state), +#endif }; static int proc_tgid_base_readdir(struct file *file, struct dir_context *ctx) @@ -3315,6 +3327,9 @@ static const struct pid_entry tid_base_stuff[] = { REG("projid_map", S_IRUGO|S_IWUSR, proc_projid_map_operations), REG("setgroups", S_IRUGO|S_IWUSR, proc_setgroups_operations), #endif +#ifdef CONFIG_LIVEPATCH + ONE("patch_state", S_IRUSR, proc_pid_patch_state), +#endif }; static int proc_tid_base_readdir(struct file *file, struct dir_context *ctx) |