sst-linux/crypto
Herbert Xu f688979e42 crypto: api - Add crypto_clone_tfm
[ Upstream commit 3c3a24cb0ae46c9c45e4ce2272f84f0504831f59 ]

This patch adds the helper crypto_clone_tfm.  The purpose is to
allocate a tfm object with GFP_ATOMIC.  As we cannot sleep, the
object has to be cloned from an existing tfm object.

This allows code paths that cannot otherwise allocate a crypto_tfm
object to do so.  Once a new tfm has been obtained its key could
then be changed without impacting other users.

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>
Stable-dep-of: 1465036b10be ("llc: Improve setsockopt() handling of malformed user input")
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-12-14 19:53:51 +01:00
..
asymmetric_keys KEYS: prevent NULL pointer dereference in find_asymmetric_key() 2024-10-17 15:21:17 +02:00
async_tx treewide: use get_random_bytes() when possible 2022-10-11 17:42:58 -06:00
842.c
acompress.c
adiantum.c
aead.c crypto: aead,cipher - zeroize key buffer after use 2024-07-11 12:47:05 +02:00
aegis128-core.c
aegis128-neon-inner.c
aegis128-neon.c
aegis.h
aes_generic.c
aes_ti.c
af_alg.c crypto: af_alg - Disallow multiple in-flight AIO requests 2024-01-25 15:27:21 -08:00
ahash.c
akcipher.c
algapi.c crypto: api - Fix liveliness check in crypto_alg_tested 2024-11-17 15:07:20 +01:00
algboss.c
algif_aead.c
algif_hash.c
algif_rng.c
algif_skcipher.c
ansi_cprng.c
anubis.c
api.c crypto: api - Add crypto_clone_tfm 2024-12-14 19:53:51 +01:00
arc4.c
aria_generic.c
authenc.c
authencesn.c
blake2b_generic.c
blowfish_common.c
blowfish_generic.c
camellia_generic.c
cast5_generic.c
cast6_generic.c
cast_common.c
cbc.c
ccm.c
cfb.c
chacha20poly1305.c
chacha_generic.c
cipher.c crypto: aead,cipher - zeroize key buffer after use 2024-07-11 12:47:05 +02:00
cmac.c
compress.c
crc32_generic.c
crc32c_generic.c
crc64_rocksoft_generic.c
crct10dif_common.c
crct10dif_generic.c
cryptd.c crypto: cryptd - Use request context instead of stack for sub-request 2022-12-31 13:32:33 +01:00
crypto_engine.c crypto: engine - fix crypto_queue backlog handling 2023-05-17 11:53:40 +02:00
crypto_null.c
crypto_user_base.c
crypto_user_stat.c
ctr.c
cts.c
curve25519-generic.c
deflate.c
des_generic.c
dh_helper.c
dh.c
drbg.c crypto: drbg - Only fail when jent is unavailable in FIPS mode 2023-05-11 23:03:21 +09:00
ecb.c
ecc_curve_defs.h
ecc.c crypto: ecc - Export additional helper functions 2021-10-29 21:04:03 +08:00
ecdh_helper.c
ecdh.c crypto: ecdh - explicitly zeroize private_key 2024-07-05 09:31:49 +02:00
ecdsa.c crypto: ecdsa - Fix module auto-load on add-key 2024-06-16 13:41:37 +02:00
ecdsasignature.asn1
echainiv.c
ecrdsa_defs.h
ecrdsa_params.asn1
ecrdsa_pub_key.asn1
ecrdsa.c crypto: ecrdsa - Fix module auto-load on add_key 2024-06-16 13:41:37 +02:00
essiv.c crypto: essiv - Handle EBUSY correctly 2023-03-10 09:32:56 +01:00
fcrypt.c
fips.c
gcm.c
geniv.c crypto: algapi - use common mechanism for inheriting flags 2020-07-16 21:49:08 +10:00
gf128mul.c mm, treewide: rename kzfree() to kfree_sensitive() 2020-08-07 11:33:22 -07:00
ghash-generic.c
hash_info.c
hctr2.c
hmac.c
internal.h crypto: api - Add crypto_clone_tfm 2024-12-14 19:53:51 +01:00
jitterentropy-kcapi.c crypto: jitter - permanent and intermittent health errors 2023-05-24 17:32:38 +01:00
jitterentropy.c crypto: jitter - correct health test during initialization 2023-07-19 16:21:42 +02:00
jitterentropy.h crypto: jitter - permanent and intermittent health errors 2023-05-24 17:32:38 +01:00
Kconfig crypto: jitter - fix CRYPTO_JITTERENTROPY help text 2024-03-26 18:20:50 -04:00
kdf_sp800108.c
keywrap.c crypto: keywrap - Remove else after break statement 2021-04-02 18:28:13 +11:00
khazad.c
kpp.c
lrw.c crypto: lrw,xts - Replace strlcpy with strscpy 2023-09-23 11:11:01 +02:00
lz4.c
lz4hc.c
lzo-rle.c
lzo.c
Makefile crypto: aria - prepare generic module for optimized implementations 2022-09-24 16:14:44 +08:00
md4.c crypto: make all generic algorithms set cra_driver_name 2019-06-13 14:31:39 +08:00
md5.c
michael_mic.c
nhpoly1305.c
ofb.c
pcbc.c
pcrypt.c crypto: pcrypt - Call crypto layer directly when padata_do_parallel() return -EBUSY 2024-12-14 19:53:17 +01:00
poly1305_generic.c
polyval-generic.c
proc.c
ripemd.h
rmd160.c
rng.c
rsa_helper.c
rsa-pkcs1pad.c crypto: rsa-pkcs1pad - Use helper to set reqsize 2023-09-13 09:42:26 +02:00
rsa.c
rsaprivkey.asn1
rsapubkey.asn1
scatterwalk.c
scompress.c crypto: scomp - fix req->dst buffer overflow 2024-01-25 15:27:23 -08:00
seed.c
seqiv.c crypto: seqiv - Handle EBUSY correctly 2023-03-10 09:32:56 +01:00
serpent_generic.c
sha1_generic.c
sha3_generic.c
sha256_generic.c
sha512_generic.c
shash.c
simd.c crypto: simd - Do not call crypto_alloc_tfm during registration 2024-10-17 15:21:39 +02:00
skcipher.c
sm2.c
sm2signature.asn1
sm3_generic.c
sm3.c
sm4_generic.c
sm4.c
streebog_generic.c
tcrypt.c crypto: tcrypt - Fix multibuffer skcipher speed test mem leak 2022-12-31 13:32:34 +01:00
tcrypt.h
tea.c
testmgr.c crypto: testmgr - fix RNG performance in fuzz tests 2023-05-24 17:32:53 +01:00
testmgr.h
twofish_common.c
twofish_generic.c
vmac.c
wp512.c
xcbc.c
xctr.c
xor.c crypto: xor - fix template benchmarking 2024-10-17 15:20:36 +02:00
xts.c crypto: lrw,xts - Replace strlcpy with strscpy 2023-09-23 11:11:01 +02:00
xxhash_generic.c
zstd.c