public inbox for linux-crypto@vger.kernel.org
 help / color / mirror / Atom feed
From: Herbert Xu <herbert@gondor.apana.org.au>
To: Eric Biggers <ebiggers@kernel.org>
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: Fri, 16 May 2025 17:15:20 +0800	[thread overview]
Message-ID: <aCcCKJ0NpdvIpvsH@gondor.apana.org.au> (raw)
In-Reply-To: <20250515200455.GL1411@quark>

On Thu, May 15, 2025 at 01:04:55PM -0700, Eric Biggers wrote:
>
> 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.

I would consider this a success, it actually caught lrw doing
something silly by trying to allocate "ecb(ecb(XXX))".  Sure we
can sweep all of this under the rug with ENOENT but it might end
up blowing up in a much worse place.

Also I don't think it's true that ecb(ecb(XXX)) will always give an
ENOENT if ecb(XXX) gives an ENOENT.  The error is actually originating
from the lskcipher code, which tries to construct ecb from either an
lskcipher, or a simple cipher.  It is the latter that triggers the
EINVAL error since the ecb template cannot create a simple cipher.

> 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.

I don't ignore all your concerns, just the ones that I think are
unwarranted :)

Cheers,
-- 
Email: Herbert Xu <herbert@gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt

  reply	other threads:[~2025-05-16  9:15 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
2025-05-16  9:15     ` Herbert Xu [this message]
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=aCcCKJ0NpdvIpvsH@gondor.apana.org.au \
    --to=herbert@gondor.apana.org.au \
    --cc=ebiggers@kernel.org \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox