From: Charlie Jenkins <charlie@rivosinc.com>
To: Guenter Roeck <linux@roeck-us.net>
Cc: Christophe Leroy <christophe.leroy@csgroup.eu>,
"Russell King (Oracle)" <linux@armlinux.org.uk>,
David Laight <David.Laight@aculab.com>,
Palmer Dabbelt <palmer@dabbelt.com>,
Andrew Morton <akpm@linux-foundation.org>,
Helge Deller <deller@gmx.de>,
"James E.J. Bottomley" <James.Bottomley@hansenpartnership.com>,
Parisc List <linux-parisc@vger.kernel.org>,
Arnd Bergmann <arnd@arndb.de>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
Palmer Dabbelt <palmer@rivosinc.com>,
Linux ARM <linux-arm-kernel@lists.infradead.org>
Subject: Re: [PATCH v10] lib: checksum: Use aligned accesses for ip_fast_csum and csum_ipv6_magic tests
Date: Tue, 27 Feb 2024 16:24:05 -0800 [thread overview]
Message-ID: <Zd59JXTPPcqJblgD@ghost> (raw)
In-Reply-To: <4d5ce145-22be-4683-b3a9-4de77da87b76@roeck-us.net>
On Tue, Feb 27, 2024 at 11:31:01AM -0800, Guenter Roeck wrote:
> On 2/27/24 09:54, Charlie Jenkins wrote:
>
> > > It's been suggested during the discussion that alignment tests should be
> > > added later in a follow-up patch. So for the time being I'm trying to
> > > find a compromise and get the existing tests working on all platforms
> > > but with a smaller alignment than the 16-bytes alignment brought by
> > > Charlie's v10 patch. And a 4 bytes alignment seemed to me to be a good
> > > compromise for this fix. The idea is also to make the fix as minimal as
> > > possible, unlike Charlie's patch that is churning up the tests quite
> > > heavily.
> >
> > Do you have a list of platforms this is failing on? I haven't seen any
> > reports that haven't been fixed.
> >
>
> This is what I carry locally on top of v6.8-rc6:
>
> 097b149e4acb parisc: More csum_ipv6_magic fixes
> 15bf67a115eb kunit: Fix again checksum tests on big endian CPUs
> bebe776d36ea parisc: Fix csum_ipv6_magic on 64-bit systems
> 523208f03063 parisc: Fix csum_ipv6_magic on 32-bit systems
> a9dda1971c72 parisc: Fix ip_fast_csum
> 2ad0a6850b64 Revert "sh: Handle calling csum_partial with misaligned data"
> 7113cc414860 lib: checksum: Use aligned accesses for ip_fast_csum and csum_ipv6_magic tests
>
> I also have
> 0dd01a364cb7 lib: checksum: Add some corner cases to IPv6 checksum tests
> e767cce6598b lib: checksum: Add tests for unaligned IPv6 addresses
>
> which I may submit or not depending on the outcome of this discussion.
>
> In other words, parisc and sh4 are currently known to be broken in the
> upstream kernel, with fixes pending. On top of that, arm:mps2-an385
> (probably all arm:nommu systems) crashes hard if csum_ipv6_magic()
> is called with an unaligned address.
>
> This is the "known" list of failures. I don't currently run kunit tests
> on nios2 or riscv32, for example, nor on any architectures with no qemu
> support.
>
> On a side note, most architectures don't handle "len + proto" overflows.
> While 'len' is a 32-bit parameter, IPv6 only allows for a 16-bit length
> field. Many implementations of csum_ipv6_magic() specifically do
> not handle such overflows because that would be pointless and require
> extra code for no good reason. The current test code doesn't generate
> such overflows, but its 'len' parameter is almost always larger than
> 16 bit and thus not realistic. Maybe it would make sense to limit
> the range of 'len' to 16 bit when calling csum_ipv6_magic().
Thank you for the suggestion, I can limit len to 16-bit.
- Charlie
>
> Thanks,
> Guenter
>
WARNING: multiple messages have this Message-ID (diff)
From: Charlie Jenkins <charlie@rivosinc.com>
To: Guenter Roeck <linux@roeck-us.net>
Cc: Christophe Leroy <christophe.leroy@csgroup.eu>,
"Russell King (Oracle)" <linux@armlinux.org.uk>,
David Laight <David.Laight@aculab.com>,
Palmer Dabbelt <palmer@dabbelt.com>,
Andrew Morton <akpm@linux-foundation.org>,
Helge Deller <deller@gmx.de>,
"James E.J. Bottomley" <James.Bottomley@hansenpartnership.com>,
Parisc List <linux-parisc@vger.kernel.org>,
Arnd Bergmann <arnd@arndb.de>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
Palmer Dabbelt <palmer@rivosinc.com>,
Linux ARM <linux-arm-kernel@lists.infradead.org>
Subject: Re: [PATCH v10] lib: checksum: Use aligned accesses for ip_fast_csum and csum_ipv6_magic tests
Date: Tue, 27 Feb 2024 16:24:05 -0800 [thread overview]
Message-ID: <Zd59JXTPPcqJblgD@ghost> (raw)
In-Reply-To: <4d5ce145-22be-4683-b3a9-4de77da87b76@roeck-us.net>
On Tue, Feb 27, 2024 at 11:31:01AM -0800, Guenter Roeck wrote:
> On 2/27/24 09:54, Charlie Jenkins wrote:
>
> > > It's been suggested during the discussion that alignment tests should be
> > > added later in a follow-up patch. So for the time being I'm trying to
> > > find a compromise and get the existing tests working on all platforms
> > > but with a smaller alignment than the 16-bytes alignment brought by
> > > Charlie's v10 patch. And a 4 bytes alignment seemed to me to be a good
> > > compromise for this fix. The idea is also to make the fix as minimal as
> > > possible, unlike Charlie's patch that is churning up the tests quite
> > > heavily.
> >
> > Do you have a list of platforms this is failing on? I haven't seen any
> > reports that haven't been fixed.
> >
>
> This is what I carry locally on top of v6.8-rc6:
>
> 097b149e4acb parisc: More csum_ipv6_magic fixes
> 15bf67a115eb kunit: Fix again checksum tests on big endian CPUs
> bebe776d36ea parisc: Fix csum_ipv6_magic on 64-bit systems
> 523208f03063 parisc: Fix csum_ipv6_magic on 32-bit systems
> a9dda1971c72 parisc: Fix ip_fast_csum
> 2ad0a6850b64 Revert "sh: Handle calling csum_partial with misaligned data"
> 7113cc414860 lib: checksum: Use aligned accesses for ip_fast_csum and csum_ipv6_magic tests
>
> I also have
> 0dd01a364cb7 lib: checksum: Add some corner cases to IPv6 checksum tests
> e767cce6598b lib: checksum: Add tests for unaligned IPv6 addresses
>
> which I may submit or not depending on the outcome of this discussion.
>
> In other words, parisc and sh4 are currently known to be broken in the
> upstream kernel, with fixes pending. On top of that, arm:mps2-an385
> (probably all arm:nommu systems) crashes hard if csum_ipv6_magic()
> is called with an unaligned address.
>
> This is the "known" list of failures. I don't currently run kunit tests
> on nios2 or riscv32, for example, nor on any architectures with no qemu
> support.
>
> On a side note, most architectures don't handle "len + proto" overflows.
> While 'len' is a 32-bit parameter, IPv6 only allows for a 16-bit length
> field. Many implementations of csum_ipv6_magic() specifically do
> not handle such overflows because that would be pointless and require
> extra code for no good reason. The current test code doesn't generate
> such overflows, but its 'len' parameter is almost always larger than
> 16 bit and thus not realistic. Maybe it would make sense to limit
> the range of 'len' to 16 bit when calling csum_ipv6_magic().
Thank you for the suggestion, I can limit len to 16-bit.
- Charlie
>
> Thanks,
> Guenter
>
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
next prev parent reply other threads:[~2024-02-28 0:24 UTC|newest]
Thread overview: 77+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-02-23 22:11 [PATCH v10] lib: checksum: Use aligned accesses for ip_fast_csum and csum_ipv6_magic tests Charlie Jenkins
2024-02-25 15:58 ` Guenter Roeck
2024-02-26 11:34 ` Christophe Leroy
2024-02-26 11:34 ` Christophe Leroy
2024-02-26 11:47 ` Russell King (Oracle)
2024-02-26 11:47 ` Russell King (Oracle)
2024-02-26 11:57 ` Christophe Leroy
2024-02-26 11:57 ` Christophe Leroy
2024-02-26 12:03 ` Russell King (Oracle)
2024-02-26 12:03 ` Russell King (Oracle)
2024-02-26 16:44 ` Guenter Roeck
2024-02-26 16:44 ` Guenter Roeck
2024-02-26 17:50 ` Russell King (Oracle)
2024-02-26 17:50 ` Russell King (Oracle)
2024-02-26 18:35 ` Charlie Jenkins
2024-02-26 18:35 ` Charlie Jenkins
2024-02-26 19:06 ` Russell King (Oracle)
2024-02-26 19:06 ` Russell King (Oracle)
2024-02-26 19:19 ` Charlie Jenkins
2024-02-26 19:19 ` Charlie Jenkins
2024-02-26 22:33 ` David Laight
2024-02-26 22:33 ` David Laight
2024-02-26 23:17 ` Charlie Jenkins
2024-02-26 23:17 ` Charlie Jenkins
2024-02-26 23:48 ` Guenter Roeck
2024-02-26 23:48 ` Guenter Roeck
2024-02-27 6:47 ` Christophe Leroy
2024-02-27 6:47 ` Christophe Leroy
2024-02-27 10:28 ` Russell King (Oracle)
2024-02-27 10:28 ` Russell King (Oracle)
2024-02-27 11:32 ` Christophe Leroy
2024-02-27 11:32 ` Christophe Leroy
2024-02-27 17:54 ` Charlie Jenkins
2024-02-27 17:54 ` Charlie Jenkins
2024-02-27 18:11 ` Christophe Leroy
2024-02-27 18:11 ` Christophe Leroy
2024-02-27 18:21 ` Charlie Jenkins
2024-02-27 18:21 ` Charlie Jenkins
2024-02-27 18:35 ` Christophe Leroy
2024-02-27 18:35 ` Christophe Leroy
2024-02-27 19:04 ` Charlie Jenkins
2024-02-27 19:04 ` Charlie Jenkins
2024-02-27 19:31 ` Guenter Roeck
2024-02-27 19:31 ` Guenter Roeck
2024-02-27 22:44 ` David Laight
2024-02-27 22:44 ` David Laight
2024-02-28 5:19 ` Guenter Roeck
2024-02-28 5:19 ` Guenter Roeck
2024-02-28 0:24 ` Charlie Jenkins [this message]
2024-02-28 0:24 ` Charlie Jenkins
2024-02-28 0:21 ` Charlie Jenkins
2024-02-28 0:21 ` Charlie Jenkins
2024-02-28 7:25 ` Christophe Leroy
2024-02-28 7:25 ` Christophe Leroy
2024-02-28 7:59 ` Guenter Roeck
2024-02-28 7:59 ` Guenter Roeck
2024-02-28 10:15 ` Geert Uytterhoeven
2024-02-28 10:15 ` Geert Uytterhoeven
2024-02-28 15:40 ` Guenter Roeck
2024-02-28 15:40 ` Guenter Roeck
2024-02-29 8:07 ` David Gow
2024-02-29 8:07 ` David Gow
2024-02-29 8:07 ` David Gow
2024-02-29 19:38 ` Charlie Jenkins
2024-02-29 19:38 ` Charlie Jenkins
2024-02-29 20:22 ` Guenter Roeck
2024-02-29 20:22 ` Guenter Roeck
2024-03-01 7:00 ` Christophe Leroy
2024-03-01 7:00 ` Christophe Leroy
2024-03-01 6:46 ` Christophe Leroy
2024-03-01 6:46 ` Christophe Leroy
2024-03-01 16:24 ` Guenter Roeck
2024-03-01 16:24 ` Guenter Roeck
2024-03-01 20:47 ` Guenter Roeck
2024-03-01 20:47 ` Guenter Roeck
2024-02-27 11:17 ` Geert Uytterhoeven
2024-02-27 17:55 ` Charlie Jenkins
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=Zd59JXTPPcqJblgD@ghost \
--to=charlie@rivosinc.com \
--cc=David.Laight@aculab.com \
--cc=James.Bottomley@hansenpartnership.com \
--cc=akpm@linux-foundation.org \
--cc=arnd@arndb.de \
--cc=christophe.leroy@csgroup.eu \
--cc=deller@gmx.de \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-parisc@vger.kernel.org \
--cc=linux@armlinux.org.uk \
--cc=linux@roeck-us.net \
--cc=palmer@dabbelt.com \
--cc=palmer@rivosinc.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.