linux-sh.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Guenter Roeck <linux@roeck-us.net>
To: John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de>,
	Yoshinori Sato <ysato@users.sourceforge.jp>
Cc: Rich Felker <dalias@libc.org>,
	linux-sh@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] Revert "sh: Handle calling csum_partial with misaligned data"
Date: Mon, 25 Mar 2024 07:34:00 -0700	[thread overview]
Message-ID: <a9ac59cd-82db-45a0-9f85-ec3880c54dbf@roeck-us.net> (raw)
In-Reply-To: <059d03a5da257660fa0bc188c6cc8d0152e97704.camel@physik.fu-berlin.de>

On 3/25/24 00:39, John Paul Adrian Glaubitz wrote:
> Hi Guenter,
> 
> On Sun, 2024-03-24 at 16:18 -0700, Guenter Roeck wrote:
>> This reverts commit cadc4e1a2b4d20d0cc0e81f2c6ba0588775e54e5.
>>
>> Commit cadc4e1a2b4d ("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
> 
> Can you tell me how the tests are run so I can try to verify this on real hardware?
> 

Enabling CONFIG_KUNIT and CHECKSUM_KUNIT and booting with those tests enabled
should do it.

Thanks,
Guenter


  reply	other threads:[~2024-03-25 14:34 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-24 23:18 [PATCH] Revert "sh: Handle calling csum_partial with misaligned data" Guenter Roeck
2024-03-25  7:39 ` John Paul Adrian Glaubitz
2024-03-25 14:34   ` Guenter Roeck [this message]
2024-04-02 14:06     ` Guenter Roeck
2024-04-02 14:09       ` John Paul Adrian Glaubitz
2024-05-01  8:28         ` John Paul Adrian Glaubitz
2024-05-01 14:44           ` Guenter Roeck
2024-05-01 14:49             ` John Paul Adrian Glaubitz
2024-05-02  7:21           ` Geert Uytterhoeven
2024-05-02  7:23             ` John Paul Adrian Glaubitz
2024-03-25 15:35   ` Guenter Roeck
2024-05-02 10:28 ` John Paul Adrian Glaubitz

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=a9ac59cd-82db-45a0-9f85-ec3880c54dbf@roeck-us.net \
    --to=linux@roeck-us.net \
    --cc=dalias@libc.org \
    --cc=glaubitz@physik.fu-berlin.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-sh@vger.kernel.org \
    --cc=ysato@users.sourceforge.jp \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).