OpenCloudOS-Kernel/arch/parisc/lib
Mikulas Patocka 409c1b250e parisc: fix bugs in pa_memcpy
The patch 554bfeceb8 ("parisc: Fix access
fault handling in pa_memcpy()") reimplements the pa_memcpy function.
Unfortunatelly, it makes the kernel unbootable. The crash happens in the
function ide_complete_cmd where memcpy is called with the same source
and destination address.

This patch fixes a few bugs in pa_memcpy:

* When jumping to .Lcopy_loop_16 for the first time, don't skip the
  instruction "ldi 31,t0" (this bug made the kernel unbootable)
* Use the COND macro when comparing length, so that the comparison is
  64-bit (a theoretical issue, in case the length is greater than
  0xffffffff)
* Don't use the COND macro after the "extru" instruction (the PA-RISC
  specification says that the upper 32-bits of extru result are undefined,
  although they are set to zero in practice)
* Fix exception addresses in .Lcopy16_fault and .Lcopy8_fault
* Rename .Lcopy_loop_4 to .Lcopy_loop_8 (so that it is consistent with
  .Lcopy8_fault)

Cc: <stable@vger.kernel.org> # v4.9+
Fixes: 554bfeceb8 ("parisc: Fix access fault handling in pa_memcpy()")
Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
Signed-off-by: Helge Deller <deller@gmx.de>
2017-04-15 17:24:05 +02:00
..
Makefile parisc: Clean up fixup routines for get_user()/put_user() 2017-03-29 21:50:36 +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
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 bugs in pa_memcpy 2017-04-15 17:24:05 +02: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