linux/arch/riscv
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
..
configs RISC-V: Enable module support in defconfig 2018-04-02 20:00:56 -07:00
include riscv: there is no <asm/handle_irq.h> 2018-04-24 10:54:23 -07:00
kernel RISC-V: build vdso-dummy.o with -no-pie 2018-04-24 10:54:46 -07:00
lib riscv: Fix the bug in memory access fixup code 2018-06-04 13:33:31 -07:00
mm RISC-V changes for 4.16 2018-02-07 11:33:08 -08:00
Kconfig riscv: select DMA_DIRECT_OPS instead of redefining it 2018-04-24 10:54:08 -07:00
Makefile RISC-V: Fixes to module loading 2018-04-02 20:43:14 -07:00