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