android_kernel_xiaomi_sm8350/arch/powerpc
Josh Boyer efbda86098 powerpc: Sanitize stack pointer in signal handling code
On powerpc64 machines running 32-bit userspace, we can get garbage bits in the
stack pointer passed into the kernel.  Most places handle this correctly, but
the signal handling code uses the passed value directly for allocating signal
stack frames.

This fixes the issue by introducing a get_clean_sp function that returns a
sanitized stack pointer.  For 32-bit tasks on a 64-bit kernel, the stack
pointer is masked correctly.  In all other cases, the stack pointer is simply
returned.

Additionally, we pass an 'is_32' parameter to get_sigframe now in order to
get the properly sanitized stack.  The callers are know to be 32 or 64-bit
statically.

Signed-off-by: Josh Boyer <jwboyer@linux.vnet.ibm.com>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2009-03-27 16:58:24 +11:00
..
boot Merge commit 'gcl/next' into next 2009-03-20 16:27:57 +11:00
configs powerpc: Turn on self-tests in ppc64_defconfig 2009-03-24 13:47:29 +11:00
include/asm powerpc: Sanitize stack pointer in signal handling code 2009-03-27 16:58:24 +11:00
kernel powerpc: Sanitize stack pointer in signal handling code 2009-03-27 16:58:24 +11:00
kvm KVM: Add kvm_arch_sync_events to sync with asynchronize events 2009-02-15 02:47:36 +02:00
lib Merge commit 'origin/master' into next 2009-03-11 17:10:07 +11:00
math-emu powerpc/math-emu: Fix efp dependence 2009-03-11 06:00:08 -05:00
mm powerpc/mm: Introduce early_init_mmu() on 64-bit 2009-03-24 13:47:34 +11:00
oprofile powerpc/oprofile: G4 oprofile has variable number of counters 2009-03-11 17:10:16 +11:00
platforms powerpc: Add write barrier before enabling DTL flags 2009-03-27 16:58:23 +11:00
sysdev powerpc/mm: Tweak PTE bit combination definitions 2009-03-24 13:47:33 +11:00
xmon
Kconfig powerpc/kconfig: Kill PPC_MULTIPLATFORM 2009-03-11 17:11:35 +11:00
Kconfig.debug powerpc/kconfig: Kill PPC_MULTIPLATFORM 2009-03-11 17:11:35 +11:00
Makefile powerpc/math-emu: Fix efp dependence 2009-03-11 06:00:08 -05:00