aboutsummaryrefslogtreecommitdiffstats
path: root/arch/s390/include/asm/processor.h
diff options
context:
space:
mode:
authorHeiko Carstens <heiko.carstens@de.ibm.com>2017-09-11 11:24:23 +0200
committerMartin Schwidefsky <schwidefsky@de.ibm.com>2017-09-28 07:29:40 +0200
commit5ef2d5231d547c672c67bdf84c13a4adaf477964 (patch)
treee43e8a7aa8fabf54bccc7f0e62860c2d7cfc5f6e /arch/s390/include/asm/processor.h
parents390/guarded storage: fix possible memory corruption (diff)
downloadlinux-dev-5ef2d5231d547c672c67bdf84c13a4adaf477964.tar.xz
linux-dev-5ef2d5231d547c672c67bdf84c13a4adaf477964.zip
s390/ptrace: fix guarded storage regset handling
If the guarded storage regset for current is supposed to be changed, the regset from user space is copied directly into the guarded storage control block. If then the process gets scheduled away while the control block is being copied and before the new control block has been loaded, the result is random: the process can be scheduled away due to a page fault or preemption. If that happens the already copied parts will be overwritten by save_gs_cb(), called from switch_to(). Avoid this by copying the data to a temporary buffer on the stack and do the actual update with preemption disabled. Fixes: f5bbd7219891 ("s390/ptrace: guarded storage regset for the current task") Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Diffstat (limited to 'arch/s390/include/asm/processor.h')
0 files changed, 0 insertions, 0 deletions