OpenCloudOS-Kernel/arch
Heiko Carstens b5a882fcf1 s390: restore address space when returning to user space
Unbalanced set_fs usages (e.g. early exit from a function and a
forgotten set_fs(USER_DS) call) may lead to a situation where the
secondary asce is the kernel space asce when returning to user
space. This would allow user space to modify kernel space at will.

This would only be possible with the above mentioned kernel bug,
however we can detect this and fix the secondary asce before returning
to user space.

Therefore a new TIF_ASCE_SECONDARY which is used within set_fs. When
returning to user space check if TIF_ASCE_SECONDARY is set, which
would indicate a bug. If it is set print a message to the console,
fixup the secondary asce, and then return to user space.

This is similar to what is being discussed for x86 and arm:
"[RFC] syscalls: Restore address limit after a syscall".

Reviewed-by: Christian Borntraeger <borntraeger@de.ibm.com>
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
2017-02-23 10:06:38 +01:00
..
alpha Final extable.h related changes. 2017-02-21 14:28:55 -08:00
arc ARC updates for 4.11 rc1 2017-02-22 10:33:53 -08:00
arm 4.11 is going to be a relatively large release for KVM, with a little over 2017-02-22 18:22:53 -08:00
arm64 4.11 is going to be a relatively large release for KVM, with a little over 2017-02-22 18:22:53 -08:00
avr32 sched/cputime: Remove generic asm headers 2017-02-01 09:14:07 +01:00
blackfin sched/cputime: Remove generic asm headers 2017-02-01 09:14:07 +01:00
c6x sched/cputime: Remove generic asm headers 2017-02-01 09:14:07 +01:00
cris Final extable.h related changes. 2017-02-21 14:28:55 -08:00
frv Final extable.h related changes. 2017-02-21 14:28:55 -08:00
h8300 sched/cputime: Remove generic asm headers 2017-02-01 09:14:07 +01:00
hexagon Final extable.h related changes. 2017-02-21 14:28:55 -08:00
ia64 arch, mm: remove arch specific show_mem 2017-02-22 16:41:30 -08:00
m32r m32r: fix build warning 2017-02-22 16:41:27 -08:00
m68k powerpc updates for 4.11 part 1. 2017-02-22 10:30:38 -08:00
metag Final extable.h related changes. 2017-02-21 14:28:55 -08:00
microblaze Final extable.h related changes. 2017-02-21 14:28:55 -08:00
mips 4.11 is going to be a relatively large release for KVM, with a little over 2017-02-22 18:22:53 -08:00
mn10300 Final extable.h related changes. 2017-02-21 14:28:55 -08:00
nios2 Final extable.h related changes. 2017-02-21 14:28:55 -08:00
openrisc Final extable.h related changes. 2017-02-21 14:28:55 -08:00
parisc arch, mm: remove arch specific show_mem 2017-02-22 16:41:30 -08:00
powerpc Merge branch 'akpm' (patches from Andrew) 2017-02-22 19:29:24 -08:00
s390 s390: restore address space when returning to user space 2017-02-23 10:06:38 +01:00
score score: remove asm/current.h 2017-02-22 16:41:27 -08:00
sh TTY/Serial driver patches for 4.11-rc1 2017-02-22 12:17:25 -08:00
sparc lib/show_mem.c: teach show_mem to work with the given nodemask 2017-02-22 16:41:30 -08:00
tile arch, mm: remove arch specific show_mem 2017-02-22 16:41:30 -08:00
um Merge branch 'locking-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2017-02-20 13:23:30 -08:00
unicore32 arch, mm: remove arch specific show_mem 2017-02-22 16:41:30 -08:00
x86 Merge branch 'akpm' (patches from Andrew) 2017-02-22 19:29:24 -08:00
xtensa Final extable.h related changes. 2017-02-21 14:28:55 -08:00
.gitignore
Kconfig Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next 2017-02-22 10:15:09 -08:00