All of lore.kernel.org
 help / color / mirror / Atom feed
From: Stephane Eranian <eranian@google.com>
To: LKML <linux-kernel@vger.kernel.org>
Cc: Jiri Olsa <jolsa@redhat.com>, 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: [BUG] perf tools: off-by-one error in map_groups__find_ams()
Date: Wed, 1 Oct 2014 21:16:31 +0200	[thread overview]
Message-ID: <CABPqkBQPjpgD_5n0ZMmx971+YO86CO+5mSfcg7a1p4Ys_TgOUA@mail.gmail.com> (raw)

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) {

             reply	other threads:[~2014-10-01 19:16 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-10-01 19:16 Stephane Eranian [this message]
2014-10-02  8:36 ` [BUG] perf tools: off-by-one error in map_groups__find_ams() Jiri Olsa
2014-10-02 16:40   ` Stephane Eranian
2014-10-03  8:09     ` Jiri Olsa
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=CABPqkBQPjpgD_5n0ZMmx971+YO86CO+5mSfcg7a1p4Ys_TgOUA@mail.gmail.com \
    --to=eranian@google.com \
    --cc=acme@redhat.com \
    --cc=dsahern@gmail.com \
    --cc=jolsa@redhat.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.