linux-crypto.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [v2 PATCH 00/11] Multibuffer hashing take two
@ 2025-02-16  3:07 Herbert Xu
  2025-02-16  3:07 ` [v2 PATCH 01/11] crypto: ahash - Only save callback and data in ahash_save_req Herbert Xu
                   ` (12 more replies)
  0 siblings, 13 replies; 42+ messages in thread
From: Herbert Xu @ 2025-02-16  3:07 UTC (permalink / raw)
  To: Linux Crypto Mailing List
  Cc: Eric Biggers, Ard Biesheuvel, Megha Dey, Tim Chen

This patch-set introduces two additions to the ahash interface.
First of all request chaining is added so that an arbitrary number
of requests can be submitted in one go.  Incidentally this also
reduces the cost of indirect calls by amortisation.

It then adds virtual address support to ahash.  This allows the
user to supply a virtual address as the input instead of an SG
list.

This is assumed to be not DMA-capable so it is always copied
before it's passed to an existing ahash driver.  New drivers can
elect to take virtual addresses directly.  Of course existing shash
algorithms are able to take virtual addresses without any copying.

The next patch resurrects the old SHA2 AVX2 muiltibuffer code as
a proof of concept that this API works.  The result shows that with
a full complement of 8 requests, this API is able to achieve parity
with the more modern but single-threaded SHA-NI code.  This passes
the multibuffer fuzz tests.

Finally introduce a sync hash interface that is similar to the sync
skcipher interface.  This will replace the shash interface for users.
Use it in fsverity and enable multibuffer hashing.

Eric Biggers (1):
  fsverity: improve performance by using multibuffer hashing

Herbert Xu (10):
  crypto: ahash - Only save callback and data in ahash_save_req
  crypto: x86/ghash - Use proper helpers to clone request
  crypto: hash - Add request chaining API
  crypto: tcrypt - Restore multibuffer ahash tests
  crypto: ahash - Add virtual address support
  crypto: ahash - Set default reqsize from ahash_alg
  crypto: testmgr - Add multibuffer hash testing
  crypto: x86/sha2 - Restore multibuffer AVX2 support
  crypto: hash - Add sync hash interface
  fsverity: Use sync hash instead of shash

 arch/x86/crypto/Makefile                   |   2 +-
 arch/x86/crypto/ghash-clmulni-intel_glue.c |  23 +-
 arch/x86/crypto/sha256_mb_mgr_datastruct.S | 304 +++++++++++
 arch/x86/crypto/sha256_ssse3_glue.c        | 540 ++++++++++++++++--
 arch/x86/crypto/sha256_x8_avx2.S           | 598 ++++++++++++++++++++
 crypto/ahash.c                             | 605 ++++++++++++++++++---
 crypto/algapi.c                            |   2 +-
 crypto/tcrypt.c                            | 231 ++++++++
 crypto/testmgr.c                           | 132 ++++-
 fs/verity/fsverity_private.h               |   4 +-
 fs/verity/hash_algs.c                      |  41 +-
 fs/verity/verify.c                         | 179 +++++-
 include/crypto/algapi.h                    |  11 +
 include/crypto/hash.h                      | 172 +++++-
 include/crypto/internal/hash.h             |  17 +-
 include/linux/crypto.h                     |  24 +
 16 files changed, 2659 insertions(+), 226 deletions(-)
 create mode 100644 arch/x86/crypto/sha256_mb_mgr_datastruct.S
 create mode 100644 arch/x86/crypto/sha256_x8_avx2.S

-- 
2.39.5


^ permalink raw reply	[flat|nested] 42+ messages in thread

end of thread, other threads:[~2025-04-11  7:58 UTC | newest]

Thread overview: 42+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
2025-02-21  6:10           ` Herbert Xu

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