]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commitba83544c6ca8090295f0aa75ecd6ffd060638173
treeb725f7f8392d85e231b4f5c26c0c816ba75c87d1
parent35a990d422962649944e620cec6c632d9d0a7fb3
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: c07dec17a9d4a ("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