[Top] [All Lists]

Re: Problems w/ 2.1.131 on r3k

To: "Gleb O. Raiko" <>, "" <>
Subject: Re: Problems w/ 2.1.131 on r3k
Date: Tue, 26 Jan 1999 01:41:09 +0100
In-reply-to: <>; from Gleb O. Raiko on Mon, Jan 25, 1999 at 06:22:08PM +0300
References: <>
On Mon, Jan 25, 1999 at 06:22:08PM +0300, Gleb O. Raiko wrote:

> The problem I have is that 'make' dies with error 'wait: Bad address"
> after Ctrl+Z is pressed. (The test is to compile something, e.g. gdb
> from sources.) Children of make (e.g. gcc) die too. The problem affects
> other utilities, e.g. man, but doesn't affect small tests I wrote. The
> kernel log contains '<process name>: Exception at ...'. Futher
> investigation showed that getrusage is called with bad user address.

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

        case ERESTARTNOINTR:            /* Userland will reload $v0.  */
                regs->regs[7] = regs->regs[26];
                regs->cp0_epc -= 8;
        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.

> 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


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