lkml.org 
[lkml]   [2010]   [Feb]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] tracing/kprobes: fix probe parsing
Heiko Carstens wrote:
> From: Heiko Carstens <heiko.carstens@de.ibm.com>
>
> Trying to add a probe like
>
> echo p:myprobe 0x10000 > /sys/kernel/debug/tracing/kprobe_events
>
> will fail since the wrong pointer is passed to strict_strtoul
> when trying to convert the address to an unsigned long.

Right, it's a bug! Thank you!


>
> Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>

Acked-by: Masami Hiramatsu <mhiramat@redhat.com>

> ---
> kernel/trace/trace_kprobe.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> --- a/kernel/trace/trace_kprobe.c
> +++ b/kernel/trace/trace_kprobe.c
> @@ -689,7 +689,7 @@ static int create_trace_probe(int argc,
> return -EINVAL;
> }
> /* an address specified */
> - ret = strict_strtoul(&argv[0][2], 0, (unsigned long *)&addr);
> + ret = strict_strtoul(&argv[1][0], 0, (unsigned long *)&addr);
> if (ret) {
> pr_info("Failed to parse address.\n");
> return ret;

--
Masami Hiramatsu

Software Engineer
Hitachi Computer Products (America), Inc.
Software Solutions Division

e-mail: mhiramat@redhat.com



\
 
 \ /
  Last update: 2010-02-10 23:29    [W:0.063 / U:0.344 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site