android_kernel_oneplus_msm8998/arch/s390
Christian Borntraeger ec440c1531 s390/entry.S: fix spurious zeroing of r0
[ Upstream commit d3f468963cd6fd6d2aa5e26aed8b24232096d0e1 ]

when a system call is interrupted we might call the critical section
cleanup handler that re-does some of the operations. When we are between
.Lsysc_vtime and .Lsysc_do_svc we might also redo the saving of the
problem state registers r0-r7:

.Lcleanup_system_call:
[...]
0:      # update accounting time stamp
        mvc     __LC_LAST_UPDATE_TIMER(8),__LC_SYNC_ENTER_TIMER
        # set up saved register r11
        lg      %r15,__LC_KERNEL_STACK
        la      %r9,STACK_FRAME_OVERHEAD(%r15)
        stg     %r9,24(%r11)            # r11 pt_regs pointer
        # fill pt_regs
        mvc     __PT_R8(64,%r9),__LC_SAVE_AREA_SYNC
--->    stmg    %r0,%r7,__PT_R0(%r9)

The problem is now, that we might have already zeroed out r0.
The fix is to move the zeroing of r0 after sysc_do_svc.

Reported-by: Farhan Ali <alifm@linux.vnet.ibm.com>
Fixes: 7041d28115e91 ("s390: scrub registers on kernel entry and KVM exit")
Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>

Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>

Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>

Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>

Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>

Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-04-29 07:50:03 +02:00
..
appldata
boot s390/decompressor: fix initrd corruption caused by bss clear 2017-04-12 12:38:34 +02:00
configs s390/defconfig: set SCSI_DH=y 2015-10-01 10:48:36 +02:00
crypto s390/crypto: unlock on error in prng_tdes_read() 2017-01-12 11:22:49 +01:00
hypfs hypfs_kill_super(): deal with failed allocations 2018-04-24 09:32:11 +02:00
include s390: introduce execute-trampolines for branches 2018-04-29 07:50:03 +02:00
kernel s390/entry.S: fix spurious zeroing of r0 2018-04-29 07:50:03 +02:00
kvm KVM: s390: wire up bpb feature 2018-04-29 07:50:02 +02:00
lib s390/bitops: remove 31 bit related comments 2015-10-14 14:32:15 +02:00
mm mm: larger stack guard gap, between vmas 2017-06-26 07:13:11 +02:00
net bpf, s390: fix jit branch offset related to ldimm64 2017-08-12 19:29:08 -07:00
numa s390/numa: write kernel message when emu_size has been increased 2015-10-14 14:31:59 +02:00
oprofile
pci s390/pci: do not require AIS facility 2017-12-09 18:42:39 +01:00
defconfig
Kbuild s390/numa: add core infrastructure 2015-08-03 18:40:25 +02:00
Kconfig s390: introduce execute-trampolines for branches 2018-04-29 07:50:03 +02:00
Kconfig.debug
Makefile s390: introduce execute-trampolines for branches 2018-04-29 07:50:03 +02:00