lkml.org 
[lkml]   [2011]   [Jan]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH] Switch proc interfaces in kernel/ to %pK
From
Date
On Wed, 2011-01-19 at 10:29 +0900, Masami Hiramatsu wrote:
> (2011/01/19 7:51), Dan Rosenberg wrote:
> > Switch users of %p in /proc interfaces in kernel/ to %pK, to allow
> > configuring the level of exposure of kernel pointers via the
> > kptr_restrict sysctl.
>
> This report_probe interface is at /sys/kernel/debug/kprobes/list.
> Is that policy applied to debugfs interface (for debug) too?
> # in that case, you might update ftrace and perf tracing interfaces...
>

There's no reason to not update ftrace and perf too, since I'd assume no
one is using debugging interfaces without root privileges anyway. I'll
add them to my list.

> > diff --git a/kernel/kprobes.c b/kernel/kprobes.c
> > index 7798181..2437ca4 100644
> > --- a/kernel/kprobes.c
> > +++ b/kernel/kprobes.c
> > @@ -2021,11 +2021,11 @@ static void __kprobes report_probe(struct seq_file *pi, struct kprobe *p,
> > kprobe_type = "k";
> >
> > if (sym)
> > - seq_printf(pi, "%p %s %s+0x%x %s ",
> > + seq_printf(pi, "%pK %s %s+0x%x %s ",
> > p->addr, kprobe_type, sym, offset,
> > (modname ? modname : " "));
> > else
> > - seq_printf(pi, "%p %s %p ",
> > + seq_printf(pi, "%pK %s %pK ",
> > p->addr, kprobe_type, p->addr);
> >
> > if (!pp)
>
>
> --
> Masami HIRAMATSU
> 2nd Dept. Linux Technology Center
> Hitachi, Ltd., Systems Development Laboratory
> E-mail: masami.hiramatsu.pt@hitachi.com




\
 
 \ /
  Last update: 2011-01-19 16:07    [W:1.994 / U:0.012 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site