linux-mips
[Top] [All Lists]

Re: [PATCH 2.5] r4k_switch task_struct/thread_info fixes

To: Jun Sun <jsun@mvista.com>
Subject: Re: [PATCH 2.5] r4k_switch task_struct/thread_info fixes
From: Vivien Chappelier <vivienc@nerim.net>
Date: Fri, 7 Feb 2003 10:29:16 +0100 (CET)
Cc: Ralf Baechle <ralf@oss.sgi.com>, linux-mips@linux-mips.org
In-reply-to: <20030206163647.F13258@mvista.com>
Original-recipient: rfc822;linux-mips@linux-mips.org
Sender: linux-mips-bounce@linux-mips.org
On Thu, 6 Feb 2003, Jun Sun wrote:

> Actually the following hunks are not right.  ST_OFF
> should be applied against the task_struct, which is a0,
> not thread_info (t3).

In 2.4 yes, not in 2.5.

include/linux/sched.h:469
> union thread_union {
>         struct thread_info thread_info;
>         unsigned long stack[INIT_THREAD_SIZE/sizeof(long)];
> };

That means the top of the stack is actually at (task->thread_info +
KERNEL_STACK_SIZE) in 2.5. See for example arch/mips64/kernel/ptrace.c:107

> Also see my next email before you rush into trying :-)

Ok, I'll look at it later.

Vivien.


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