Re: [PATCH v3 3/3] crypto: lib - remove __HAVE_ARCH_CRYPTO_MEMNEQ

From: Eric Biggers
Date: Mon Jul 25 2022 - 20:51:28 EST


On Tue, Jul 26, 2022 at 12:07:06AM +0200, Jason A. Donenfeld wrote:
> On Mon, Jul 25, 2022 at 11:36:36AM -0700, Eric Biggers wrote:
> > From: Eric Biggers <ebiggers@xxxxxxxxxx>
> >
> > No architecture actually defines this, so it's unneeded.
> >
> > Signed-off-by: Eric Biggers <ebiggers@xxxxxxxxxx>
>
> Reviewed-by: Jason A. Donenfeld <Jason@xxxxxxxxx>
>
> Aside: out of curiosity, I wonder what was originally intended with
> this, which magic arch-specific instructions were thought to be
> potentially of aid.

The original commit (6bf37e5aa90f) says:

Similarly to kernel library string functions, leave an option for future
even further optimized architecture specific assembler implementations.

But so far no one has bothered. It's already optimized to use 'long' accesses,
so I wouldn't expect it to get much faster with assembly.

- Eric