Re: powerpc: syscall_dotrace() && retcode (Was: powerpc: fork &&stepping)

From: Oleg Nesterov
Date: Mon Nov 30 2009 - 15:07:01 EST


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.

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/