lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <65e1c9b3-5cdf-1e51-0086-23cdc4e14bb1@linux.ibm.com>
Date:   Mon, 14 Oct 2019 09:14:18 +0530
From:   Ravi Bangoria <ravi.bangoria@...ux.ibm.com>
To:     Christophe Leroy <christophe.leroy@....fr>
Cc:     mpe@...erman.id.au, mikey@...ling.org, npiggin@...il.com,
        benh@...nel.crashing.org, paulus@...ba.org,
        naveen.n.rao@...ux.vnet.ibm.com, linuxppc-dev@...ts.ozlabs.org,
        linux-kernel@...r.kernel.org,
        Ravi Bangoria <ravi.bangoria@...ux.ibm.com>
Subject: Re: [PATCH v4 0/5] Powerpc/Watchpoint: Few important fixes



On 10/12/19 1:01 PM, Christophe Leroy wrote:
> 
> 
> Le 10/10/2019 à 08:25, Ravi Bangoria a écrit :
>>
>>
>> On 10/10/19 10:14 AM, Ravi Bangoria wrote:
>>>
>>>>> @Christophe, Is patch5 works for you on 8xx?
>>>>>
>>>>
>>>> Getting the following :
>>>>
>>>> root@...ip:~# ./ptrace-hwbreak
>>>> test: ptrace-hwbreak
>>>> tags: git_version:v5.4-rc2-710-gf0082e173fe4-dirty
>>>> 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: Fail
>>>> failure: ptrace-hwbreak
>>>>
>>>
>>> Thanks Christophe. I don't have any 8xx box. I checked qemu and it seems
>>> qemu emulation for 8xx is not yet supported. So I can't debug this. Can
>>> you please check why it's failing?
>>
>> PPC_PTRACE_SETHWDEBUG internally uses DAWR register and probably 8xx does
>> not emulate DAWR logic, it only uses DABR to emulate double-word watchpoint.
>> In that case, all testcases that uses PPC_PTRACE_SETHWDEBUG should be
>> disabled for 8xx. I'll change [PATCH 5] accordingly and resend.
> 
> I think the MODE_EXACT ones are OK with the 8xx at the time being.

Ok. I'll disable other tests for 8xx.

Also, I was bit wrong in above point. Actually, PPC_PTRACE_SETHWDEBUG with RANGE
breakpoint also support DABR but the length will be 8 only. So I've to change my
patch 1 also a bit (ptrace stuff). I'll resend the series with these changes.

> 
>>
>> Also, do you think I should fix hw_breakpoint_validate_len() from [PARCH 1]
>> for 8xx? I re-checked you recent patch* to allow any address range size for
>> 8xx. With that patch, hw_breakpoint_validate_len() won't get called at all
>> for 8xx.
> 
> At the time being, the 8xx emulates DABR so it has the same limitations as BOOK3S.
> My patch needs to be rebased on top of your series and I think it needs some modifications, as it seems it doesn't properly handle size 1 and size 2 breakpoints at least.
> So I think that you should leave your Patch1 as is, and I'll modify the validate_len() logic while rebasing my patch.

Sure. Thanks for helping!

Ravi

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ