mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Herbert Xu <herbert@gondor.apana.org.au>
To: Eric Biggers <ebiggers@kernel.org>
Cc: fsverity@lists.linux.dev, linux-crypto@vger.kernel.org,
	dm-devel@lists.linux.dev, x86@kernel.org,
	linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org, Ard Biesheuvel <ardb@kernel.org>,
	Sami Tolvanen <samitolvanen@google.com>,
	Alasdair Kergon <agk@redhat.com>,
	Mike Snitzer <snitzer@kernel.org>,
	Linus Torvalds <torvalds@linux-foundation.org>,
	Mikulas Patocka <mpatocka@redhat.com>,
	David Howells <dhowells@redhat.com>,
	netdev@vger.kernel.org
Subject: Re: [PATCH v8 0/7] Optimize dm-verity and fsverity using multibuffer hashing
Date: Fri, 14 Feb 2025 10:44:47 +0800	[thread overview]
Message-ID: <Z66uH_aeKc7ubONg@gondor.apana.org.au> (raw)
In-Reply-To: <20250213063304.GA11664@sol.localdomain>

On Wed, Feb 12, 2025 at 10:33:04PM -0800, Eric Biggers wrote:
> 
> I've already covered this extensively, but here we go again.  First there are
> more users of shash than ahash in the kernel, since shash is much easier to use
> and also a bit faster.  There is nothing storage specific about it.  You've
> claimed that shash is deprecated, but that reflects a misunderstanding of what
> users actually want and need.  Users want simple, fast, easy-to-use APIs.  Not
> APIs that are optimized for an obsolete form of hardware offload and have
> CPU-based crypto support bolted on as an afterthought.

The ahash interface was not designed for hardware offload, it's
exactly the same as the skcipher interface which caters for all
users.  The shash interface was a mistake, one which I've only
come to realise after adding the corresponding lskcipher interface.


> Second, these days TLS and IPsec usually use AES-GCM, which is inherently
> parallelizable so does not benefit from multibuffer crypto.  This is a major
> difference between the AEADs and message digest algorithms in common use.  And
> it happens that I recently did a lot of work to optimize AES-GCM on x86_64; see
> my commits in v6.11 that made AES-GCM 2-3x as fast on VAES-capable CPUs.

Bravo to your efforts on improving GCM.  But that does not mean that
GCM is not amenable to parallel processing.  While CTR itself is
obviously already parallel, the GHASH algorithm can indeed benefit
from parallel processing like any other hashing algorithm.

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-02-14  2:44 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-02-12 15:47 Eric Biggers
2025-02-12 15:47 ` [PATCH v8 1/7] crypto: shash - add support for finup_mb Eric Biggers
2025-02-12 15:47 ` [PATCH v8 2/7] crypto: testmgr - add tests " Eric Biggers
2025-02-12 15:47 ` [PATCH v8 3/7] crypto: x86/sha256-ni - add support " Eric Biggers
2025-02-12 15:47 ` [PATCH v8 4/7] crypto: arm64/sha256-ce " Eric Biggers
2025-02-12 15:47 ` [PATCH v8 5/7] fsverity: improve performance by using multibuffer hashing Eric Biggers
2025-02-12 15:47 ` [PATCH v8 6/7] dm-verity: reduce scope of real and wanted digests Eric Biggers
2025-02-12 15:47 ` [PATCH v8 7/7] dm-verity: improve performance by using multibuffer hashing Eric Biggers
2025-02-13  4:17 ` [PATCH v8 0/7] Optimize dm-verity and fsverity " Herbert Xu
2025-02-13  6:33   ` Eric Biggers
2025-02-14  2:44     ` Herbert Xu [this message]
2025-02-14  3:35       ` Eric Biggers
2025-02-14  3:50         ` Herbert Xu
2025-02-14  4:29           ` Eric Biggers
2025-02-14  4:56             ` Herbert Xu
2025-02-14  6:11               ` Eric Biggers
2025-02-14 10:50           ` Ard Biesheuvel
2025-02-15 17:04     ` Jakub Kicinski
2025-02-16  2:27       ` Herbert Xu
2025-02-16  3:26         ` Eric Biggers
2025-02-16  3:29           ` Herbert Xu
2025-02-17 17:40         ` Jakub Kicinski
2025-02-18  3:42           ` Herbert Xu
2025-02-18  7:41             ` Ard Biesheuvel
2025-02-18  8:02               ` Herbert Xu
2025-02-13 10:10   ` Ard Biesheuvel

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=Z66uH_aeKc7ubONg@gondor.apana.org.au \
    --to=herbert@gondor.apana.org.au \
    --cc=agk@redhat.com \
    --cc=ardb@kernel.org \
    --cc=dhowells@redhat.com \
    --cc=dm-devel@lists.linux.dev \
    --cc=ebiggers@kernel.org \
    --cc=fsverity@lists.linux.dev \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-crypto@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mpatocka@redhat.com \
    --cc=netdev@vger.kernel.org \
    --cc=samitolvanen@google.com \
    --cc=snitzer@kernel.org \
    --cc=torvalds@linux-foundation.org \
    --cc=x86@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

all inboxes | Powered by JetHome®