aboutsummaryrefslogtreecommitdiffstats
path: root/include/crypto
diff options
context:
space:
mode:
authorHerbert Xu <herbert@gondor.apana.org.au>2025-06-13 16:51:38 +0800
committerHerbert Xu <herbert@gondor.apana.org.au>2025-06-23 17:00:27 +0800
commit1e2b7fcd3f075ff8c5b0e4474fe145d1c685f54f (patch)
tree08222010cabc60c3132c09fc4c0d50974a4c3187 /include/crypto
parentdt-bindings: crypto: Convert ti,omap4-des to DT schema (diff)
downloadlinux-1e2b7fcd3f075ff8c5b0e4474fe145d1c685f54f.tar.gz
linux-1e2b7fcd3f075ff8c5b0e4474fe145d1c685f54f.zip
crypto: ahash - Stop legacy tfms from using the set_virt fallback path
Ensure that drivers that have not been converted to the ahash API do not use the ahash_request_set_virt fallback path as they cannot use the software fallback. Reported-by: Eric Biggers <ebiggers@kernel.org> Fixes: 9d7a0ab1c753 ("crypto: ahash - Handle partial blocks in API") Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'include/crypto')
-rw-r--r--include/crypto/internal/hash.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/include/crypto/internal/hash.h b/include/crypto/internal/hash.h
index 0f85c543f80b..f052afa6e7b0 100644
--- a/include/crypto/internal/hash.h
+++ b/include/crypto/internal/hash.h
@@ -91,6 +91,12 @@ static inline bool crypto_hash_alg_needs_key(struct hash_alg_common *alg)
!(alg->base.cra_flags & CRYPTO_ALG_OPTIONAL_KEY);
}
+static inline bool crypto_hash_no_export_core(struct crypto_ahash *tfm)
+{
+ return crypto_hash_alg_common(tfm)->base.cra_flags &
+ CRYPTO_AHASH_ALG_NO_EXPORT_CORE;
+}
+
int crypto_grab_ahash(struct crypto_ahash_spawn *spawn,
struct crypto_instance *inst,
const char *name, u32 type, u32 mask);