• Mikulas Patocka's avatar
    parisc: fix bugs in pa_memcpy · 1681bab7
    Mikulas Patocka authored
    commit 409c1b25 upstream.
    The patch 554bfece ("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
    * 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
    Fixes: 554bfece ("parisc: Fix access fault handling in pa_memcpy()")
    Signed-off-by: default avatarMikulas Patocka <mpatocka@redhat.com>
    Signed-off-by: default avatarHelge Deller <deller@gmx.de>
    Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Last commit
Last update
Makefile Loading commit data...
bitops.c Loading commit data...
checksum.c Loading commit data...
delay.c Loading commit data...
io.c Loading commit data...
iomap.c Loading commit data...
lusercopy.S Loading commit data...
memcpy.c Loading commit data...
memset.c Loading commit data...
ucmpdi2.c Loading commit data...