aboutsummaryrefslogtreecommitdiffstats
path: root/tools/testing/selftests/powerpc/ptrace/ptrace-hwbreak.c
diff options
context:
space:
mode:
authorRavi Bangoria <ravi.bangoria@linux.ibm.com>2019-10-17 15:02:01 +0530
committerMichael Ellerman <mpe@ellerman.id.au>2019-11-13 16:58:03 +1100
commit27985b2a640e24ce51810aadd0e93d5e0833c9b7 (patch)
treee4d4497dd60ae135c9d5b59dbbee8e2643699390 /tools/testing/selftests/powerpc/ptrace/ptrace-hwbreak.c
parentpowerpc/watchpoint: Fix ptrace code that muck around with address/len (diff)
downloadlinux-dev-27985b2a640e24ce51810aadd0e93d5e0833c9b7.tar.xz
linux-dev-27985b2a640e24ce51810aadd0e93d5e0833c9b7.zip
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
Diffstat (limited to '')
0 files changed, 0 insertions, 0 deletions