OSDN Git Service

s390: mm: Fix secure storage access exception handling
authorJanosch Frank <frankja@linux.ibm.com>
Tue, 12 Jan 2021 10:40:53 +0000 (05:40 -0500)
committerVasily Gorbik <gor@linux.ibm.com>
Mon, 5 Jul 2021 10:44:23 +0000 (12:44 +0200)
commit85b18d7b5e7ffefb2f076186511d39c4990aa005
treeb725f7f8392d85e231b4f5c26c0c816ba75c87d1
parent47f7c6cf0082e1d963d1761b6bc2a94480fc8671
s390: mm: Fix secure storage access exception handling

Turns out that the bit 61 in the TEID is not always 1 and if that's
the case the address space ID and the address are
unpredictable. Without an address and its address space ID we can't
export memory and hence we can only send a SIGSEGV to the process or
panic the kernel depending on who caused the exception.

Unfortunately bit 61 is only reliable if we have the "misc" UV feature
bit.

Signed-off-by: Janosch Frank <frankja@linux.ibm.com>
Reviewed-by: Christian Borntraeger <borntraeger@de.ibm.com>
Fixes: 084ea4d611a3d ("s390/mm: add (non)secure page access exceptions handlers")
Cc: stable@vger.kernel.org
Signed-off-by: Vasily Gorbik <gor@linux.ibm.com>
arch/s390/boot/uv.c
arch/s390/include/asm/uv.h
arch/s390/kernel/uv.c
arch/s390/mm/fault.c