[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20141008155348.GD2256@redhat.com>
Date: Wed, 8 Oct 2014 12:53:48 -0300
From: Arnaldo Carvalho de Melo <acme@...hat.com>
To: Chuck Ebbert <cebbert.lkml@...il.com>
Cc: Namhyung Kim <namhyung@...nel.org>,
Stephane Eranian <eranian@...gle.com>,
linux-kernel@...r.kernel.org, jolsa@...hat.com,
peterz@...radead.org, mingo@...e.hu, dsahern@...il.com
Subject: Re: [PATCH v2] perf tools: fix off-by-one error in maps
Em Tue, Oct 07, 2014 at 01:58:38PM -0500, Chuck Ebbert escreveu:
> On Tue, 7 Oct 2014 11:00:50 -0300
> Arnaldo Carvalho de Melo <acme@...hat.com> wrote:
>
> > I keep thinking that this change is making things unclear.
> >
> > I.e. the _start_ of a map (map->start) is _in_ the map, and the _end_
> > of a map (map->end) is _in_ the map as well.
> >
> > if (addr > m->end)
> >
> > is shorter than:
> >
> > if (addr >= m->end)
> >
> > "start" and "end" should have the same rule applied, i.e. if one is in,
> > the other is in as well.
> >
> > Etc.
> >
>
> But the convention used in the memory management code is that "end" is
> the next byte after the memory region. This gives you:
>
> size = end - start
> end = start + size
>
> Using a different convention here will just confuse people used to the
> way it's done everywhere else.
So we should continue using some confusing convention because that is
the way that things are? :-\
- Arnaldo
--
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