Files
linux/arch/powerpc/include/asm
Michael Neuling 4e639053aa powerpc: Fix bad stack check in exception entry
commit 90ff5d688e upstream.

In EXCEPTION_PROLOG_COMMON() we check to see if the stack pointer (r1)
is valid when coming from the kernel.  If it's not valid, we die but
with a nice oops message.

Currently we allocate a stack frame (subtract INT_FRAME_SIZE) before we
check to see if the stack pointer is negative.  Unfortunately, this
won't detect a bad stack where r1 is less than INT_FRAME_SIZE.

This patch fixes the check to compare the modified r1 with
-INT_FRAME_SIZE.  With this, bad kernel stack pointers (including NULL
pointers) are correctly detected again.

Kudos to Paulus for finding this.

Signed-off-by: Michael Neuling <mikey@neuling.org>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-01-09 12:24:22 -08:00
..
2012-03-28 18:30:02 +01:00
2012-03-28 18:30:02 +01:00
2011-03-31 11:26:23 -03:00
2011-03-31 11:26:23 -03:00
2012-07-10 19:18:59 +10:00
2013-04-18 13:03:53 +10:00
2013-04-26 16:08:16 +10:00
2011-07-26 16:49:47 -07:00
2012-03-28 18:30:02 +01:00
2011-11-08 14:51:46 +11:00
2012-03-20 21:48:30 +08:00
2008-08-18 21:40:03 +02:00
2013-04-18 13:03:53 +10:00
2011-12-08 14:02:23 +11:00
2011-05-22 08:47:53 -04:00
2010-06-09 11:12:36 +02:00
2011-07-26 16:49:47 -07:00
2010-05-05 09:11:10 -04:00
2012-11-15 13:00:45 +11:00
2011-03-31 11:26:23 -03:00
2010-10-26 16:52:08 -07:00
2011-03-31 11:26:23 -03:00
2009-12-09 17:10:37 +11:00
2011-09-20 09:19:40 +10:00
2013-02-13 12:56:42 +01:00
2010-03-05 03:04:08 -06:00
2011-04-20 17:01:19 +10:00
2012-09-17 16:31:51 +10:00
2011-03-31 11:26:23 -03:00
2013-05-08 06:36:49 +10:00
2011-03-31 11:26:23 -03:00
2012-07-11 14:18:40 +10:00
2011-05-06 13:32:35 +10:00