[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <4AC0E9A4.1020605@redhat.com>
Date: Mon, 28 Sep 2009 12:51:48 -0400
From: Masami Hiramatsu <mhiramat@...hat.com>
To: Steven Rostedt <rostedt@...dmis.org>
CC: Frederic Weisbecker <fweisbec@...il.com>,
Ingo Molnar <mingo@...e.hu>,
lkml <linux-kernel@...r.kernel.org>,
DLE <dle-develop@...ts.sourceforge.net>,
Thomas Gleixner <tglx@...utronix.de>,
Arnaldo Carvalho de Melo <acme@...hat.com>,
Mike Galbraith <efault@....de>,
Paul Mackerras <paulus@...ba.org>,
Peter Zijlstra <a.p.zijlstra@...llo.nl>,
Christoph Hellwig <hch@...radead.org>,
Ananth N Mavinakayanahalli <ananth@...ibm.com>,
Jim Keniston <jkenisto@...ibm.com>,
"Frank Ch. Eigler" <fche@...hat.com>,
systemtap <systemtap@...rceware.org>
Subject: Re: [RFC PATCH tracing/kprobes 4/5] perf: Support perf kprobe command
for kprobe-event setup helper
Steven Rostedt wrote:
> On Fri, 2009-09-25 at 12:15 -0700, Masami Hiramatsu wrote:
>
>> +
>> +#define MAX_CMDLEN 256
>> +
>> +static int synthesize_probepoint(struct probe_point *pp)
>> +{
>> + char *buf;
>> + int i, len, ret;
>> + pp->probes[0] = buf = (char *)calloc(MAX_CMDLEN, sizeof(char));
>> + len = snprintf(buf, MAX_CMDLEN, "%s+%d", pp->function, pp->offset);
>
> What happens if func and offset is too big for MAX_CMDLEN?
Oops, it must be checked.
>
>> + for (i = 0; i< pp->nr_args; i++) {
>
> Can you have a case where pp->nr_args == 0?
Sure, I'll check that.
Thank you!
--
Masami Hiramatsu
Software Engineer
Hitachi Computer Products (America), Inc.
Software Solutions Division
e-mail: mhiramat@...hat.com
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists