linux/kernel/events
Alexander Shishkin c60f83b813 perf, pt, coresight: Fix address filters for vmas with non-zero offset
Currently, the address range calculation for file-based filters works as
long as the vma that maps the matching part of the object file starts
from offset zero into the file (vm_pgoff==0). Otherwise, the resulting
filter range would be off by vm_pgoff pages. Another related problem is
that in case of a partially matching vma, that is, a vma that matches
part of a filter region, the filter range size wouldn't be adjusted.

Fix the arithmetics around address filter range calculations, taking
into account vma offset, so that the entire calculation is done before
the filter configuration is passed to the PMU drivers instead of having
those drivers do the final bit of arithmetics.

Based on the patch by Adrian Hunter <adrian.hunter.intel.com>.

Reported-by: Adrian Hunter <adrian.hunter@intel.com>
Signed-off-by: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Tested-by: Mathieu Poirier <mathieu.poirier@linaro.org>
Acked-by: Peter Zijlstra <peterz@infradead.org>
Cc: Jiri Olsa <jolsa@redhat.com>
Fixes: 375637bc52 ("perf/core: Introduce address range filtering")
Link: http://lkml.kernel.org/r/20190215115655.63469-3-alexander.shishkin@linux.intel.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2019-02-22 16:52:07 -03:00
..
callchain.c perf/core: Convert to SPDX license identifiers 2019-02-04 08:46:11 +01:00
core.c perf, pt, coresight: Fix address filters for vmas with non-zero offset 2019-02-22 16:52:07 -03:00
hw_breakpoint.c perf/hw_breakpoints: Convert to SPDX license identifier 2019-02-04 08:46:13 +01:00
internal.h perf/ring_buffer: Convert ring_buffer.aux_refcount to refcount_t 2019-02-04 08:46:17 +01:00
Makefile License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
ring_buffer.c perf/aux: Make perf_event accessible to setup_aux() 2019-02-06 10:00:39 -03:00
uprobes.c perf/uprobes: Convert to SPDX license identifier 2019-02-04 08:46:13 +01:00