Skip to content

Commit

Permalink
crypto: hash - Remove maximum statesize limit
Browse files Browse the repository at this point in the history
Remove the HASH_MAX_STATESIZE limit now that it is unused.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
  • Loading branch information
herbertx committed Apr 6, 2023
1 parent acc03d8 commit 9697b32
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 4 deletions.
3 changes: 1 addition & 2 deletions crypto/shash.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 0 additions & 2 deletions include/crypto/hash.h
Original file line number Diff line number Diff line change
Expand Up @@ -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)); \
Expand Down

0 comments on commit 9697b32

Please sign in to comment.