aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--fs/proc/base.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/fs/proc/base.c b/fs/proc/base.c
index bb63fa1d34a2..c1332dd2575d 100644
--- a/fs/proc/base.c
+++ b/fs/proc/base.c
@@ -2438,6 +2438,13 @@ static int proc_tgid_io_accounting(struct task_struct *task, char *buffer)
2438} 2438}
2439#endif /* CONFIG_TASK_IO_ACCOUNTING */ 2439#endif /* CONFIG_TASK_IO_ACCOUNTING */
2440 2440
2441static int proc_pid_personality(struct seq_file *m, struct pid_namespace *ns,
2442 struct pid *pid, struct task_struct *task)
2443{
2444 seq_printf(m, "%08x\n", task->personality);
2445 return 0;
2446}
2447
2441/* 2448/*
2442 * Thread groups 2449 * Thread groups
2443 */ 2450 */
@@ -2454,6 +2461,7 @@ static const struct pid_entry tgid_base_stuff[] = {
2454 REG("environ", S_IRUSR, environ), 2461 REG("environ", S_IRUSR, environ),
2455 INF("auxv", S_IRUSR, pid_auxv), 2462 INF("auxv", S_IRUSR, pid_auxv),
2456 ONE("status", S_IRUGO, pid_status), 2463 ONE("status", S_IRUGO, pid_status),
2464 ONE("personality", S_IRUSR, pid_personality),
2457 INF("limits", S_IRUSR, pid_limits), 2465 INF("limits", S_IRUSR, pid_limits),
2458#ifdef CONFIG_SCHED_DEBUG 2466#ifdef CONFIG_SCHED_DEBUG
2459 REG("sched", S_IRUGO|S_IWUSR, pid_sched), 2467 REG("sched", S_IRUGO|S_IWUSR, pid_sched),
@@ -2789,6 +2797,7 @@ static const struct pid_entry tid_base_stuff[] = {
2789 REG("environ", S_IRUSR, environ), 2797 REG("environ", S_IRUSR, environ),
2790 INF("auxv", S_IRUSR, pid_auxv), 2798 INF("auxv", S_IRUSR, pid_auxv),
2791 ONE("status", S_IRUGO, pid_status), 2799 ONE("status", S_IRUGO, pid_status),
2800 ONE("personality", S_IRUSR, pid_personality),
2792 INF("limits", S_IRUSR, pid_limits), 2801 INF("limits", S_IRUSR, pid_limits),
2793#ifdef CONFIG_SCHED_DEBUG 2802#ifdef CONFIG_SCHED_DEBUG
2794 REG("sched", S_IRUGO|S_IWUSR, pid_sched), 2803 REG("sched", S_IRUGO|S_IWUSR, pid_sched),