LKML Archive mirror
 help / color / mirror / Atom feed
* [PATCH] hide kernel addresses via %pK in /proc/timer_list
@ 2011-02-12  3:21 Kees Cook
  2011-02-13  1:34 ` [tip:timers/urgent] timer debug: Hide " tip-bot for Kees Cook
  0 siblings, 1 reply; 2+ messages in thread
From: Kees Cook @ 2011-02-12  3:21 UTC (permalink / raw
  To: linux-kernel; +Cc: Thomas Gleixner, John Stultz, Dan Rosenberg, Eugene Teo

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: Kees Cook <kees.cook@canonical.com>
---
Please ignore Message-ID: <20110212031935.GA23210@outflux.net> which broke
the headers. I hate my MUA.

 kernel/time/timer_list.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/kernel/time/timer_list.c b/kernel/time/timer_list.c
index 32a19f9..3258455 100644
--- a/kernel/time/timer_list.c
+++ b/kernel/time/timer_list.c
@@ -41,7 +41,7 @@ static void print_name_offset(struct seq_file *m, void *sym)
 	char symname[KSYM_NAME_LEN];
 
 	if (lookup_symbol_name((unsigned long)sym, symname) < 0)
-		SEQ_printf(m, "<%p>", sym);
+		SEQ_printf(m, "<%pK>", sym);
 	else
 		SEQ_printf(m, "%s", symname);
 }
@@ -112,7 +112,7 @@ next_one:
 static void
 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",
 			base->index);
 	SEQ_printf(m, "  .resolution: %Lu nsecs\n",
-- 
1.7.2.3

-- 
Kees Cook
Ubuntu Security Team

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* [tip:timers/urgent] timer debug: Hide kernel addresses via %pK in /proc/timer_list
  2011-02-12  3:21 [PATCH] hide kernel addresses via %pK in /proc/timer_list Kees Cook
@ 2011-02-13  1:34 ` tip-bot for Kees Cook
  0 siblings, 0 replies; 2+ messages in thread
From: tip-bot for Kees Cook @ 2011-02-13  1:34 UTC (permalink / raw
  To: linux-tip-commits
  Cc: linux-kernel, hpa, mingo, torvalds, johnstul, drosenberg,
	kees.cook, eugeneteo, tglx, mingo

Commit-ID:  f590308536db432e4747f562b29e5858123938e9
Gitweb:     http://git.kernel.org/tip/f590308536db432e4747f562b29e5858123938e9
Author:     Kees Cook <kees.cook@canonical.com>
AuthorDate: Fri, 11 Feb 2011 19:21:25 -0800
Committer:  Ingo Molnar <mingo@elte.hu>
CommitDate: Sat, 12 Feb 2011 14:11:56 +0100

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: Kees 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: Ingo Molnar <mingo@elte.hu>
---
 kernel/time/timer_list.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/kernel/time/timer_list.c b/kernel/time/timer_list.c
index 32a19f9..3258455 100644
--- a/kernel/time/timer_list.c
+++ b/kernel/time/timer_list.c
@@ -41,7 +41,7 @@ static void print_name_offset(struct seq_file *m, void *sym)
 	char symname[KSYM_NAME_LEN];
 
 	if (lookup_symbol_name((unsigned long)sym, symname) < 0)
-		SEQ_printf(m, "<%p>", sym);
+		SEQ_printf(m, "<%pK>", sym);
 	else
 		SEQ_printf(m, "%s", symname);
 }
@@ -112,7 +112,7 @@ next_one:
 static void
 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",
 			base->index);
 	SEQ_printf(m, "  .resolution: %Lu nsecs\n",

^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2011-02-13  1:34 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-02-12  3:21 [PATCH] hide kernel addresses via %pK in /proc/timer_list Kees Cook
2011-02-13  1:34 ` [tip:timers/urgent] timer debug: Hide " tip-bot for Kees Cook

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).