]> www.infradead.org Git - users/jedix/linux-maple.git/commit
crypto: ahash - Handle partial blocks in API
authorHerbert Xu <herbert@gondor.apana.org.au>
Thu, 15 May 2025 05:54:37 +0000 (13:54 +0800)
committerHerbert Xu <herbert@gondor.apana.org.au>
Mon, 19 May 2025 05:48:19 +0000 (13:48 +0800)
commit9d7a0ab1c75365158b28a5f7fa516061ea40b1b8
tree16f21dab1c19d60f4947de6312776dde92da7106
parentc6a12f394c488cf6a7ca35c1ad51e0e88897de2e
crypto: ahash - Handle partial blocks in API

Provide an option to handle the partial blocks in the ahash API.
Almost every hash algorithm has a block size and are only able
to hash partial blocks on finalisation.

As a first step disable virtual address support for algorithms
with state sizes larger than HASH_MAX_STATESIZE.  This is OK as
virtual addresses are currently only used on synchronous fallbacks.

This means ahash_do_req_chain only needs to handle synchronous
fallbacks, removing the complexities of saving the request state.

Also move the saved request state into the ahash_request object
as nesting is no longer possible.

Add a scatterlist to ahash_request to store the partial block.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
crypto/ahash.c
include/crypto/hash.h