Re: [PATCH] Switch proc interfaces in kernel/ to %pK
From: Masami Hiramatsu
Date: Wed Jan 19 2011 - 20:18:52 EST
(2011/01/20 0:04), Dan Rosenberg wrote:
> 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.
OK, I see.
Acked-by: Masami Hiramatsu <masami.hiramatsu.pt@xxxxxxxxxxx>
>>> 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
>
>
--
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/