David Howells task ornament replacement for ptrace could also work. It currently doesn't allow self tracing, but it looks like that could be added. It adds some other nice features, like being able to select exactly what you want to intercept. This would be handy for UML because it only want to intercept system calls. The current ptrace/wait interface forces it to also see all signals, which it doesn't care about.