]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commit6e636692829331fb1021f88a0265c6a4217c20e4
tree6a362eef8004422f3df1ff17bbe3ec3387b6ef86
parentb0efa187095970ef87c439e88a15b7dc719b847d
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