]> git.baikalelectronics.ru Git - kernel.git/commit
powerpc/watchpoint: Fix ptrace code that muck around with address/len
authorRavi Bangoria <ravi.bangoria@linux.ibm.com>
Thu, 17 Oct 2019 09:32:00 +0000 (15:02 +0530)
committerMichael Ellerman <mpe@ellerman.id.au>
Wed, 13 Nov 2019 05:58:03 +0000 (16:58 +1100)
commitaea19dc86f8a729318b9a0d16d4c5fec55cf11e6
treec8c2545d2cf02494492a4b68199f7710d6e73feb
parentc17de71aeb0b40955ddadb06a4e7a8c488309be5
powerpc/watchpoint: Fix ptrace code that muck around with address/len

ptrace_set_debugreg() does not consider new length while overwriting
the watchpoint. Fix that. ppc_set_hwdebug() aligns watchpoint address
to doubleword boundary but does not change the length. If address
range is crossing doubleword boundary and length is less then 8, we
will lose samples from second doubleword. So fix that as well.

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-4-ravi.bangoria@linux.ibm.com
arch/powerpc/include/asm/hw_breakpoint.h
arch/powerpc/kernel/ptrace.c