I was trying to understand ptrace code in kernel. It seems there's
no PTRACE_READDATA for architectures other than sparc and sparc64.
There's a function named ptrace_readdata() in kernel/ptrace.c but I
couldn't find a way to invoke it from user space. Is the feature
missing? or Is it intended?
Only Sparc implements this, that is correct.
If other platforms added PTRACE_READDATA support, they would
also need to add some way to do a feature test for it's presence
so that GDB and other debugging code could actually make use
of it portably.
Another thing I noticed, the prototype for do_ptrace() in
arch/sparc/kernel/ptrace.c is
asmlinkage void do_ptrace(struct pt_regs *regs)
I thought it should be some thing like
asmlinkage int sys_ptrace(long request, long pid, long addr, long
data)
The return values are set directly in the user's pt_regs.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/