]> 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)
commite00657dd9704ec66fcd0e0bb59543383873edbcc
treedd7cdc6c919f65de841690bae7ecbef49f3b96ba
parent239bea99f45907d04135ef7b506467c1835f59f6
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: 02ea41696b8d ("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