android_kernel_google_msm/arch/powerpc
Michael Neuling 4e6cc83041 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-08 09:42:11 -08:00
..
boot powerpc/85xx: use the BRx registers to enable indirect mode on the P1022DS 2012-08-09 08:31:27 -07:00
configs Merge remote-tracking branch 'kumar/next' into merge 2012-04-02 13:57:46 +10:00
include/asm powerpc: Fix bad stack check in exception entry 2014-01-08 09:42:11 -08:00
kernel powerpc/signals: Improved mark VSX not saved with small contexts fix 2013-12-04 10:50:33 -08:00
kvm powerpc: kvm: fix rare but potential deadlock scene 2014-01-08 09:42:10 -08:00
lib powerpc: Fix parameter clobber in csum_partial_copy_generic() 2013-10-13 15:42:48 -07:00
math-emu
mm powerpc/numa: Avoid stupid uninitialized warning from gcc 2013-08-20 08:26:28 -07:00
net bpf jit: Let the powerpc jit handle negative offsets 2012-04-30 13:40:50 -04:00
oprofile Disintegrate asm/system.h for PowerPC 2012-03-28 18:30:02 +01:00
perf powerpc/perf: Fix instruction address sampling on 970 and Power4 2012-03-28 11:33:24 +11:00
platforms powerpc/powernv: Add PE to its own PELTV 2013-11-29 10:50:36 -08:00
sysdev powerpc: Make sure IPI handlers see data written by IPI senders 2012-09-14 10:00:22 -07:00
xmon powerpc/xmon: Use cpumask iterator to avoid warning 2012-07-16 09:03:23 -07:00
Kconfig powerpc: Work around gcc miscompilation of __pa() on 64-bit 2013-09-07 21:58:14 -07:00
Kconfig.debug irqdomain: Remove powerpc dependency from debugfs file 2012-03-29 14:31:02 -06:00
Makefile powerpc/perf: Move perf core & PMU code into a subdirectory 2012-02-23 10:50:04 +11:00
relocs_check.pl powerpc: Process dynamic relocations for kernel 2011-12-20 10:21:08 -05:00