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: Fri, 16 May 2025 09:45:12 -0700 [thread overview]
Message-ID: <20250516164512.GC1241@sol> (raw)
In-Reply-To: <aCcCKJ0NpdvIpvsH@gondor.apana.org.au>
On Fri, May 16, 2025 at 05:15:20PM +0800, Herbert Xu wrote:
> 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 :)
I don't think this one is unwarranted. We should keep the error codes simple
and just use ENOENT for algorithms that don't exist. This also affected AF_ALG.
- Eric
prev parent reply other threads:[~2025-05-16 16:45 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
2025-05-16 16:45 ` Eric Biggers [this message]
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=20250516164512.GC1241@sol \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox