linux_dsm_epyc7002/arch/parisc/lib
Helge Deller 554bfeceb8 parisc: Fix access fault handling in pa_memcpy()
pa_memcpy() is the major memcpy implementation in the parisc kernel which is
used to do any kind of userspace/kernel memory copies.

Al Viro noticed various bugs in the implementation of pa_mempcy(), most notably
that in case of faults it may report back to have copied more bytes than it
actually did.

Fixing those bugs is quite hard in the C-implementation, because the compiler
is messing around with the registers and we are not guaranteed that specific
variables are always in the same processor registers. This makes proper fault
handling complicated.

This patch implements pa_memcpy() in assembler. That way we have correct fault
handling and adding a 64-bit copy routine was quite easy.

Runtime tested with 32- and 64bit kernels.

Reported-by: Al Viro <viro@ZenIV.linux.org.uk>
Cc: <stable@vger.kernel.org> # v4.9+
Signed-off-by: John David Anglin <dave.anglin@bell.net>
Signed-off-by: Helge Deller <deller@gmx.de>
2017-03-29 21:49:02 +02:00
..
bitops.c parisc: Add native high-resolution sched_clock() implementation 2016-05-22 21:39:25 +02:00
checksum.c Replace <asm/uaccess.h> with <linux/uaccess.h> globally 2016-12-24 11:46:01 -08:00
delay.c parisc: make udelay() SMP-safe 2013-11-07 22:28:26 +01:00
fixup.S parisc: Add cfi_startproc and cfi_endproc to assembly code 2016-10-05 22:54:40 +02:00
io.c Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
iomap.c parisc: Change structure intialisation to C99 style in iomap.c 2016-08-02 16:44:34 +02:00
lusercopy.S parisc: Fix access fault handling in pa_memcpy() 2017-03-29 21:49:02 +02:00
Makefile parisc: make udelay() SMP-safe 2013-11-07 22:28:26 +01:00
memcpy.c parisc: Fix access fault handling in pa_memcpy() 2017-03-29 21:49:02 +02:00
memset.c Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
ucmpdi2.c parisc: Provide __ucmpdi2 to resolve undefined references in 32 bit builds. 2013-04-25 22:36:15 +02:00