]> git.baikalelectronics.ru Git - kernel.git/commit
s390: fix system call single stepping
authorSven Schnelle <svens@linux.ibm.com>
Wed, 17 Jun 2020 15:30:28 +0000 (17:30 +0200)
committerHeiko Carstens <heiko.carstens@de.ibm.com>
Tue, 23 Jun 2020 12:05:45 +0000 (14:05 +0200)
commit6589dd00b0aa6a78b64d237caf7e412d5a15d79e
treedd7cdc6c919f65de841690bae7ecbef49f3b96ba
parente86d80f3f3da4d1072ca810bbe97a8ef4bd674b0
s390: fix system call single stepping

When single stepping an svc instruction on s390, the kernel is entered
with a PER program check interruption. The program check handler than
jumps to the system call handler by reloading the PSW. The code didn't
set GPR13 to the thread pointer in struct task_struct. This made the
kernel access invalid memory while trying to fetch the syscall function
address. Fix this by always assigned GPR13 after .Lsysc_per.

Fixes: 140ddaa40243 ("s390: remove critical section cleanup from entry.S")
Reported-and-tested-by: Christian Borntraeger <borntraeger@de.ibm.com>
Signed-off-by: Sven Schnelle <svens@linux.ibm.com>
Reviewed-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
arch/s390/kernel/entry.S