riscv: uaccess: use 'asm_goto_output' for get_user()
authorJisheng Zhang <jszhang@kernel.org>
Thu, 10 Apr 2025 07:05:26 +0000 (07:05 +0000)
committerPalmer Dabbelt <palmer@rivosinc.com>
Thu, 8 May 2025 17:01:00 +0000 (10:01 -0700)
commitf6bff7827a48e59cff1ef98aae72452d65174e0c
treeb0585c193bb888911f2b39cfd6df088226683073
parentcdf647e817143c9762c5bdf724ca2821a171f011
riscv: uaccess: use 'asm_goto_output' for get_user()

With 'asm goto' we don't need to test the error etc, the exception just
jumps to the error handling directly.

Unlike put_user(), get_user() must work around GCC bugs [1] when using
output clobbers in an asm goto statement.

Link: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113921
Signed-off-by: Jisheng Zhang <jszhang@kernel.org>
[Cyril Bur: Rewritten commit message]
Signed-off-by: Cyril Bur <cyrilbur@tenstorrent.com>
Reviewed-by: Alexandre Ghiti <alexghiti@rivosinc.com>
Link: https://lore.kernel.org/r/20250410070526.3160847-6-cyrilbur@tenstorrent.com
Signed-off-by: Palmer Dabbelt <palmer@rivosinc.com>
arch/riscv/include/asm/uaccess.h