s390: add 3f program exception handler
authorJanosch Frank <frankja@linux.ibm.com>
Tue, 8 Sep 2020 13:05:04 +0000 (09:05 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 23 Sep 2020 11:00:02 +0000 (13:00 +0200)
commite094ddf047cbc8bb881d700b91ed8cdab9f3e30f
treec1a1996f4de59ea9fff1cedef7b1f53b29eb6708
parentac30196483291985ea0567fcce04b5f52d35ba50
s390: add 3f program exception handler

commit cd4d3d5f21ddbfae3f686ac0ff405f21f7847ad3 upstream.

Program exception 3f (secure storage violation) can only be detected
when the CPU is running in SIE with a format 4 state description,
e.g. running a protected guest. Because of this and because user
space partly controls the guest memory mapping and can trigger this
exception, we want to send a SIGSEGV to the process running the guest
and not panic the kernel.

Signed-off-by: Janosch Frank <frankja@linux.ibm.com>
Cc: <stable@vger.kernel.org> # 5.7
Fixes: 084ea4d611a3 ("s390/mm: add (non)secure page access exceptions handlers")
Reviewed-by: Claudio Imbrenda <imbrenda@linux.ibm.com>
Reviewed-by: Cornelia Huck <cohuck@redhat.com>
Acked-by: Christian Borntraeger <borntraeger@de.ibm.com>
Signed-off-by: Heiko Carstens <hca@linux.ibm.com>
Signed-off-by: Vasily Gorbik <gor@linux.ibm.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
arch/s390/kernel/entry.h
arch/s390/kernel/pgm_check.S
arch/s390/mm/fault.c