No functional changes. Export __ptrace_detach() and add "ifndef CONFIG_UTRACE" into ptrace.c around the code re-implemented by utrace-ptrace.
--- include/linux/ptrace.h | 1 + kernel/ptrace.c | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) --- UTRACE-PTRACE/include/linux/ptrace.h~137_PTRACE_CONFIG_UTRACE 2009-11-16 18:30:26.000000000 +0100 +++ UTRACE-PTRACE/include/linux/ptrace.h 2009-11-21 21:59:17.000000000 +0100 @@ -85,6 +85,7 @@ extern int ptrace_traceme(void); extern int ptrace_readdata(struct task_struct *tsk, unsigned long src, char __user *dst, int len); extern int ptrace_writedata(struct task_struct *tsk, char __user *src, unsigned long dst, int len); extern int ptrace_attach(struct task_struct *tsk); +extern bool __ptrace_detach(struct task_struct *tracer, struct task_struct *tracee); extern int ptrace_detach(struct task_struct *, unsigned int); extern void ptrace_disable(struct task_struct *); extern int ptrace_check_attach(struct task_struct *task, int kill); --- UTRACE-PTRACE/kernel/ptrace.c~137_PTRACE_CONFIG_UTRACE 2009-11-21 21:41:41.000000000 +0100 +++ UTRACE-PTRACE/kernel/ptrace.c 2009-11-21 22:01:22.000000000 +0100 @@ -98,7 +98,7 @@ static int ignoring_children(struct sigh * reap it now, in that case we must also wake up sub-threads sleeping in * do_wait(). */ -static bool __ptrace_detach(struct task_struct *tracer, struct task_struct *p) +bool __ptrace_detach(struct task_struct *tracer, struct task_struct *p) { __ptrace_unlink(p); @@ -302,6 +302,7 @@ asmlinkage long compat_sys_ptrace(compat } #endif /* CONFIG_COMPAT */ +#ifndef CONFIG_UTRACE /* * ptrace a task: make the debugger its new parent and * move it to the ptrace list. @@ -762,3 +763,4 @@ int compat_ptrace_request(struct task_st return ret; } #endif /* CONFIG_COMPAT */ +#endif /* CONFIG_UTRACE */