WSL2-Linux-Kernel/arch/sh/lib
Guenter Roeck 1e6a567266 Revert "sh: Handle calling csum_partial with misaligned data"
[ Upstream commit b5319c96292ff877f6b58d349acf0a9dc8d3b454 ]

This reverts commit cadc4e1a2b.

Commit cadc4e1a2b ("sh: Handle calling csum_partial with misaligned
data") causes bad checksum calculations on unaligned data. Reverting
it fixes the problem.

    # Subtest: checksum
    # module: checksum_kunit
    1..5
    # test_csum_fixed_random_inputs: ASSERTION FAILED at lib/checksum_kunit.c:500
    Expected ( u64)result == ( u64)expec, but
        ( u64)result == 53378 (0xd082)
        ( u64)expec == 33488 (0x82d0)
    # test_csum_fixed_random_inputs: pass:0 fail:1 skip:0 total:1
    not ok 1 test_csum_fixed_random_inputs
    # test_csum_all_carry_inputs: ASSERTION FAILED at lib/checksum_kunit.c:525
    Expected ( u64)result == ( u64)expec, but
        ( u64)result == 65281 (0xff01)
        ( u64)expec == 65280 (0xff00)
    # test_csum_all_carry_inputs: pass:0 fail:1 skip:0 total:1
    not ok 2 test_csum_all_carry_inputs
    # test_csum_no_carry_inputs: ASSERTION FAILED at lib/checksum_kunit.c:573
    Expected ( u64)result == ( u64)expec, but
        ( u64)result == 65535 (0xffff)
        ( u64)expec == 65534 (0xfffe)
    # test_csum_no_carry_inputs: pass:0 fail:1 skip:0 total:1
    not ok 3 test_csum_no_carry_inputs
    # test_ip_fast_csum: pass:1 fail:0 skip:0 total:1
    ok 4 test_ip_fast_csum
    # test_csum_ipv6_magic: pass:1 fail:0 skip:0 total:1
    ok 5 test_csum_ipv6_magic
 # checksum: pass:2 fail:3 skip:0 total:5
 # Totals: pass:2 fail:3 skip:0 total:5
not ok 22 checksum

Fixes: cadc4e1a2b ("sh: Handle calling csum_partial with misaligned data")
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Tested-by: Geert Uytterhoeven <geert+renesas@glider.be>
Reviewed-by: John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de>
Link: https://lore.kernel.org/r/20240324231804.841099-1-linux@roeck-us.net
Signed-off-by: John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-06-16 13:39:23 +02:00
..
Makefile sh: remove -Werror from Makefiles 2020-08-14 22:05:13 -04:00
__clear_user.S License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
ashiftrt.S sh: lib: convert to SPDX identifiers 2018-12-28 12:11:45 -08:00
ashldi3.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
ashlsi3.S sh: lib: convert to SPDX identifiers 2018-12-28 12:11:45 -08:00
ashrdi3.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
ashrsi3.S sh: lib: convert to SPDX identifiers 2018-12-28 12:11:45 -08:00
checksum.S Revert "sh: Handle calling csum_partial with misaligned data" 2024-06-16 13:39:23 +02:00
copy_page.S License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
delay.c Revert "sh: add missing EXPORT_SYMBOL() for __delay" 2020-08-14 22:05:04 -04:00
div64-generic.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
div64.S License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
io.c sh: lib: convert to SPDX identifiers 2018-12-28 12:11:45 -08:00
libgcc.h sh: lib: convert to SPDX identifiers 2018-12-28 12:11:45 -08:00
lshrdi3.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
lshrsi3.S sh: lib: convert to SPDX identifiers 2018-12-28 12:11:45 -08:00
mcount.S sh: lib: convert to SPDX identifiers 2018-12-28 12:11:45 -08:00
memchr.S License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
memcpy-sh4.S License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
memcpy.S License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
memmove.S License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
memset-sh4.S License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
memset.S License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
movmem.S sh: lib: convert to SPDX identifiers 2018-12-28 12:11:45 -08:00
strlen.S License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
udiv_qrnnd.S sh: lib: convert to SPDX identifiers 2018-12-28 12:11:45 -08:00
udivsi3.S sh: lib: convert to SPDX identifiers 2018-12-28 12:11:45 -08:00
udivsi3_i4i-Os.S sh: lib: convert to SPDX identifiers 2018-12-28 12:11:45 -08:00
udivsi3_i4i.S sh: lib: convert to SPDX identifiers 2018-12-28 12:11:45 -08:00