0

I want to use ptrace in qemu mips, but I can't wake up the child process when using fork and attach, however, I got success in kernel 3.2. I hope to know why got this ques in kernel 2.6?

I got the kernel from

https://people.debian.org/~aurel32/qemu/mips/

Marcus Müller
  • 34,677
  • 4
  • 53
  • 94
jack link
  • 23
  • 4

2 Answers2

0

I cannot really answer your question, because it contains no usable information, so I'll just guess. Some of the ptrace constructs available were introduced into Linux later than the kernel you are using.

If you are using PTRACE_TRACEME or PTRACE_ATTACH, than you should be fine. If you are using PTRACE_SEIZE, then you are using a mechanism that simply did not exist in the kernel version you are using.

Shachar Shemesh
  • 8,193
  • 6
  • 25
  • 57
  • thanks for your help, and I solved this pro. I use kernel 2.6.32, and this kernel had a bug for ptrace mips and I got from here, https://sourceforge.net/p/strace/mailman/message/31856938/, and the patch is here, http://gitlab.pedjaapps.net/pedja/lge-kernel-omap4/commit/55436c91652b45be576b91ec96a8d65f6b7447fa – jack link Oct 17 '16 at 12:47
  • and I patch it and recompile the kernel and then ptrace work well. – jack link Oct 17 '16 at 12:48
  • Then write it as an answer, so that anyone else who happens to come across the same problem can find the solution. – Shachar Shemesh Oct 17 '16 at 16:58
0

I solved this pro. I use kernel 2.6.32, and this kernel had a bug for ptrace mips and I got from here, https://sourceforge.net/p/strace/mailman/message/31856938/,

and the patch is here, http://gitlab.pedjaapps.net/pedja/lge-kernel-omap4/commit/55436c91652b45be576b91ec96a8d65f6b7447fa

and I patch it and recompile the kernel and then ptrace work well.

jack link
  • 23
  • 4