[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <87k13axoda.fsf@mpe.ellerman.id.au>
Date: Tue, 24 Mar 2020 17:23:29 +1100
From: Michael Ellerman <mpe@...erman.id.au>
To: Christophe Leroy <christophe.leroy@....fr>,
Benjamin Herrenschmidt <benh@...nel.crashing.org>,
Paul Mackerras <paulus@...ba.org>, mikey@...ling.org
Cc: linux-kernel@...r.kernel.org, linuxppc-dev@...ts.ozlabs.org
Subject: Re: [PATCH v5 10/13] powerpc/ptrace: split out ADV_DEBUG_REGS related functions.
Christophe Leroy <christophe.leroy@....fr> writes:
> On 03/20/2020 02:12 AM, Michael Ellerman wrote:
>> Christophe Leroy <christophe.leroy@....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@....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
Powered by blists - more mailing lists