[Top] [All Lists]

Re: Problems w/ 2.1.131 on r3k

Subject: Re: Problems w/ 2.1.131 on r3k
From: "Gleb O. Raiko" <>
Date: Tue, 26 Jan 1999 11:52:17 +0300
Organization: NIISI RAN
References: <> <> wrote:
> Syscall restarting for syscalls with four or more arguments won't work, the
> fourth argument will be corrupted before return from kernel mode.  

Exactly. Late yesterday, I was able to write small test that calls wait3
with non-null rusage and saw exact such simptomps. It's exactly how
'make' waits for its children.

> 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
> [...]
> I assume that the erroneous arguments to getrusage(2) are were indirectly
> caused by this.
Only small question, diff between 2.1.121 and 2.1.131 doesn't show this
change, but 2.1.121 isn't affected by this issue at all. What was
changed in 2.1.131 ? Was it common, i.e. system-independed code ?

> > I had to apply the patch which is attached here. Without this patch,
> > user process will never leave the kernel mode. (Harald, with the patch
> > the kernel should be 'more stable').
> Looks correct but won't work on R4000, so I don't put it into my
> sources.

Yes, I know. It was only quick dirty fix. I'll resubmit this patch with
correct behaviour for all mipses soon.

BTW, have you accepted Vladimir's changes in the kernel memcpy? 2.1.131
doesn't contain them.


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