crypto: api - Add crypto_tfm_get
authorHerbert Xu <herbert@gondor.apana.org.au>
Thu, 13 Apr 2023 06:24:15 +0000 (14:24 +0800)
committerHerbert Xu <herbert@gondor.apana.org.au>
Thu, 20 Apr 2023 10:20:04 +0000 (18:20 +0800)
commitae131f4970f0778f35ed06aeb15bde2fbc1d9619
tree32129d0609ff52d6742628db8f284e33274c95a7
parent94330fbe082acfd7ac9f2a348933944ba78b14dc
crypto: api - Add crypto_tfm_get

Add a crypto_tfm_get interface to allow tfm objects to be shared.
They can still be freed in the usual way.

This should only be done with tfm objects with no keys.  You must
also not modify the tfm flags in any way once it becomes shared.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Reviewed-by: Simon Horman <simon.horman@corigine.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
crypto/api.c
crypto/internal.h
include/linux/crypto.h