From: Eric Biggers <ebiggers@kernel.org>
To: Herbert Xu <herbert@gondor.apana.org.au>
Cc: Linux Crypto Mailing List <linux-crypto@vger.kernel.org>
Subject: Re: [v4 PATCH 00/11] crypto: Add partial block API and hmac to ahash
Date: Fri, 16 May 2025 18:17:04 -0700 [thread overview]
Message-ID: <20250517011704.GA1220@sol> (raw)
In-Reply-To: <aCfcDJX5XRUwnx-a@gondor.apana.org.au>
On Sat, May 17, 2025 at 08:45:00AM +0800, Herbert Xu wrote:
> On Fri, May 16, 2025 at 09:43:26AM -0700, Eric Biggers wrote:
> >
> > So how come this hasn't been a problem until now?
>
> It is the key to getting rid of the ban on memory allocation
> for ahash drivers. Small memory allocations fail very rarely,
> yet we're banning the use of all drivers doing any memory allocations
> because they may fail.
Does anyone really care? The fact that dm-crypt hasn't been able to use most of
the hardware drivers for years just further emphasizes that those drivers don't
really even matter. I remember seeing one complaint and that was it.
> With a consistent export format, we could simply fallback to
> software when the rare OOM strikes, thus getting rid of the
> ban on memory allocations.
There's already a huge quality problem with the drivers. The last thing they
need is to have special code that runs only when an OOM condition occurs, which
won't be tested.
Can they really not just use mempools?
I'll also note that the whole concept of fallback ciphers is kind of broken, as
was established earlier. The correct thing to do would be to fall back to
lib/crypto/, not to call into the legacy crypto API recursively.
- Eric
next prev parent reply other threads:[~2025-05-17 1:17 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-05-15 5:54 [v4 PATCH 00/11] crypto: Add partial block API and hmac to ahash Herbert Xu
2025-05-15 5:54 ` [v4 PATCH 01/11] crypto: hash - Move core export and import into internel/hash.h Herbert Xu
2025-05-15 5:54 ` [v4 PATCH 02/11] crypto: hash - Add export_core and import_core hooks Herbert Xu
2025-05-15 5:54 ` [v4 PATCH 03/11] crypto: ahash - Handle partial blocks in API Herbert Xu
2025-05-15 5:54 ` [v4 PATCH 04/11] crypto: hmac - Zero shash desc in setkey Herbert Xu
2025-05-15 5:54 ` [v4 PATCH 05/11] crypto: hmac - Add export_core and import_core Herbert Xu
2025-05-15 5:54 ` [v4 PATCH 06/11] crypto: shash - Set reqsize in shash_alg Herbert Xu
2025-05-15 19:32 ` Eric Biggers
2025-05-15 5:54 ` [v4 PATCH 07/11] crypto: algapi - Add driver template support to crypto_inst_setname Herbert Xu
2025-05-15 19:33 ` Eric Biggers
2025-05-15 5:54 ` [v4 PATCH 08/11] crypto: testmgr - Ignore EEXIST on shash allocation Herbert Xu
2025-05-15 5:54 ` [v4 PATCH 09/11] crypto: hmac - Add ahash support Herbert Xu
2025-05-15 5:54 ` [v4 PATCH 10/11] crypto: testmgr - Use ahash for generic tfm Herbert Xu
2025-05-15 19:30 ` Eric Biggers
2025-05-15 5:54 ` [v4 PATCH 11/11] crypto: testmgr - Add hash export format testing Herbert Xu
2025-05-15 19:35 ` [v4 PATCH 00/11] crypto: Add partial block API and hmac to ahash Eric Biggers
2025-05-16 9:23 ` Herbert Xu
2025-05-16 16:43 ` Eric Biggers
2025-05-17 0:45 ` Herbert Xu
2025-05-17 1:17 ` Eric Biggers [this message]
2025-05-17 1:25 ` Herbert Xu
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=20250517011704.GA1220@sol \
--to=ebiggers@kernel.org \
--cc=herbert@gondor.apana.org.au \
--cc=linux-crypto@vger.kernel.org \
/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