aboutsummaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
authorKonstantin Khlebnikov <khlebnikov@openvz.org>2011-03-23 19:42:48 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2011-03-23 22:46:36 -0400
commit51e031496d50f87ff519a63cfd4fc2f415f03336 (patch)
tree75c177b8aeba82fffb80960eed1c77bb4188c362 /fs
parent523fb486bfd94e3a3b16a42bcb21b1959cf14df8 (diff)
proc: hide kernel addresses via %pK in /proc/<pid>/stack
This file is readable for the task owner. Hide kernel addresses from unprivileged users, leave them function names and offsets. Signed-off-by: Konstantin Khlebnikov <khlebnikov@openvz.org> Acked-by: Kees Cook <kees.cook@canonical.com> Cc: Alexey Dobriyan <adobriyan@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'fs')
-rw-r--r--fs/proc/base.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/proc/base.c b/fs/proc/base.c
index d49c4b5d2c3e..c3af15e9c070 100644
--- a/fs/proc/base.c
+++ b/fs/proc/base.c
@@ -340,7 +340,7 @@ static int proc_pid_stack(struct seq_file *m, struct pid_namespace *ns,
340 save_stack_trace_tsk(task, &trace); 340 save_stack_trace_tsk(task, &trace);
341 341
342 for (i = 0; i < trace.nr_entries; i++) { 342 for (i = 0; i < trace.nr_entries; i++) {
343 seq_printf(m, "[<%p>] %pS\n", 343 seq_printf(m, "[<%pK>] %pS\n",
344 (void *)entries[i], (void *)entries[i]); 344 (void *)entries[i], (void *)entries[i]);
345 } 345 }
346 kfree(entries); 346 kfree(entries);