All of lore.kernel.org
 help / color / mirror / Atom feed
From: Eric Biggers <ebiggers@kernel.org>
To: Herbert Xu <herbert@gondor.apana.org.au>
Cc: kernel test robot <oliver.sang@intel.com>,
	oe-lkp@lists.linux.dev, lkp@intel.com,
	linux-crypto@vger.kernel.org
Subject: Re: [PATCH] crypto: lrw - Only add ecb if it is not already there
Date: Thu, 15 May 2025 13:04:55 -0700	[thread overview]
Message-ID: <20250515200455.GL1411@quark> (raw)
In-Reply-To: <aCWlmOE6VQJoYeaJ@gondor.apana.org.au>

On Thu, May 15, 2025 at 04:28:08PM +0800, Herbert Xu wrote:
> On Thu, May 15, 2025 at 03:41:05PM +0800, kernel test robot wrote:
> >
> > [   16.077514][  T327] ------------[ cut here ]------------
> > [   16.079451][  T327] alg: self-tests for lrw(twofish) using lrw(ecb(twofish-asm)) failed (rc=-22)
> 
> The crucial line actually got cut off:
> 
> alg: skcipher: error allocating lrw(ecb(twofish-generic)) (generic impl of lrw(twofish)): -22
> 
> The bug is in lrw, which unconditionally adds ecb() around its
> parameter, so we end up with ecb(ecb(twofish-generic)), which is
> then correctly rejected by the ecb template when it tries to
> create the inner ecb(twofish-generic) as a simple cipher.

Please include this explanation in the commit message itself.

Also adding ecb wasn't unconditional, but only if it wasn't found with one ecb.

> Fixes: 700cb3f5fe75 ("crypto: lrw - Convert to skcipher")

It didn't actually make a difference until 795f85fca229 ("crypto: algboss - Pass
instance creation error up") though, right?  Before then, if "ecb(...)" gave
ENOENT then "ecb(ecb(...))" gave ENOENT too.

As I said in
https://lore.kernel.org/linux-crypto/20240924222839.GC1585@sol.localdomain/,
that commit (which had no explanation) just seems wrong.  We should have simply
stuck with ENOENT.

But as usual my concern just got ignored and it got pushed out anyway.

- Eric

  reply	other threads:[~2025-05-15 20:04 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-05-15  7:41 [linux-next:master] [crypto] 698de82278: WARNING:at_crypto/testmgr.c:#alg_test kernel test robot
2025-05-15  8:28 ` [PATCH] crypto: lrw - Only add ecb if it is not already there Herbert Xu
2025-05-15 20:04   ` Eric Biggers [this message]
2025-05-16  9:15     ` Herbert Xu
2025-05-16 16:45       ` Eric Biggers

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=20250515200455.GL1411@quark \
    --to=ebiggers@kernel.org \
    --cc=herbert@gondor.apana.org.au \
    --cc=linux-crypto@vger.kernel.org \
    --cc=lkp@intel.com \
    --cc=oe-lkp@lists.linux.dev \
    --cc=oliver.sang@intel.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.