Re: [PATCH] Switch proc interfaces in kernel/ to %pK

From: Masami Hiramatsu
Date: Tue Jan 18 2011 - 20:30:08 EST


(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...

> 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@xxxxxxxxxxx
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/