* [PATCH] proc: hide kernel addresses via %pK in /proc/<pid>/stack
@ 2011-02-21 19:11 Konstantin Khlebnikov
2011-02-21 19:36 ` Kees Cook
0 siblings, 1 reply; 2+ messages in thread
From: Konstantin Khlebnikov @ 2011-02-21 19:11 UTC (permalink / raw)
To: linux-kernel; +Cc: Kees Cook, Andrew Morton, Alexey Dobriyan
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>
---
fs/proc/base.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/fs/proc/base.c b/fs/proc/base.c
index 9d096e8..4fa8dc6 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,
save_stack_trace_tsk(task, &trace);
for (i = 0; i < trace.nr_entries; i++) {
- seq_printf(m, "[<%p>] %pS\n",
+ seq_printf(m, "[<%pK>] %pS\n",
(void *)entries[i], (void *)entries[i]);
}
kfree(entries);
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2011-02-21 19:36 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-02-21 19:11 [PATCH] proc: hide kernel addresses via %pK in /proc/<pid>/stack Konstantin Khlebnikov
2011-02-21 19:36 ` Kees Cook
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.