linux-stable/arch
Alexander Shishkin b34abf24f2 perf, pt, coresight: Fix address filters for vmas with non-zero offset
[ Upstream commit c60f83b813 ]

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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2020-01-27 14:50:27 +01:00
..
alpha alpha: Fix Eiger NR_IRQS to 128 2019-02-20 10:25:47 +01:00
arc ARC: IOC: panic if kernel was started with previously enabled IOC 2019-12-13 08:51:12 +01:00
arm ARM: dts: lpc32xx: phy3250: fix SD card regulator voltage 2020-01-27 14:50:18 +01:00
arm64 arm64: dts: msm8916: remove bogus argument to the cpu clock 2020-01-27 14:50:20 +01:00
c6x
h8300 h8300: use cc-cross-prefix instead of hardcoding h8300-unknown-linux- 2019-04-05 22:32:55 +02:00
hexagon hexagon: work around compiler crash 2020-01-17 19:47:17 +01:00
ia64 signal/ia64: Use the force_sig(SIGSEGV,...) in ia64_rt_sigreturn 2020-01-27 14:49:56 +01:00
m68k m68k: fix command-line parsing when passed from u-boot 2019-12-01 09:16:22 +01:00
microblaze microblaze: fix multiple bugs in arch/microblaze/boot/Makefile 2019-12-05 09:20:13 +01:00
mips MIPS: BCM63XX: drop unused and broken DSP platform device 2020-01-27 14:50:10 +01:00
nds32 nds32: Fix the items of hwcap_str ordering issue. 2019-12-13 08:51:35 +01:00
nios2
openrisc openrisc: Fix broken paths to arch/or32 2019-12-05 09:20:40 +01:00
parisc parisc: Fix compiler warnings in debug_core.c 2020-01-12 12:17:22 +01:00
powerpc powerpc/64s: Fix logic when handling unknown CPU features 2020-01-27 14:50:26 +01:00
riscv riscv: ftrace: correct the condition logic in function graph tracer 2020-01-09 10:19:02 +01:00
s390 s390/purgatory: do not build purgatory with kcov, kasan and friends 2020-01-12 12:17:21 +01:00
sh media: sh: migor: Include missing dma-mapping header 2020-01-27 14:50:24 +01:00
sparc sparc: Correct ctx->saw_frame_pointer logic. 2019-12-13 08:51:52 +01:00
um um: Make GCOV depend on !KCOV 2019-12-05 09:20:52 +01:00
unicore32
x86 perf, pt, coresight: Fix address filters for vmas with non-zero offset 2020-01-27 14:50:27 +01:00
xtensa xtensa: fix TLB sanity checker 2019-12-21 10:57:25 +01:00
.gitignore
Kconfig jump_label: move 'asm goto' support test to Kconfig 2019-06-04 08:02:34 +02:00