linux/arch/powerpc
Ravi Bangoria 27985b2a64 powerpc/watchpoint: Don't ignore extraneous exceptions blindly
On powerpc, watchpoint match range is double-word granular. On a
watchpoint hit, DAR is set to the first byte of overlap between actual
access and watched range. And thus it's quite possible that DAR does
not point inside user specified range. Ex, say user creates a
watchpoint with address range 0x1004 to 0x1007. So hw would be
configured to watch from 0x1000 to 0x1007. If there is a 4 byte access
from 0x1002 to 0x1005, DAR will point to 0x1002 and thus interrupt
handler considers it as extraneous, but it's actually not, because
part of the access belongs to what user has asked.

Instead of blindly ignoring the exception, get actual address range by
analysing an instruction, and ignore only if actual range does not
overlap with user specified range.

Note: The behavior is unchanged for 8xx.

Signed-off-by: Ravi Bangoria <ravi.bangoria@linux.ibm.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/20191017093204.7511-5-ravi.bangoria@linux.ibm.com
2019-11-13 16:58:03 +11:00
..
boot kbuild: remove ar-option and KBUILD_ARFLAGS 2019-10-01 09:20:33 +09:00
configs powerpc/configs: Rename foo_basic_defconfig to foo_base.config 2019-10-28 21:54:16 +11:00
crypto powerpc/crypto: Add cond_resched() in crc-vpmsum self-test 2019-11-13 16:58:02 +11:00
include powerpc/watchpoint: Fix ptrace code that muck around with address/len 2019-11-13 16:58:03 +11:00
kernel powerpc/watchpoint: Don't ignore extraneous exceptions blindly 2019-11-13 16:58:03 +11:00
kvm powerpc/kvm: Fix kvmppc_vcore->in_guest value in kvmhv_switch_to_host 2019-10-09 17:16:59 +11:00
lib powerpc/memcpy: Fix stack corruption for smaller sizes 2019-09-12 09:27:00 +10:00
math-emu treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 152 2019-05-30 11:26:32 -07:00
mm powerpc: Don't flush caches when adding memory 2019-11-07 23:35:41 +11:00
net Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2019-06-17 20:20:36 -07:00
oprofile treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 333 2019-06-05 17:37:06 +02:00
perf powerpc/perf: fix imc allocation failure handling 2019-08-20 21:22:20 +10:00
platforms powerpc/pseries/cmm: Simulation mode 2019-11-13 16:58:02 +11:00
purgatory treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 441 2019-06-05 17:37:17 +02:00
sysdev KVM: PPC: Book3S HV: use smp_mb() when setting/clearing host_ipi flag 2019-09-24 12:46:26 +10:00
tools powerpc/tools: Don't quote $objdump in scripts 2019-10-30 22:55:12 +11:00
xmon powerpc/watchpoint: Introduce macros for watchpoint length 2019-11-13 16:58:02 +11:00
Kbuild treewide: Add SPDX license identifier - Kbuild 2019-05-30 11:32:33 -07:00
Kconfig Merge branch 'topic/secureboot' into next 2019-11-13 16:55:50 +11:00
Kconfig.debug powerpc/xmon: add read-only mode 2019-05-03 02:54:57 +10:00
Makefile powerpc/configs: Rename foo_basic_defconfig to foo_base.config 2019-10-28 21:54:16 +11:00
Makefile.postlink kbuild: add $(BASH) to run scripts with bash-extension 2019-09-04 22:54:13 +09:00