From: Arnaldo Carvalho de Melo <acme@infradead.org>
To: Han Pingtian <phan@redhat.com>
Cc: linux-kernel@vger.kernel.org
Subject: Re: [PATCH] perf: fix buffer overflow error caused by specifying all tracepoints with -e option
Date: Thu, 6 Jan 2011 16:30:12 -0200 [thread overview]
Message-ID: <20110106183012.GD5315@ghostprotocols.net> (raw)
In-Reply-To: <20110106093922.GB6713@hpt.nay.redhat.com>
Em Thu, Jan 06, 2011 at 05:39:22PM +0800, Han Pingtian escreveu:
> I found when specifying all tracepoints with -e to one of subcommand,
> such as 'top', the program will trigger a buffer overflow error, like
> this:
>
> *** buffer overflow detected ***: ./perf terminated
> ======= Backtrace: =========
<SNIP>
> ....
> The tracepoints are separated by comma, something like this:
>
> perf top -e ...,kmem:kmalloc,kmem:kfree,kmem:kmem_cache_free,...
>
> This comment will fix this problem.
>
> The root reason of this problem is that store_event_type() is called
> with all the events, and will overflow the 'filename' at
>
> strncat(filename, orgname, strlen(orgname));
>
> The comments will try to call store_event_type() when the event name has
> been found out.
s/comments/patch/g, right? Other than that looks fine, applying.
- Arnaldo
next parent reply other threads:[~2011-01-06 18:30 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20110106093922.GB6713@hpt.nay.redhat.com>
2011-01-06 18:30 ` Arnaldo Carvalho de Melo [this message]
2011-01-07 3:16 ` [PATCH] perf: fix buffer overflow error caused by specifying all tracepoints with -e option Pingtian Han
2011-01-07 15:30 ` [tip:perf/core] perf tools: Fix buffer overflow error when specifying all tracepoints tip-bot for Han Pingtian
2011-01-06 10:08 [PATCH] perf: fix buffer overflow error caused by specifying all tracepoints with -e option Han Pingtian
2011-01-06 10:08 ` Han Pingtian
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20110106183012.GD5315@ghostprotocols.net \
--to=acme@infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=phan@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox