[PATCH v5 10/13] powerpc/ptrace: split out ADV_DEBUG_REGS related functions.
Michael Ellerman
mpe at ellerman.id.au
Tue Mar 24 17:23:29 AEDT 2020
Christophe Leroy <christophe.leroy at c-s.fr> writes:
> On 03/20/2020 02:12 AM, Michael Ellerman wrote:
>> Christophe Leroy <christophe.leroy at c-s.fr> writes:
>>> Move ADV_DEBUG_REGS functions out of ptrace.c, into
>>> ptrace-adv.c and ptrace-noadv.c
>>>
>>> Signed-off-by: Christophe Leroy <christophe.leroy at c-s.fr>
>>> ---
>>> v4: Leave hw_breakpoint.h for ptrace.c
>>> ---
>>> arch/powerpc/kernel/ptrace/Makefile | 4 +
>>> arch/powerpc/kernel/ptrace/ptrace-adv.c | 468 ++++++++++++++++
>>> arch/powerpc/kernel/ptrace/ptrace-decl.h | 5 +
>>> arch/powerpc/kernel/ptrace/ptrace-noadv.c | 236 ++++++++
>>> arch/powerpc/kernel/ptrace/ptrace.c | 650 ----------------------
>>> 5 files changed, 713 insertions(+), 650 deletions(-)
>>> create mode 100644 arch/powerpc/kernel/ptrace/ptrace-adv.c
>>> create mode 100644 arch/powerpc/kernel/ptrace/ptrace-noadv.c
>>
>> This is somehow breaking the ptrace-hwbreak selftest on Power8:
>>
>> test: ptrace-hwbreak
>> tags: git_version:v5.6-rc6-892-g7a285a6067d6
>> PTRACE_SET_DEBUGREG, WO, len: 1: Ok
>> PTRACE_SET_DEBUGREG, WO, len: 2: Ok
>> PTRACE_SET_DEBUGREG, WO, len: 4: Ok
>> PTRACE_SET_DEBUGREG, WO, len: 8: Ok
>> PTRACE_SET_DEBUGREG, RO, len: 1: Ok
>> PTRACE_SET_DEBUGREG, RO, len: 2: Ok
>> PTRACE_SET_DEBUGREG, RO, len: 4: Ok
>> PTRACE_SET_DEBUGREG, RO, len: 8: Ok
>> PTRACE_SET_DEBUGREG, RW, len: 1: Ok
>> PTRACE_SET_DEBUGREG, RW, len: 2: Ok
>> PTRACE_SET_DEBUGREG, RW, len: 4: Ok
>> PTRACE_SET_DEBUGREG, RW, len: 8: Ok
>> PPC_PTRACE_SETHWDEBUG, MODE_EXACT, WO, len: 1: Ok
>> PPC_PTRACE_SETHWDEBUG, MODE_EXACT, RO, len: 1: Ok
>> PPC_PTRACE_SETHWDEBUG, MODE_EXACT, RW, len: 1: Ok
>> PPC_PTRACE_SETHWDEBUG, MODE_RANGE, DW ALIGNED, WO, len: 6: Ok
>> PPC_PTRACE_SETHWDEBUG, MODE_RANGE, DW ALIGNED, RO, len: 6: Ok
>> PPC_PTRACE_SETHWDEBUG, MODE_RANGE, DW ALIGNED, RW, len: 6: Ok
>> PPC_PTRACE_SETHWDEBUG, MODE_RANGE, DW UNALIGNED, WO, len: 6: Ok
>> PPC_PTRACE_SETHWDEBUG, MODE_RANGE, DW UNALIGNED, RO, len: 6: Fail
>> failure: ptrace-hwbreak
>>
>> I haven't had time to work out why yet.
>>
>
> A (big) part of commit c3f68b0478e7 ("powerpc/watchpoint: Fix ptrace
> code that muck around with address/len") was lost during rebase.
>
> I'll send a fix, up to you to squash it in or commit it as is.
Thanks.
cheers
More information about the Linuxppc-dev
mailing list