linux-stable/arch/sh
Guenter Roeck 019ae041a5 Revert "sh: Handle calling csum_partial with misaligned data"
[ Upstream commit b5319c9629 ]

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:32:07 +02:00
..
boards sh: boards: Fix CEU buffer size passed to dma_declare_coherent_memory() 2023-09-19 12:20:27 +02:00
boot kbuild: introduce ccflags-remove-y and asflags-remove-y 2020-08-10 01:32:59 +09:00
cchips treewide: replace '---help---' in Kconfig files with 'help' 2020-06-14 01:57:21 +09:00
configs Cleanup, SECCOMP_FILTER support, message printing fixes, and other 2020-08-15 18:50:32 -07:00
drivers sh: dma: Fix DMA channel offset calculation 2023-07-27 08:44:10 +02:00
include sh/cpu: Switch to arch_cpu_finalize_init() 2023-08-08 19:57:36 +02:00
kernel sh: kprobes: Merge arch_copy_kprobe() into arch_prepare_kprobe() 2024-06-16 13:32:07 +02:00
lib Revert "sh: Handle calling csum_partial with misaligned data" 2024-06-16 13:32:07 +02:00
math-emu sh: math-emu: fix macro redefined warning 2023-05-17 11:48:14 +02:00
mm arch, mm: replace for_each_memblock() with for_each_mem_pfn_range() 2020-10-13 18:38:35 -07:00
oprofile sh: stacktrace: Remove stacktrace_ops.stack() 2020-08-14 22:05:11 -04:00
tools sh: Remove SH5-based Cayman platform 2020-08-14 22:05:06 -04:00
Kconfig sh/cpu: Switch to arch_cpu_finalize_init() 2023-08-08 19:57:36 +02:00
Kconfig.cpu docs: sh: convert register-banks.txt to ReST 2020-06-19 14:10:13 -06:00
Kconfig.debug sh: bios: Revive earlyprintk support 2023-11-20 11:06:51 +01:00
Makefile sh: Remove SH5-based Cayman platform 2020-08-14 22:05:06 -04:00