summaryrefslogtreecommitdiff
path: root/tools/perf/util/header.h
diff options
context:
space:
mode:
authorStephane Eranian <eranian@google.com>2014-10-06 10:35:32 +0200
committerArnaldo Carvalho de Melo <acme@redhat.com>2014-10-14 17:50:55 -0300
commit77faf4d060e3ee1fd2ff6cd39f2b2eb887100422 (patch)
tree83cd85024f39ff4b4f3c473f509a2e92c494fd5f /tools/perf/util/header.h
parente167f995e26249aa93708589c5eea539652351fa (diff)
perf tools: fix off-by-one error in maps
This patch fixes off-by-one errors in the management of maps. A map is defined by start address and length as implemented by map__new(): map__init(map, type, start, start + len, pgoff, dso); map->start = addr; map->end = end; Consequently, the actual address range is [start; end[ map->end is the first byte outside the range. This patch fixes two bugs where upper bound checking was off-by-one. In V2, we fix map_groups__fixup_overlappings() some more where map->start was off-by-one as reported by Jiri. Signed-off-by: Stephane Eranian <eranian@google.com> Acked-by: Namhyung Kim <namhyung@kernel.org> Cc: David Ahern <dsahern@gmail.com> Cc: Ingo Molnar <mingo@kernel.org> Cc: Jiri Olsa <jolsa@redhat.com> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Peter Zijlstra <peterz@infradead.org> Link: http://lkml.kernel.org/r/20141006083532.GA4850@quad Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/util/header.h')
0 files changed, 0 insertions, 0 deletions