Commit f5903085 authored by Kees Cook's avatar Kees Cook Committed by Ingo Molnar

timer debug: Hide kernel addresses via %pK in /proc/timer_list

In the continuing effort to avoid kernel addresses leaking to
unprivileged users, this patch switches to %pK for
/proc/timer_list reporting.
Signed-off-by: default avatarKees Cook <kees.cook@canonical.com>
Cc: John Stultz <johnstul@us.ibm.com>
Cc: Dan Rosenberg <drosenberg@vsecurity.com>
Cc: Eugene Teo <eugeneteo@kernel.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
LKML-Reference: <20110212032125.GA23571@outflux.net>
Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
parent d2478521
...@@ -41,7 +41,7 @@ static void print_name_offset(struct seq_file *m, void *sym) ...@@ -41,7 +41,7 @@ static void print_name_offset(struct seq_file *m, void *sym)
char symname[KSYM_NAME_LEN]; char symname[KSYM_NAME_LEN];
if (lookup_symbol_name((unsigned long)sym, symname) < 0) if (lookup_symbol_name((unsigned long)sym, symname) < 0)
SEQ_printf(m, "<%p>", sym); SEQ_printf(m, "<%pK>", sym);
else else
SEQ_printf(m, "%s", symname); SEQ_printf(m, "%s", symname);
} }
...@@ -112,7 +112,7 @@ print_active_timers(struct seq_file *m, struct hrtimer_clock_base *base, ...@@ -112,7 +112,7 @@ print_active_timers(struct seq_file *m, struct hrtimer_clock_base *base,
static void static void
print_base(struct seq_file *m, struct hrtimer_clock_base *base, u64 now) print_base(struct seq_file *m, struct hrtimer_clock_base *base, u64 now)
{ {
SEQ_printf(m, " .base: %p\n", base); SEQ_printf(m, " .base: %pK\n", base);
SEQ_printf(m, " .index: %d\n", SEQ_printf(m, " .index: %d\n",
base->index); base->index);
SEQ_printf(m, " .resolution: %Lu nsecs\n", SEQ_printf(m, " .resolution: %Lu nsecs\n",
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment