riscv: lib: uaccess: fold fixups into body
authorJisheng Zhang <jszhang@kernel.org>
Thu, 18 Nov 2021 11:25:14 +0000 (19:25 +0800)
committerPalmer Dabbelt <palmer@rivosinc.com>
Thu, 6 Jan 2022 01:52:39 +0000 (17:52 -0800)
commit9d504f9aa5c1b76673018da9503e76b351a24b8c
tree103562bddbad3b5421870983ac69cc20fbcacea7
parent4c2e7ce8b9864fa1c5f9fc5ea19af11205730cd6
riscv: lib: uaccess: fold fixups into body

uaccess functions such __asm_copy_to_user(),  __arch_copy_from_user()
and __clear_user() place their exception fixups in the `.fixup` section
without any clear association with themselves. If we backtrace the
fixup code, it will be symbolized as an offset from the nearest prior
symbol.

Similar as arm64 does, we must move fixups into the body of the
functions themselves, after the usual fast-path returns.

Signed-off-by: Jisheng Zhang <jszhang@kernel.org>
Signed-off-by: Palmer Dabbelt <palmer@rivosinc.com>
arch/riscv/lib/uaccess.S