linux-crypto.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Eric Biggers <ebiggers@kernel.org>
To: Herbert Xu <herbert@gondor.apana.org.au>
Cc: Linux Crypto Mailing List <linux-crypto@vger.kernel.org>,
	Ard Biesheuvel <ardb@kernel.org>,
	Megha Dey <megha.dey@linux.intel.com>,
	Tim Chen <tim.c.chen@linux.intel.com>
Subject: Re: [v2 PATCH 00/11] Multibuffer hashing take two
Date: Tue, 18 Feb 2025 17:48:10 +0000	[thread overview]
Message-ID: <20250218174810.GA4100189@google.com> (raw)
In-Reply-To: <Z7RcnKGNGP50mdb-@gondor.apana.org.au>

On Tue, Feb 18, 2025 at 06:10:36PM +0800, Herbert Xu wrote:
> On Sun, Feb 16, 2025 at 11:51:29AM -0800, Eric Biggers wrote:
> >
> > But of course, there is no need to go there in the first place.  Cryptographic
> > APIs should be simple and not include unnecessary edge cases.  It seems you
> > still have a misconception that your more complex API would make my work useful
> > for IPsec, but again that is still incorrect, as I've explained many times.  The
> > latest bogus claims that you've been making, like that GHASH is not
> > parallelizable, don't exactly inspire confidence either.
> 
> Sure, everyone hates complexity.  But you're not removing it.

I'm avoiding adding it in the first place.

> You're simply pushing the complexity into the algorithm implementation
> and more importantly, the user.  With your interface the user has to
> jump through unnecessary hoops to get multiple requests going, which
> is probably why you limited it to just 2.
> 
> If anything we should be pushing the complexity into the API code
> itself and away from the algorithm implementation.  Why? Because
> it's shared and therefore the test coverage works much better.
> 
> Look over the years at how many buggy edge cases such as block
> left-overs we have had in arch crypto code.  Now if those edge
> cases were moved into shared API code it would be much better.
> Sure it could still be buggy, but it would affect everyone
> equally and that means it's much easier to catch.

You cannot ignore complexity in the API, as that is the worst kind.

In addition, your (slower) solution has a large amount of complexity in the
per-algorithm glue code, making it still more lines of code *per algorithm* than
my (faster) solution, which you're ignoring.

Also, users still have to queue up multiple requests anyway.  There are no
"unnecessary hoops" with my patches -- just a faster, simpler, easier to use and
less error-prone API.

>     Memory allocations can always fail, but they *rarely* do.  Resolve
>     the OOM case by using a stack request as a fallback.

Rarely executed fallbacks that are only executed in extremely rare OOM
situations that won't be covered by xfstests?  No thank you.  Why would you even
think that would be reasonable?

Anyway, I am getting tired of responding to all your weird arguments that don't
bring anything new to the table.  Please continue to treat your patches as
nacked and don't treat silence as agreement.  I am just tired of this.

- Eric

  reply	other threads:[~2025-02-18 17:48 UTC|newest]

Thread overview: 42+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-02-16  3:07 [v2 PATCH 00/11] Multibuffer hashing take two Herbert Xu
2025-02-16  3:07 ` [v2 PATCH 01/11] crypto: ahash - Only save callback and data in ahash_save_req Herbert Xu
2025-02-16  3:07 ` [v2 PATCH 02/11] crypto: x86/ghash - Use proper helpers to clone request Herbert Xu
2025-02-16  3:07 ` [v2 PATCH 03/11] crypto: hash - Add request chaining API Herbert Xu
2025-03-26  9:00   ` Manorit Chawdhry
2025-03-26  9:17     ` [PATCH] crypto: sa2ul - Use proper helpers to setup request Herbert Xu
2025-03-26 10:00       ` Manorit Chawdhry
2025-03-26 10:05         ` [v2 PATCH] " Herbert Xu
2025-03-26 12:31           ` Manorit Chawdhry
2025-03-26 13:06             ` Herbert Xu
2025-03-26 13:07               ` Herbert Xu
2025-03-27  7:34               ` Manorit Chawdhry
2025-03-27  8:15                 ` Manorit Chawdhry
2025-03-27  8:23                   ` [PATCH] crypto: testmgr - Initialise full_sgl properly Herbert Xu
2025-03-27  8:40                     ` Manorit Chawdhry
2025-03-27  9:09                       ` Manorit Chawdhry
2025-03-31 10:13                         ` Herbert Xu
2025-04-11  5:34             ` [v2 PATCH] crypto: sa2ul - Use proper helpers to setup request Manorit Chawdhry
2025-04-11  5:37               ` Herbert Xu
2025-04-11  5:44                 ` Manorit Chawdhry
2025-04-11  5:46                   ` Herbert Xu
2025-04-11  6:14                     ` Manorit Chawdhry
2025-04-11  7:14                       ` [PATCH] crypto: ahash - Disable request chaining Herbert Xu
2025-04-11  7:58                         ` Manorit Chawdhry
2025-02-16  3:07 ` [v2 PATCH 04/11] crypto: tcrypt - Restore multibuffer ahash tests Herbert Xu
2025-02-16  3:07 ` [v2 PATCH 05/11] crypto: ahash - Add virtual address support Herbert Xu
2025-02-16  3:07 ` [v2 PATCH 06/11] crypto: ahash - Set default reqsize from ahash_alg Herbert Xu
2025-02-16  3:07 ` [v2 PATCH 07/11] crypto: testmgr - Add multibuffer hash testing Herbert Xu
2025-02-16  9:18   ` kernel test robot
2025-02-16  3:07 ` [v2 PATCH 08/11] crypto: x86/sha2 - Restore multibuffer AVX2 support Herbert Xu
2025-02-16  3:07 ` [v2 PATCH 09/11] crypto: hash - Add sync hash interface Herbert Xu
2025-02-16 10:51   ` kernel test robot
2025-02-16 11:42   ` kernel test robot
2025-02-16  3:07 ` [v2 PATCH 10/11] fsverity: Use sync hash instead of shash Herbert Xu
2025-02-16  3:07 ` [v2 PATCH 11/11] fsverity: improve performance by using multibuffer hashing Eric Biggers
2025-02-16  3:10 ` Herbert Xu
2025-02-16  3:38 ` [v2 PATCH 00/11] Multibuffer hashing take two Eric Biggers
2025-02-16 11:09   ` Herbert Xu
2025-02-16 19:51     ` Eric Biggers
2025-02-18 10:10       ` Herbert Xu
2025-02-18 17:48         ` Eric Biggers [this message]
2025-02-21  6:10           ` 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=20250218174810.GA4100189@google.com \
    --to=ebiggers@kernel.org \
    --cc=ardb@kernel.org \
    --cc=herbert@gondor.apana.org.au \
    --cc=linux-crypto@vger.kernel.org \
    --cc=megha.dey@linux.intel.com \
    --cc=tim.c.chen@linux.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;
as well as URLs for NNTP newsgroup(s).