On Thu, Jan 28, 1999 at 04:21:55PM +0300, Gleb O. Raiko wrote:
> ralf@uni-koblenz.de wrote:
> >
> > Syscall restarting for syscalls with four or more arguments won't work, the
> > fourth argument will be corrupted before return from kernel mode. The
> > following changes to arch/mips/kernel/{signal.c,scall_o32.S} should fix
> > that:
> >
> > [...]
> > case ERESTARTNOINTR: /* Userland will reload $v0. */
> > regs->regs[7] = regs->regs[26];
> > regs->cp0_epc -= 8;
> > }
> > [...]
> > stack_done:
> > sw a3, PT_R26($28) # save for syscall restart
> > lw t0, TASK_FLAGS($28) # syscall tracing enabled?
> > andi t0, PF_TRACESYS
> > [...]
> >
>
> With one correction:
>
> stack_done:
> - sw a3, PT_R26($28) # save for syscall restart
> + sw a3, PT_R26(sp) # save for syscall restart
>
> if you don't want to corrupt a current task struct :-)
>
> Ralf, was it just a typo ?
Yes, I was about to type $29 for the sp ...
> With this fix, 2.1.131 seems to be stable for us.
Cool.
Ralf
|