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)
commite64a1618af8566d20991607913a4d90d39b30118
treedd7cdc6c919f65de841690bae7ecbef49f3b96ba
parent48778464bb7d346b47157d21ffde2af6b2d39110
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: 0b0ed657fe00 ("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