linux-stable/include
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
..
acpi ACPICA: ACPI 6.3: PPTT add additional fields in Processor Structure Flags 2019-10-17 13:45:33 -07:00
asm-generic asm-generic: fix -Wtype-limits compiler warnings 2019-08-25 10:47:58 +02:00
clocksource
crypto crypto: chacha20 - Fix chacha20_block() keystream alignment (again) 2019-11-20 18:47:11 +01:00
drm drm: mst: Fix query_payload ack reply struct 2019-12-31 16:34:47 +01:00
dt-bindings dt-bindings: reset: meson8b: fix duplicate reset IDs 2020-01-23 08:21:26 +01:00
keys keys: Fix dependency loop between construction record and auth key 2019-03-23 20:09:48 +01:00
kvm KVM: arm/arm64: Sync ICH_VMCR_EL2 back when about to block 2019-08-25 10:47:59 +02:00
linux perf, pt, coresight: Fix address filters for vmas with non-zero offset 2020-01-27 14:50:27 +01:00
math-emu math-emu/soft-fp.h: (_FP_ROUND_ZERO) cast 0 to void to fix warning 2019-12-13 08:51:34 +01:00
media media: vsp1: Fix YCbCr planar formats pitch calculation 2019-11-20 18:46:52 +01:00
memory
misc
net cfg80211/mac80211: make ieee80211_send_layer2_update a public function 2020-01-17 19:46:55 +01:00
pcmcia
ras
rdma IB/mlx4: Avoid implicit enumerated type conversion 2019-11-24 08:20:04 +01:00
scsi scsi: target: iscsi: Wait for all commands to finish before freeing a session 2020-01-04 19:13:06 +01:00
soc soc/tegra: pmc: Fix pad voltage configuration for Tegra186 2019-11-20 18:45:24 +01:00
sound ASoC: wm97xx: fix uninitialized regmap pointer problem 2020-01-27 14:50:01 +01:00
target scsi: target/core: Make sure that target_wait_for_sess_cmds() waits long enough 2019-01-26 09:32:38 +01:00
trace tracing: Change offset type to s32 in preempt/irq tracepoints 2020-01-14 20:07:00 +01:00
uapi Input: input_event - fix struct padding on sparc64 2020-01-14 20:07:01 +01:00
video udlfb: introduce a rendering mutex 2019-05-25 18:23:30 +02:00
xen xen/events: fix binding user event channels to cpus 2019-07-26 09:14:25 +02:00