[PATCH-next 0/3] crypto: cmac - clone fixes

From: Dmitry Safonov
Date: Wed Jun 14 2023 - 13:47:14 EST


Make cipher cloning possible in atomic contexts + prevent use-after-free
on the crypto algorithm.
Those seems to be all pitfalls I found while adapting TCP-AO patches to
use crypto clone-tfm and dropping per-CPU requests allocations.

Cc: Bob Gilligan <gilligan@xxxxxxxxxx>
Cc: David Ahern <dsahern@xxxxxxxxxx>
Cc: "David S. Miller" <davem@xxxxxxxxxxxxx>
Cc: Dmitry Safonov <0x7f454c46@xxxxxxxxx>
Cc: Eric Dumazet <edumazet@xxxxxxxxxx>
Cc: "Eric W. Biederman" <ebiederm@xxxxxxxxxxxx>
Cc: Francesco Ruggeri <fruggeri05@xxxxxxxxx>
Cc: Jakub Kicinski <kuba@xxxxxxxxxx>
Cc: Herbert Xu <herbert@xxxxxxxxxxxxxxxxxxx>
Cc: Paolo Abeni <pabeni@xxxxxxxxxx>
Cc: Salam Noureddine <noureddine@xxxxxxxxxx>
Cc: linux-kernel@xxxxxxxxxxxxxxx
Cc: linux-crypto@xxxxxxxxxxxxxxx

Thanks,
Dmitry

Dmitry Safonov (3):
crypto: api - Remove crypto_init_ops()
crypto: api - Provide gfp mask for tfm allocation
crypto: cipher - On clone do crypto_mod_get()

crypto/algapi.c | 2 +-
crypto/api.c | 20 +++-----------------
crypto/cipher.c | 9 +++++++--
crypto/internal.h | 2 +-
include/crypto/algapi.h | 1 -
5 files changed, 12 insertions(+), 22 deletions(-)


base-commit: b16049b21162bb649cdd8519642a35972b7910fe
--
2.40.0