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: <d8b5e71d-f8db-bee0-dadf-c57724a68daa@huawei.com>
Date:   Tue, 17 Oct 2017 10:04:00 +0800
From:   "chengjian (D)" <cj.chengjian@...wei.com>
To:     Will Deacon <will.deacon@....com>
CC:     <catalin.marinas@....com>, <oleg@...hat.com>,
        <linux@...linux.org.uk>, <linux-arm-kernel@...ts.infradead.org>,
        <linux-kernel@...r.kernel.org>,
        "Xiexiuqi (Xie XiuQi)" <xiexiuqi@...wei.com>,
        Li Bin <huawei.libin@...wei.com>
Subject: Re: A issue about ptrace/SINGLESTEP on arm64



On 2017/10/16 23:30, Will Deacon wrote:
> Can you jump the PC once the child appears to be "stuck"?
>
> IIRC, GDB has special heuristics to step through LDXR/STXR critical
> sections.
The function can be returned, But the number of instructions looks too much
We use objdump to count the assembly code length of the program

#=======
#trace
#=======
ptrace/2-arm64-loop # objdump -d ./nop | wc -l
     115885


ptrace/2-arm64-loop # ./ptrace_singlestep ./nop

     ./nop : nop
     Please wait
     Number of machine instructions : 186688022


/ptrace/2-arm64-loop # ./ptrace_singlestep ./nop

     ./nop : nop
     Please wait
     Number of machine instructions : 103670668


The number of instructions executed twice is not the same

#=======
#trace ls
#=======

ptrace/2-arm64-loop # objdump -d /bin/ls | wc -l
     18095

ptrace/2-arm64-loop # ./ptrace_singlestep /bin/ls
     /bin/ls : ls
     Please wait
     Number of machine instructions : 7718122167


It seems that the child has also been tracked by the parent process
when it goes into the kernel space.

Is this what your 'stuck' mean?
Does all the instructions been tracked in kernel space, or only the 
LDXR/STXR?




Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ