lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Wed, 7 Feb 2024 16:22:34 -0800
From: Charlie Jenkins <charlie@...osinc.com>
To: Guenter Roeck <linux@...ck-us.net>
Cc: David Laight <David.Laight@...lab.com>,
	Palmer Dabbelt <palmer@...belt.com>,
	Andrew Morton <akpm@...ux-foundation.org>,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH v5 2/2] lib: checksum: Use aligned accesses for
 ip_fast_csum and csum_ipv6_magic tests

On Sun, Feb 04, 2024 at 09:41:56AM -0800, Guenter Roeck wrote:
> Hi,
> 
> On Tue, Jan 30, 2024 at 11:10:04AM -0800, Charlie Jenkins wrote:
> > The test cases for ip_fast_csum and csum_ipv6_magic were using arbitrary
> > alignment of data to iterate through random inputs. ip_fast_csum should
> > have the data aligned along (14 + NET_IP_ALIGN) bytes and
> > csum_ipv6_magic should have data aligned along 32-bit boundaries.
> > 
> > While this is being changed, fix up the awkward offset code in
> > test_csum_ipv6_magic and use a struct instead.
> > 
> > Signed-off-by: Charlie Jenkins <charlie@...osinc.com>
> > Tested-by: Guenter Roeck <linux@...ck-us.net>
> > Fixes: 6f4c45cbcb00 ("kunit: Add tests for csum_ipv6_magic and ip_fast_csum")
> 
> So this works on little endian systems. Unfortunately, I still get
> 
> [   18.447037]     # test_ip_fast_csum: ASSERTION FAILED at lib/checksum_kunit.c:463
> [   18.447037]     Expected ( u64)csum_result == ( u64)expected, but
> [   18.447037]         ( u64)csum_result == 33754 (0x83da)
> [   18.447037]         ( u64)expected == 55939 (0xda83)
> [   18.455565]     not ok 4 test_ip_fast_csum
> [   18.463570]     # test_csum_ipv6_magic: ASSERTION FAILED at lib/checksum_kunit.c:487
> [   18.463570]     Expected ( u64)csum_result == ( u64)expected, but
> [   18.463570]         ( u64)csum_result == 12221 (0x2fbd)
> [   18.463570]         ( u64)expected == 37721 (0x9359)
> [   18.470679]     not ok 5 test_csum_ipv6_magic
> 
> when running the test on big endian systems such as hppa/parisc or sparc.

Hmm okay it was easy to get this to work on big endian for
test_ip_fast_csum but test_csum_ipv6_magic was trickier. I will send out
a new version with the changes.

- Charlie

> 
> Guenter

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ