public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Jiri Olsa <jolsa@redhat.com>
To: Stephane Eranian <eranian@google.com>
Cc: LKML <linux-kernel@vger.kernel.org>,
	Namhyung Kim <namhyung@kernel.org>,
	Arnaldo Carvalho de Melo <acme@redhat.com>,
	Peter Zijlstra <peterz@infradead.org>,
	"mingo@elte.hu" <mingo@elte.hu>, David Ahern <dsahern@gmail.com>
Subject: Re: [BUG] perf tools: off-by-one error in map_groups__find_ams()
Date: Fri, 3 Oct 2014 10:09:20 +0200	[thread overview]
Message-ID: <20141003080920.GE19087@krava.brq.redhat.com> (raw)
In-Reply-To: <CABPqkBRrBttsL6maPCjXuQXhCmEYLWVYVpmQaMYihXcRy2k_-g@mail.gmail.com>

On Thu, Oct 02, 2014 at 06:40:14PM +0200, Stephane Eranian wrote:
> On Thu, Oct 2, 2014 at 10:36 AM, Jiri Olsa <jolsa@redhat.com> wrote:
> > On Wed, Oct 01, 2014 at 09:16:31PM +0200, Stephane Eranian wrote:
> >> Hi,
> >>
> >> It appears that there is a off-by-one bug in map_groups__find_ams().
> >> The upper-bound check in the test below should be >= because
> >> end = start + len; The end address is outside the range.
> >>
> >> Please confirm.
> >>
> >>
> >> int map_groups__find_ams(struct addr_map_symbol *ams, symbol_filter_t filter)
> >> {
> >>                 if (ams->addr < ams->map->start || ams->addr > ams->map->end) {
> >
> > yep, looks like bug to me
> >
> Are you providing a fix or should I?

please go ahead

jirka

  reply	other threads:[~2014-10-03  8:10 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-10-01 19:16 [BUG] perf tools: off-by-one error in map_groups__find_ams() Stephane Eranian
2014-10-02  8:36 ` Jiri Olsa
2014-10-02 16:40   ` Stephane Eranian
2014-10-03  8:09     ` Jiri Olsa [this message]
2014-10-03 10:07       ` Stephane Eranian

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=20141003080920.GE19087@krava.brq.redhat.com \
    --to=jolsa@redhat.com \
    --cc=acme@redhat.com \
    --cc=dsahern@gmail.com \
    --cc=eranian@google.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=namhyung@kernel.org \
    --cc=peterz@infradead.org \
    /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