s390/uaccess: use exception handler to zero result on get_user() failure
authorHeiko Carstens <hca@linux.ibm.com>
Sun, 1 May 2022 19:26:06 +0000 (21:26 +0200)
committerHeiko Carstens <hca@linux.ibm.com>
Wed, 1 Jun 2022 10:03:17 +0000 (12:03 +0200)
commit454ede3f1424c36bc124f8d7ed4b3ea654654be1
tree6a362eef8004422f3df1ff17bbe3ec3387b6ef86
parent79a74dac447be957178e8596706b1db3d5c714f4
s390/uaccess: use exception handler to zero result on get_user() failure

Historically the uaccess code pre-initializes the result of get_user()
(and now also __get_kernel_nofault()) to zero and uses the result as
input parameter for inline assemblies. This is different to what most,
if not all, other architectures are doing, which set the result to
zero within the exception handler in case of a fault.

Use the new extable mechanism and handle zeroing of the result within
the exception handler in case of a fault.

Signed-off-by: Heiko Carstens <hca@linux.ibm.com>
arch/s390/include/asm/asm-extable.h
arch/s390/include/asm/uaccess.h
arch/s390/mm/extable.c