linux-mips-fnet
[Top] [All Lists]

Re: Problems w/ 2.1.131 on r3k

To: "Gleb O. Raiko" <raiko@niisi.msk.ru>, linux-mips@fnet.fr
Subject: Re: Problems w/ 2.1.131 on r3k
From: ralf@uni-koblenz.de
Date: Fri, 29 Jan 1999 00:25:36 +0100
In-reply-to: <36B06473.4B484E83@niisi.msk.ru>; from Gleb O. Raiko on Thu, Jan 28, 1999 at 04:21:55PM +0300
References: <36AC8C20.F3225338@niisi.msk.ru> <19990126014109.K558@uni-koblenz.de> <36B06473.4B484E83@niisi.msk.ru>
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

<Prev in Thread] Current Thread [Next in Thread>