LF-1782-2 Revert "dm crypt: don't use drivers that have CRYPTO_ALG_ALLOCATES_MEMORY"
authorHoria Geantă <horia.geanta@nxp.com>
Mon, 11 Jan 2021 15:27:38 +0000 (17:27 +0200)
committerHoria Geantă <horia.geanta@nxp.com>
Thu, 28 Jan 2021 08:11:07 +0000 (10:11 +0200)
commitf5b981c5c5a5a7cbd0a755e3211277dbe7c8bb49
tree6b0dfd174810112b70c1901e8e1fc820e99f2e5a
parentd03818788ca15379921ed5c1e3d37b3a0d4968f2
LF-1782-2 Revert "dm crypt: don't use drivers that have CRYPTO_ALG_ALLOCATES_MEMORY"

This reverts commit cd74693870fb748d812867ba49af733d689a3604.

This is a workaround for allowing dm-crypt crypto operations to be
offloaded to caam crypto accelerator.
It's needed because crypto algorithms registered by caam are marked with
CRYPTO_ALG_ALLOCATES_MEMORY flag.

Background:
Red Hat reported possible allocation issues in dm-crypt, dm-integrity:
Link: https://lore.kernel.org/linux-crypto/alpine.LRH.2.02.2006091259250.30590@file01.intranet.prod.int.rdu2.redhat.com
The solution found was a mechanism to let dm-crypt, dm-integrity avoid
using crypto algorithms that allocate memory "at runtime" - by specifying
the CRYPTO_ALG_ALLOCATES_MEMORY flag introduced in
commit fbb6cda44190 ("crypto: algapi - introduce the flag CRYPTO_ALG_ALLOCATES_MEMORY")

Signed-off-by: Horia Geantă <horia.geanta@nxp.com>
Reviewed-by: Manish Tomar <manish.tomar@nxp.com>
drivers/md/dm-crypt.c