mbox series

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

Message ID 20230614174643.3836590-1-dima@arista.com
Headers show
Series crypto: cmac - clone fixes | expand

Message

Dmitry Safonov June 14, 2023, 5:46 p.m. UTC
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@arista.com>
Cc: David Ahern <dsahern@kernel.org>
Cc: "David S. Miller" <davem@davemloft.net>
Cc: Dmitry Safonov <0x7f454c46@gmail.com>
Cc: Eric Dumazet <edumazet@google.com>
Cc: "Eric W. Biederman" <ebiederm@xmission.com>
Cc: Francesco Ruggeri <fruggeri05@gmail.com>
Cc: Jakub Kicinski <kuba@kernel.org>
Cc: Herbert Xu <herbert@gondor.apana.org.au>
Cc: Paolo Abeni <pabeni@redhat.com>
Cc: Salam Noureddine <noureddine@arista.com>
Cc: linux-kernel@vger.kernel.org
Cc: linux-crypto@vger.kernel.org

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

Comments

Herbert Xu June 23, 2023, 8:23 a.m. UTC | #1
On Wed, Jun 14, 2023 at 06:46:40PM +0100, Dmitry Safonov wrote:
> 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@arista.com>
> Cc: David Ahern <dsahern@kernel.org>
> Cc: "David S. Miller" <davem@davemloft.net>
> Cc: Dmitry Safonov <0x7f454c46@gmail.com>
> Cc: Eric Dumazet <edumazet@google.com>
> Cc: "Eric W. Biederman" <ebiederm@xmission.com>
> Cc: Francesco Ruggeri <fruggeri05@gmail.com>
> Cc: Jakub Kicinski <kuba@kernel.org>
> Cc: Herbert Xu <herbert@gondor.apana.org.au>
> Cc: Paolo Abeni <pabeni@redhat.com>
> Cc: Salam Noureddine <noureddine@arista.com>
> Cc: linux-kernel@vger.kernel.org
> Cc: linux-crypto@vger.kernel.org
> 
> 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

All appleed with patch 2 replaced by my version.  Thanks.