Skip to content

Multibuffer hashing take two

Herbert Xu linux-crypto llvm oe-kbuild-all 2 versions – NAK

Status from this message: Nacked-by: Eric Biggers <[email protected]>

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest11 patches 7 repliesNAK
  2. v16 patches 2 repliesSuperseded

Patches in v2

#Subject and filesSizeRepliesApplied
1/11crypto: ahash - Only save callback and data in ahash_save_reqcrypto/ahash.c include/crypto/hash.h+35 -650 replies
2/11crypto: x86/ghash - Use proper helpers to clone requestarch/x86/crypto/ghash-clmulni-intel_glue.c+17 -60 replies
3/11crypto: hash - Add request chaining APIcrypto/ahash.c crypto/algapi.c include/crypto/algapi.h +3 more+299 -3720 replies
4/11crypto: tcrypt - Restore multibuffer ahash testscrypto/tcrypt.c+231 -00 replies
5/11crypto: ahash - Add virtual address supportcrypto/ahash.c include/crypto/hash.h include/crypto/internal/hash.h +1 more+293 -340 replies
6/11crypto: ahash - Set default reqsize from ahash_algcrypto/ahash.c include/crypto/hash.h+7 -00 replies
7/11crypto: testmgr - Add multibuffer hash testingcrypto/testmgr.c+103 -290 replies
8/11crypto: x86/sha2 - Restore multibuffer AVX2 supportarch/x86/crypto/Makefile arch/x86/crypto/sha256_mb_mgr_datastruct.S arch/x86/crypto/sha256_ssse3_glue.c +1 more+1401 -430 replies
9/11crypto: hash - Add sync hash interfacecrypto/ahash.c include/crypto/hash.h+137 -00 replies
10/11fsverity: Use sync hash instead of shashfs/verity/fsverity_private.h fs/verity/hash_algs.c+23 -200 replies
11/11fsverity: improve performance by using multibuffer hashingfs/verity/fsverity_private.h fs/verity/verify.c+151 -300 replies

Reviews trailers per patch

1 of 11 patches has a Reviewed-by or Acked-by of their own; the series has one for all of them.

PatchSami TolvanenArd BiesheuvelEric BiggersManorit Chawdhry
SeriesR-b A-b Nacked-by
1/11
2/11
3/11T-b T-b T-b
4/11
5/11
6/11
7/11
8/11
9/11
10/11
11/11R-b A-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 4 reviewers.

Read the v2 thread

Cover letter [v2 PATCH 00/11] Multibuffer hashing take two

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
Signature · 1 line
2.39.5