[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20110221191121.5764.81241.stgit@localhost6>
Date: Mon, 21 Feb 2011 22:11:21 +0300
From: Konstantin Khlebnikov <khlebnikov@...nvz.org>
To: linux-kernel@...r.kernel.org
Cc: Kees Cook <kees.cook@...onical.com>,
Andrew Morton <akpm@...ux-foundation.org>,
Alexey Dobriyan <adobriyan@...il.com>
Subject: [PATCH] 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@...nvz.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);
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists