linux/arch/riscv/lib
Alan Kao ebcbd75e39
riscv: Fix the bug in memory access fixup code
A piece of fixup code is currently shared by __copy_user and
__clear_user.  It first disables the access to user-space memory
and then returns the "n" argument, which represents #(bytes not processed).
However,__copy_user's "n" is in register a2, while __clear_user's in a1,
and thus it causes errors for programs like setdomainname02 testcase in LTP.

This patch fixes this issue by separating their fixup code and returning
the right value for the kernel to handle a relative fault properly.

Signed-off-by: Alan Kao <alankao@andestech.com>
Cc: Greentime Hu <greentime@andestech.com>
Cc: Zong Li <zong@andestech.com>
Cc: Vincent Chen <vincentc@andestech.com>
Signed-off-by: Palmer Dabbelt <palmer@sifive.com>
2018-06-04 13:33:31 -07:00
..
delay.c RISC-V: Export some expected symbols for modules 2017-11-30 10:01:10 -08:00
Makefile RISC-V: Build Infrastructure 2017-09-26 15:26:49 -07:00
memcpy.S
memset.S
uaccess.S riscv: Fix the bug in memory access fixup code 2018-06-04 13:33:31 -07:00
udivdi3.S