linux/arch/s390
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
..
appldata sched/cputime: Convert kcpustat to nsecs 2017-02-01 09:13:47 +01:00
boot s390/sclp: make early sclp code readable 2017-02-08 14:13:19 +01:00
configs s390: update defconfigs 2017-01-16 07:27:48 +01:00
crypto s390/prng: Adjust generation of entropy to produce real 256 bits. 2017-01-31 10:46:10 +01:00
hypfs s390: hypfs: make inode explicitly non-modular 2016-10-31 17:55:40 +01:00
include s390: restore address space when returning to user space 2017-02-23 10:06:38 +01:00
kernel s390: restore address space when returning to user space 2017-02-23 10:06:38 +01:00
kvm 4.11 is going to be a relatively large release for KVM, with a little over 2017-02-22 18:22:53 -08:00
lib s390: replace ACCESS_ONCE with READ_ONCE 2017-02-17 07:40:46 +01:00
mm Merge branch 'akpm' (patches from Andrew) 2017-02-22 19:29:24 -08:00
net Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux 2017-02-22 10:20:04 -08:00
numa s390/numa: pin all possible cpus to nodes early 2016-12-07 07:23:33 +01:00
oprofile s390/dumpstack: restore reliable indicator for call traces 2016-10-17 14:44:30 +02:00
pci s390/pci: use proper endianness annotations 2017-01-16 07:27:53 +01:00
tools KVM: s390: instruction-execution-protection support 2017-01-30 11:17:28 +01:00
defconfig s390: update defconfigs 2017-01-16 07:27:48 +01:00
Kbuild s390/numa: add core infrastructure 2015-08-03 18:40:25 +02:00
Kconfig Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next 2017-02-22 10:15:09 -08:00
Kconfig.debug Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux 2017-02-22 10:20:04 -08:00
Makefile s390: add assembler include path for vx-insn.h 2016-09-06 11:00:04 +02:00