linux/arch/powerpc
Anton Blanchard 5c2e08231b powerpc: Never handle VSX alignment exceptions from kernel
The VSX alignment handler needs to write out the existing VSX
state to memory before operating on it (flush_vsx_to_thread()).
If we take a VSX alignment exception in the kernel bad things
will happen. It looks like we could write the kernel state out
to the user process, or we could handle the kernel exception
using data from the user process (depending if MSR_VSX is set
or not).

Worse still, if the code to read or write the VSX state causes an
alignment exception, we will recurse forever. I ended up with
hundreds of megabytes of kernel stack to look through as a result.

Floating point and SPE code have similar issues but already include
a user check. Add the same check to emulate_vsx().

With this patch any unaligned VSX loads and stores in the kernel
will show up as a clear oops rather than silent corruption of
kernel or userspace VSX state, or worse, corruption of a potentially
unlimited amount of kernel memory.

Signed-off-by: Anton Blanchard <anton@samba.org>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2013-08-27 14:44:26 +10:00
..
boot powerpc/85xx: Add C293PCIE board support 2013-08-23 19:43:24 -05:00
configs powerpc/85xx: Add C293PCIE board support 2013-08-23 19:43:24 -05:00
crypto
include pseries: Move plpar_wrapper.h to powerpc common include/asm location. 2013-08-27 14:43:05 +10:00
kernel powerpc: Never handle VSX alignment exceptions from kernel 2013-08-27 14:44:26 +10:00
kvm powerpc: Make rwlocks endian safe 2013-08-14 15:33:40 +10:00
lib powerpc: Unaligned stores and stmw are broken in emulation code 2013-08-27 14:36:08 +10:00
math-emu powerpc/math-emu: Fix load/store indexed emulation 2013-08-14 14:59:57 +10:00
mm powerpc/mm: Mark Memory Resources as busy 2013-08-27 14:35:11 +10:00
net
oprofile
perf powerpc: Fix a number of sparse warnings 2013-08-14 11:50:24 +10:00
platforms pseries: Move plpar_wrapper.h to powerpc common include/asm location. 2013-08-27 14:43:05 +10:00
sysdev powerpc: Fix some endian issues in xics code 2013-08-14 15:33:25 +10:00
xmon
Kconfig powerpc: split She math emulation into two parts 2013-08-14 14:59:19 +10:00
Kconfig.debug
Makefile powerpc/e500: Set -mcpu flag for 32-bit e500 2013-08-20 20:49:56 -05:00
relocs_check.pl