diff options
| author | Herbert Xu <herbert@gondor.apana.org.au> | 2025-04-12 13:16:43 +0800 |
|---|---|---|
| committer | Herbert Xu <herbert@gondor.apana.org.au> | 2025-04-16 15:36:24 +0800 |
| commit | f1440a90465bea1993f937ac7add592ce1e4ff44 (patch) | |
| tree | a1000e8fd4220a04b318b7fabc191a2b7fb22818 /crypto/acompress.c | |
| parent | 66fecd9d94034b6193636fe3bc01f089439f5413 (diff) | |
| download | net-f1440a90465bea1993f937ac7add592ce1e4ff44.tar.gz | |
crypto: api - Add support for duplicating algorithms before registration
If the bit CRYPTO_ALG_DUP_FIRST is set, an algorithm will be
duplicated by kmemdup before registration. This is inteded for
hardware-based algorithms that may be unplugged at will.
Do not use this if the algorithm data structure is embedded in a
bigger data structure. Perform the duplication in the driver
instead.
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'crypto/acompress.c')
| -rw-r--r-- | crypto/acompress.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/crypto/acompress.c b/crypto/acompress.c index d5605b0ad2664d..606d09a7fbfd24 100644 --- a/crypto/acompress.c +++ b/crypto/acompress.c @@ -150,6 +150,7 @@ static const struct crypto_type crypto_acomp_type = { .maskset = CRYPTO_ALG_TYPE_ACOMPRESS_MASK, .type = CRYPTO_ALG_TYPE_ACOMPRESS, .tfmsize = offsetof(struct crypto_acomp, base), + .algsize = offsetof(struct acomp_alg, base), }; struct crypto_acomp *crypto_alloc_acomp(const char *alg_name, u32 type, |
