aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/include/crypto
diff options
context:
space:
mode:
authorHerbert Xu <herbert@gondor.apana.org.au>2019-06-20 14:17:24 +0800
committerHerbert Xu <herbert@gondor.apana.org.au>2019-06-20 14:17:24 +0800
commitbdb275bb6486d19888cb669fedd7d3eea2031669 (patch)
treea6d78624f1e8d7a797803636d1d92e6ae584949b /include/crypto
parentcrypto: sahara - Use devm_platform_ioremap_resource() (diff)
parentcrypto: hmac - fix memory leak in hmac_init_tfm() (diff)
downloadwireguard-linux-bdb275bb6486d19888cb669fedd7d3eea2031669.tar.xz
wireguard-linux-bdb275bb6486d19888cb669fedd7d3eea2031669.zip
Merge git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6
Merge crypto tree to pick up vmx changes.
Diffstat (limited to 'include/crypto')
-rw-r--r--include/crypto/hash.h8
1 files changed, 7 insertions, 1 deletions
diff --git a/include/crypto/hash.h b/include/crypto/hash.h
index d21bea2c4382..d6702b4a457f 100644
--- a/include/crypto/hash.h
+++ b/include/crypto/hash.h
@@ -150,7 +150,13 @@ struct shash_desc {
};
#define HASH_MAX_DIGESTSIZE 64
-#define HASH_MAX_DESCSIZE 360
+
+/*
+ * Worst case is hmac(sha3-224-generic). Its context is a nested 'shash_desc'
+ * containing a 'struct sha3_state'.
+ */
+#define HASH_MAX_DESCSIZE (sizeof(struct shash_desc) + 360)
+
#define HASH_MAX_STATESIZE 512
#define SHASH_DESC_ON_STACK(shash, ctx) \