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

Eric Biggers
2022-07-26T00:51:28Z

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@google.com>
> >
> > No architecture actually defines this, so it's unneeded.
> >
> > Signed-off-by: Eric Biggers <ebiggers@google.com>
>
> Reviewed-by: Jason A. Donenfeld <Jason@zx2c4.com>
>
> 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