]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
s390/uaccess: Replace EX_TABLE_UA_LOAD_MEM exception handling
authorHeiko Carstens <hca@linux.ibm.com>
Mon, 13 Jan 2025 12:37:04 +0000 (13:37 +0100)
committerAlexander Gordeev <agordeev@linux.ibm.com>
Sun, 26 Jan 2025 16:24:06 +0000 (17:24 +0100)
commitdc7ff4b8cb782901c0c6809c708502293165a780
tree92b722da93c2f0f1dc745688493397d5feef3d34
parent67e959af254fe842c7b2ba4396c931985b289ef9
s390/uaccess: Replace EX_TABLE_UA_LOAD_MEM exception handling

Remove EX_TABLE_UA_LOAD_MEM exception handling and replace it with
EX_TABLE_UA_FAULT. Open code the return code check, and also open code
setting of the destination to zero in case of an error. In almost all cases
the compiler is able to optimize the open coded checks away, since all
users of get_users() must check the return code, and are not supposed to
use the result in case of an error.

In addition this allows to change the get_user() inline assembly so that
the "Q" constraint can be used for the destination, instead of only an "a"
constraint. This generates slightly better code.

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