linux-mips
[Top] [All Lists]

Re: [PATCH] Fix check for valid stack pointer during backtrace

To: tsbogend@alpha.franken.de
Subject: Re: [PATCH] Fix check for valid stack pointer during backtrace
From: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
Date: Mon, 12 May 2008 23:24:21 +0900 (JST)
Cc: linux-mips@linux-mips.org, ralf@linux-mips.org
In-reply-to: <20080512125923.0C641DE534@solo.franken.de>
Original-recipient: rfc822;linux-mips@linux-mips.org
References: <20080512125923.0C641DE534@solo.franken.de>
Sender: linux-mips-bounce@linux-mips.org
On Mon, 12 May 2008 14:59:23 +0200 (CEST), Thomas Bogendoerfer 
<tsbogend@alpha.franken.de> wrote:
> The newly added check for valid stack pointer address breaks at least for
> 64bit kernels.  Use __get_user() for accessing stack content to avoid crashes,
> when doing the backtrace.
> 
> Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
> ---

Thank you for updating.

> -     unsigned long *sp = (unsigned long *)(reg29 & ~3);
> +     unsigned long __user *sp = (unsigned long __user *)(reg29 & ~3);

Please drop this change, while kstack_end expect non __user pointer.

---
Atsushi Nemoto

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