[bug] strace detach as soon as attach
OneGun Lee
inamind at gmail.com
Thu Jul 8 06:13:30 UTC 2010
Hi, all
I tried to use strace-4.5.15(and .20) on linux-2.6.29.4, arm-cortex-a8.
but strace was detached as soon as was attached one process.
# strace -p 1711 -d
Process 1711 attached - interrupt to quit
[wait(0x137f) = 1711]
pid 1711 stopped, [SIGSTOP]
[wait(0x57f) = 1711]
pid 1711 stopped, [SIGTRAP]
Process 1711 detached
So, I debuged strace.
After attach, strace try to ptrace(PTRACE_PEEKTEXT) and input param
is kernel space's address(0xFFFFxxxx).
This kernel space address's data is scno(restart_syscall).
address = 0xffff051c, data = 0xef900000(restart_syscall)
This command is sent kernel mode.
and than, arch_ptrace,kernel function, try to get data this address.
so this function call access_process_vm() -> get_user_pages().
get_user_pages() function make error because start address param is kernel
space's address.
so strace is detached.
I think that it is bug to need fix.
If address to want to get data is in kernel space, access_process_vm() just
read data. don't call get_user_pages().
Or
strace have not try to peek data, if address is in kernel space.
How do you think about this problem?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.strace.io/pipermail/strace-devel/attachments/20100708/f9d21b34/attachment.html>
More information about the Strace-devel
mailing list