summaryrefslogtreecommitdiffstats
path: root/crypto
diff options
context:
space:
mode:
authorHerbert Xu <herbert@gondor.apana.org.au>2022-11-11 11:05:41 +0100
committerHerbert Xu <herbert@gondor.apana.org.au>2022-11-18 09:59:34 +0100
commite6cb02bd0a52457e486a752da5db7b67f2540c16 (patch)
tree08a8263c76c3d9f2008daf6992b013f76e1738fd /crypto
parentcrypto: hisilicon/qm - add missing pci_dev_put() in q_num_set() (diff)
downloadlinux-e6cb02bd0a52457e486a752da5db7b67f2540c16.tar.xz
linux-e6cb02bd0a52457e486a752da5db7b67f2540c16.zip
crypto: skcipher - Allow sync algorithms with large request contexts
Some sync algorithms may require a large amount of temporary space during its operations. There is no reason why they should be limited just because some legacy users want to place all temporary data on the stack. Such algorithms can now set a flag to indicate that they need extra request context, which will cause them to be invisible to users that go through the sync_skcipher interface. Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'crypto')
-rw-r--r--crypto/skcipher.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/crypto/skcipher.c b/crypto/skcipher.c
index 418211180cee..0ecab31cfe79 100644
--- a/crypto/skcipher.c
+++ b/crypto/skcipher.c
@@ -763,7 +763,7 @@ struct crypto_sync_skcipher *crypto_alloc_sync_skcipher(
struct crypto_skcipher *tfm;
/* Only sync algorithms allowed. */
- mask |= CRYPTO_ALG_ASYNC;
+ mask |= CRYPTO_ALG_ASYNC | CRYPTO_ALG_SKCIPHER_REQSIZE_LARGE;
tfm = crypto_alloc_tfm(alg_name, &crypto_skcipher_type, type, mask);