From: Herbert Xu Date: Tue, 28 Mar 2023 03:57:09 +0000 (+0800) Subject: crypto: hash - Remove maximum statesize limit X-Git-Tag: v6.4-rc1~146^2~43 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9697b328d11152d7b918ee82438d4283d4edb563;p=thirdparty%2Fkernel%2Fstable.git crypto: hash - Remove maximum statesize limit Remove the HASH_MAX_STATESIZE limit now that it is unused. Signed-off-by: Herbert Xu --- diff --git a/crypto/shash.c b/crypto/shash.c index dcc6a7170ce40..4cefa614dbbdd 100644 --- a/crypto/shash.c +++ b/crypto/shash.c @@ -569,8 +569,7 @@ int hash_prepare_alg(struct hash_alg_common *alg) struct crypto_istat_hash *istat = hash_get_stat(alg); struct crypto_alg *base = &alg->base; - if (alg->digestsize > HASH_MAX_DIGESTSIZE || - alg->statesize > HASH_MAX_STATESIZE) + if (alg->digestsize > HASH_MAX_DIGESTSIZE) return -EINVAL; base->cra_flags &= ~CRYPTO_ALG_TYPE_MASK; diff --git a/include/crypto/hash.h b/include/crypto/hash.h index 1ed674ba84291..3a04e601ad6a7 100644 --- a/include/crypto/hash.h +++ b/include/crypto/hash.h @@ -183,8 +183,6 @@ struct shash_desc { */ #define HASH_MAX_DESCSIZE (sizeof(struct shash_desc) + 360) -#define HASH_MAX_STATESIZE 512 - #define SHASH_DESC_ON_STACK(shash, ctx) \ char __##shash##_desc[sizeof(struct shash_desc) + HASH_MAX_DESCSIZE] \ __aligned(__alignof__(struct shash_desc)); \