summaryrefslogtreecommitdiffstats
path: root/crypto/scompress.c
diff options
context:
space:
mode:
authorHerbert Xu <herbert@gondor.apana.org.au>2019-12-08 13:42:51 +0800
committerHerbert Xu <herbert@gondor.apana.org.au>2019-12-11 16:48:39 +0800
commitfbce6be5aef5bad46f3af1650f7a62ec1b34318e (patch)
tree14f125cc1ae013ef1cdcddf85531f6d76b6a3130 /crypto/scompress.c
parent02244ba44bc366c38e188a3a90afc63dffae9897 (diff)
downloadlinux-fbce6be5aef5bad46f3af1650f7a62ec1b34318e.tar.bz2
crypto: shash - Add init_tfm/exit_tfm and verify descsize
The shash interface supports a dynamic descsize field because of the presence of fallbacks (it's just padlock-sha actually, perhaps we can remove it one day). As it is the API does not verify the setting of descsize at all. It is up to the individual algorithms to ensure that descsize does not exceed the specified maximum value of HASH_MAX_DESCSIZE (going above would cause stack corruption). In order to allow the API to impose this limit directly, this patch adds init_tfm/exit_tfm hooks to the shash_alg structure. We can then verify the descsize setting in the API directly. Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au> Reviewed-by: Eric Biggers <ebiggers@google.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'crypto/scompress.c')
0 files changed, 0 insertions, 0 deletions