Re: [PATCH v2 04/18] crypto: crc32 - don't unnecessarily register arch algorithms

2024-11-02 Thread Milan Broz
On 11/2/24 5:36 PM, Eric Biggers wrote: On Sat, Nov 02, 2024 at 07:08:43PM +0800, Herbert Xu wrote: On Sat, Nov 02, 2024 at 12:05:01PM +0100, Ard Biesheuvel wrote: The only issue resulting from *not* taking this patch is that btrfs may misidentify the CRC32 implementation as being 'slow' and t

Re: [PATCH v2 04/18] crypto: crc32 - don't unnecessarily register arch algorithms

2024-11-02 Thread Ard Biesheuvel
On Sat, 2 Nov 2024 at 17:36, Eric Biggers wrote: > > On Sat, Nov 02, 2024 at 07:08:43PM +0800, Herbert Xu wrote: > > On Sat, Nov 02, 2024 at 12:05:01PM +0100, Ard Biesheuvel wrote: > > > > > > The only issue resulting from *not* taking this patch is that btrfs > > > may misidentify the CRC32 imple

Re: [PATCH v2 04/18] crypto: crc32 - don't unnecessarily register arch algorithms

2024-11-02 Thread Eric Biggers
On Sat, Nov 02, 2024 at 07:08:43PM +0800, Herbert Xu wrote: > On Sat, Nov 02, 2024 at 12:05:01PM +0100, Ard Biesheuvel wrote: > > > > The only issue resulting from *not* taking this patch is that btrfs > > may misidentify the CRC32 implementation as being 'slow' and take an > > alternative code pat

Re: [PATCH v2 04/18] crypto: crc32 - don't unnecessarily register arch algorithms

2024-11-02 Thread Herbert Xu
On Sat, Nov 02, 2024 at 12:05:01PM +0100, Ard Biesheuvel wrote: > > The only issue resulting from *not* taking this patch is that btrfs > may misidentify the CRC32 implementation as being 'slow' and take an > alternative code path, which does not necessarily result in worse > performance. If we we

Re: [PATCH v2 04/18] crypto: crc32 - don't unnecessarily register arch algorithms

2024-11-02 Thread Ard Biesheuvel
On Sat, 2 Nov 2024 at 11:46, Ard Biesheuvel wrote: > > On Sat, 2 Nov 2024 at 11:20, Herbert Xu wrote: > > > > On Sat, Nov 02, 2024 at 10:58:53AM +0100, Ard Biesheuvel wrote: > > > > > > At least btrfs supports a variety of checksums/hashes (crc32c, xxhash, > > > sha) via the shash API. > > > > OK

Re: [PATCH v2 04/18] crypto: crc32 - don't unnecessarily register arch algorithms

2024-11-02 Thread Ard Biesheuvel
On Sat, 2 Nov 2024 at 11:20, Herbert Xu wrote: > > On Sat, Nov 02, 2024 at 10:58:53AM +0100, Ard Biesheuvel wrote: > > > > At least btrfs supports a variety of checksums/hashes (crc32c, xxhash, > > sha) via the shash API. > > OK, given that btrfs is still doing this, I think we should still > regi

Re: [PATCH v2 04/18] crypto: crc32 - don't unnecessarily register arch algorithms

2024-11-02 Thread Herbert Xu
On Sat, Nov 02, 2024 at 10:58:53AM +0100, Ard Biesheuvel wrote: > > At least btrfs supports a variety of checksums/hashes (crc32c, xxhash, > sha) via the shash API. OK, given that btrfs is still doing this, I think we should still register crc32c-arch conditionally. Having it point to crc32c-gene

Re: [PATCH v2 04/18] crypto: crc32 - don't unnecessarily register arch algorithms

2024-11-02 Thread Ard Biesheuvel
On Sat, 2 Nov 2024 at 10:45, Herbert Xu wrote: > > Eric Biggers wrote: > > > > While testing this patchset I notice that none of the crypto API drivers for > > crc32 or crc32c even need to be loaded on my system anymore, as everything > > on my > > system that uses those algorithms (such as ext4

Re: [PATCH v2 04/18] crypto: crc32 - don't unnecessarily register arch algorithms

2024-11-02 Thread Herbert Xu
Eric Biggers wrote: > > While testing this patchset I notice that none of the crypto API drivers for > crc32 or crc32c even need to be loaded on my system anymore, as everything on > my > system that uses those algorithms (such as ext4) just uses the library APIs > now. > That makes the "check /

Re: [PATCH v2 04/18] crypto: crc32 - don't unnecessarily register arch algorithms

2024-10-27 Thread Ard Biesheuvel
On Sat, 26 Oct 2024 at 06:10, Eric Biggers wrote: > > On Fri, Oct 25, 2024 at 10:02:39PM +, Eric Biggers wrote: > > On Fri, Oct 25, 2024 at 10:47:15PM +0200, Ard Biesheuvel wrote: > > > On Fri, 25 Oct 2024 at 21:15, Eric Biggers wrote: > > > > > > > > From: Eric Biggers > > > > > > > > Inste

Re: [PATCH v2 04/18] crypto: crc32 - don't unnecessarily register arch algorithms

2024-10-25 Thread Eric Biggers
On Fri, Oct 25, 2024 at 10:02:39PM +, Eric Biggers wrote: > On Fri, Oct 25, 2024 at 10:47:15PM +0200, Ard Biesheuvel wrote: > > On Fri, 25 Oct 2024 at 21:15, Eric Biggers wrote: > > > > > > From: Eric Biggers > > > > > > Instead of registering the crc32-$arch and crc32c-$arch algorithms if >

Re: [PATCH v2 04/18] crypto: crc32 - don't unnecessarily register arch algorithms

2024-10-25 Thread Eric Biggers
On Fri, Oct 25, 2024 at 10:47:15PM +0200, Ard Biesheuvel wrote: > On Fri, 25 Oct 2024 at 21:15, Eric Biggers wrote: > > > > From: Eric Biggers > > > > Instead of registering the crc32-$arch and crc32c-$arch algorithms if > > the arch-specific code was built, only register them when that code was

Re: [PATCH v2 04/18] crypto: crc32 - don't unnecessarily register arch algorithms

2024-10-25 Thread Ard Biesheuvel
On Fri, 25 Oct 2024 at 21:15, Eric Biggers wrote: > > From: Eric Biggers > > Instead of registering the crc32-$arch and crc32c-$arch algorithms if > the arch-specific code was built, only register them when that code was > built *and* is not falling back to the base implementation at runtime. > >

[PATCH v2 04/18] crypto: crc32 - don't unnecessarily register arch algorithms

2024-10-25 Thread Eric Biggers
From: Eric Biggers Instead of registering the crc32-$arch and crc32c-$arch algorithms if the arch-specific code was built, only register them when that code was built *and* is not falling back to the base implementation at runtime. This avoids confusing users like btrfs which checks the shash dr