lkml.org 
[lkml]   [2012]   [Dec]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [ 06/37] x86-32: Fix invalid stack address while in softirq
On Tue, Dec 04, 2012 at 11:42:58AM -0200, Herton Ronaldo Krzesinski wrote:
> On Fri, Nov 30, 2012 at 10:45:53AM -0800, Greg Kroah-Hartman wrote:
> > 3.0-stable review patch. If anyone has any objections, please let me know.
> >
> > ------------------
> >
> > From: Robert Richter <robert.richter@amd.com>
> >
> > commit 1022623842cb72ee4d0dbf02f6937f38c92c3f41 upstream.
> >
> > In 32 bit the stack address provided by kernel_stack_pointer() may
> > point to an invalid range causing NULL pointer access or page faults
> > while in NMI (see trace below). This happens if called in softirq
> > context and if the stack is empty. The address at &regs->sp is then
> > out of range.
> >
> > Fixing this by checking if regs and &regs->sp are in the same stack
> > context. Otherwise return the previous stack pointer stored in struct
> > thread_info. If that address is invalid too, return address of regs.
> >
> [...]
>
> Hi, this makes build fail with oprofile on i386 on 3.0.54:
> ERROR: "kernel_stack_pointer" [arch/x86/oprofile/oprofile.ko] undefined!

Now fixed with 3.0.55.

thanks,

greg k-h


\
 
 \ /
  Last update: 2012-12-06 20:21    [W:0.084 / U:4.848 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site