On 11/30, Benjamin Herrenschmidt wrote: > > On Mon, 2009-11-30 at 10:15 +1100, Benjamin Herrenschmidt wrote: > > > Yes, the asm should be changed. I suppose we could check if the result > > of do_syscall_trace_enter is negative, and if it is, branch to the exit > > path using r3 as the error code. Would that be ok ? > > > > Something like this: > > Note however that there's a trace exit too and that's normally the right > place to alter the result don't you think ?
Yes, the result can be changed when the tracee reports syscall-exit. Should powerpc allow this on syscall-entry? I do not know. x86 does, and we have this test-case which assumes powerpc should allow too. But when it comes to ptrace I can almost never know what was the supposed behaviour/api. Jan, Roland, what do you think? Oleg.