From aa4cfdad0c484637f120811467da9a09a8d83d76 Mon Sep 17 00:00:00 2001 From: Kees Cook Date: Mon, 6 Oct 2008 03:11:58 +0400 Subject: [PATCH] --- yaml --- r: 113676 b: refs/heads/master c: 478307230810d7e2a753ed220db9066dfdf88718 h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/fs/proc/base.c | 9 +++++++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/[refs] b/[refs] index 90c3298a35d3..336701bd2517 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: a6bebbc87a8c16eabb6bd5c6fd2d994be0236fba +refs/heads/master: 478307230810d7e2a753ed220db9066dfdf88718 diff --git a/trunk/fs/proc/base.c b/trunk/fs/proc/base.c index bb63fa1d34a2..c1332dd2575d 100644 --- a/trunk/fs/proc/base.c +++ b/trunk/fs/proc/base.c @@ -2438,6 +2438,13 @@ static int proc_tgid_io_accounting(struct task_struct *task, char *buffer) } #endif /* CONFIG_TASK_IO_ACCOUNTING */ +static int proc_pid_personality(struct seq_file *m, struct pid_namespace *ns, + struct pid *pid, struct task_struct *task) +{ + seq_printf(m, "%08x\n", task->personality); + return 0; +} + /* * Thread groups */ @@ -2454,6 +2461,7 @@ static const struct pid_entry tgid_base_stuff[] = { REG("environ", S_IRUSR, environ), INF("auxv", S_IRUSR, pid_auxv), ONE("status", S_IRUGO, pid_status), + ONE("personality", S_IRUSR, pid_personality), INF("limits", S_IRUSR, pid_limits), #ifdef CONFIG_SCHED_DEBUG REG("sched", S_IRUGO|S_IWUSR, pid_sched), @@ -2789,6 +2797,7 @@ static const struct pid_entry tid_base_stuff[] = { REG("environ", S_IRUSR, environ), INF("auxv", S_IRUSR, pid_auxv), ONE("status", S_IRUGO, pid_status), + ONE("personality", S_IRUSR, pid_personality), INF("limits", S_IRUSR, pid_limits), #ifdef CONFIG_SCHED_DEBUG REG("sched", S_IRUGO|S_IWUSR, pid_sched),