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

2009-12-01 Thread Benjamin Herrenschmidt
On Tue, 2009-12-01 at 11:27 -0800, Roland McGrath wrote: > > If the powerpc maintainers want to change the behavior here, that is fine > by me. But there is no need for that just to satisfy general ptrace > cleanups (or utrace). Normal concerns require that no such change break > the ptrace beha

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

2009-12-01 Thread Roland McGrath
We don't really intend to impose any new requirements on the arch behavior here. It's up to the arch folks to decide. It does simplify life somewhat on x86 that you can change the registers at the syscall-entry stop and then after skipping the syscall, those registers will be unchanged from what

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

2009-11-30 Thread Oleg Nesterov
On 11/30, Benjamin Herrenschmidt wrote: > > On Sun, 2009-11-29 at 22:07 +0100, Oleg Nesterov wrote: > > > > If I change the test-case to use NEWVAL == 1000 (or any other value > > greater than NR_syscalls), then the tracee sees ENOSYS and this is > > correct too. > > > > But I do not see how it is

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

2009-11-30 Thread Oleg Nesterov
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.

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

2009-11-29 Thread Benjamin Herrenschmidt
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

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

2009-11-29 Thread Benjamin Herrenschmidt
On Sun, 2009-11-29 at 22:07 +0100, Oleg Nesterov wrote: > On 11/28, Ananth N Mavinakayanahalli wrote: > > > > syscall-reset is the only failure I see on > > powerpc: > > > > errno 14 (Bad address) > > syscall-reset: syscall-reset.c:95: main: Assertion `(*__errno_location > > ()) == 38' failed. > >

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

2009-11-29 Thread Oleg Nesterov
On 11/28, Ananth N Mavinakayanahalli wrote: > > syscall-reset is the only failure I see on > powerpc: > > errno 14 (Bad address) > syscall-reset: syscall-reset.c:95: main: Assertion `(*__errno_location > ()) == 38' failed. > unexpected child status 67f > FAIL: syscall-reset (to remind, it also fai