I think that the work must be done in the stack layout on ptracing (read the
handle_trap() function for what UML does). But also see this URL:
One of the nice thing of those patches is that if you implement something
similar (which is a lot easier IMHO) you don't need to be able to change
system call numbers.
Paolo Giarrusso, aka Blaisorblade
Linux registered user n. 292729