android_kernel_oneplus_msm8998/arch
John David Anglin f2d9107bd0 parisc: Ensure consistent state when switching to kernel stack at syscall entry
commit 6ed518328d0189e0fdf1bb7c73290d546143ea66 upstream.

We have one critical section in the syscall entry path in which we switch from
the userspace stack to kernel stack. In the event of an external interrupt, the
interrupt code distinguishes between those two states by analyzing the value of
sr7. If sr7 is zero, it uses the kernel stack. Therefore it's important, that
the value of sr7 is in sync with the currently enabled stack.

This patch now disables interrupts while executing the critical section.  This
prevents the interrupt handler to possibly see an inconsistent state which in
the worst case can lead to crashes.

Interestingly, in the syscall exit path interrupts were already disabled in the
critical section which switches back to the userspace stack.

Signed-off-by: John David Anglin <dave.anglin@bell.net>
Signed-off-by: Helge Deller <deller@gmx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-11-10 16:36:34 +01:00
..
alpha alpha: fix copy_from_user() 2016-09-24 10:07:45 +02:00
arc arc: don't leak bits of kernel stack into coredump 2016-10-28 03:01:32 -04:00
arm ARM: pxa: pxa_cplds: fix interrupt handling 2016-10-31 04:14:01 -06:00
arm64 arm64: kernel: Init MDCR_EL2 even in the absence of a PMU 2016-10-28 03:01:35 -04:00
avr32 avr32: off by one in at32_init_pio() 2016-10-07 15:23:45 +02:00
blackfin net: smc91x: fix SMC accesses 2016-09-30 10:18:37 +02:00
c6x irqdomain: Use irq_domain_get_of_node() instead of direct field access 2015-10-13 19:01:23 +02:00
cris cris: buggered copy_from_user/copy_to_user/clear_user 2016-09-24 10:07:44 +02:00
frv frv: fix clear_user() 2016-09-24 10:07:44 +02:00
h8300 h8300: fix syscall restarting 2016-11-10 16:36:32 +01:00
hexagon hexagon: fix strncpy_from_user() error return 2016-09-24 10:07:44 +02:00
ia64 ia64: copy_from_user() should zero the destination on access_ok() failure 2016-09-24 10:07:46 +02:00
m32r m32r: fix __get_user() 2016-09-24 10:07:43 +02:00
m68k m68k: Wire up mlock2 2015-11-22 11:35:26 +01:00
metag metag: Only define atomic_dec_if_positive conditionally 2016-10-28 03:01:31 -04:00
microblaze microblaze: fix copy_from_user() 2016-09-24 10:07:43 +02:00
mips KVM: MIPS: Make ERET handle ERL before EXL 2016-11-10 16:36:34 +01:00
mn10300 mn10300: copy_from_user() should zero on access_ok() failure... 2016-09-24 10:07:45 +02:00
nios2 nios2: copy_from_user() should zero the tail of destination 2016-09-24 10:07:45 +02:00
openrisc openrisc: fix the fix of copy_from_user() 2016-09-24 10:07:46 +02:00
parisc parisc: Ensure consistent state when switching to kernel stack at syscall entry 2016-11-10 16:36:34 +01:00
powerpc powerpc/nvram: Fix an incorrect partition merge 2016-10-31 04:14:01 -06:00
s390 s390/mm: fix gmap tlb flush issues 2016-10-28 03:01:34 -04:00
score score: fix copy_from_user() and friends 2016-09-24 10:07:44 +02:00
sh sh: fix copy_from_user() 2016-09-24 10:07:44 +02:00
sparc sparc32: fix copy_from_user() 2016-09-24 10:07:45 +02:00
tile tile: Define AT_VECTOR_SIZE_ARCH for ARCH_DLINFO 2016-10-07 15:23:44 +02:00
um um: Don't discard .text.exit section 2016-09-07 08:32:38 +02:00
unicore32 pwm: Changes for v4.4-rc1 2015-11-11 09:16:10 -08:00
x86 KVM: x86: fix wbinvd_dirty_mask use-after-free 2016-11-10 16:36:34 +01:00
xtensa xtensa: clear all DBREAKC registers on start 2016-04-12 09:08:55 -07:00
.gitignore
Kconfig