From: Giovanni Cabiddu <giovanni.cabiddu@intel.com>
To: herbert@gondor.apana.org.au, agk@redhat.com, snitzer@kernel.org
Cc: linux-crypto@vger.kernel.org, dm-devel@redhat.com,
linux-kernel@vger.kernel.org, qat-linux@intel.com,
heinzm@redhat.com, meenakshi.aggarwal@nxp.com,
ebiggers@kernel.org, horia.geanta@nxp.com, V.Sethi@nxp.com,
pankaj.gupta@nxp.com, gaurav.jain@nxp.com, davem@davemloft.net,
iuliana.prodan@nxp.com,
Giovanni Cabiddu <giovanni.cabiddu@intel.com>
Subject: [PATCH 0/3] crypto: adjust meaning of CRYPTO_ALG_ALLOCATES_MEMORY
Date: Wed, 5 Jul 2023 17:40:06 +0100 [thread overview]
Message-ID: <20230705164009.58351-1-giovanni.cabiddu@intel.com> (raw)
Commit fbb6cda44190 introduced the flag CRYPTO_ALG_ALLOCATES_MEMORY.
This allows to mark algorithms that allocate memory during the datapath
so they are not used for disk encryption.
Following that, cd74693870fb limited dm-crypt to use only
implementations that don't set that flag.
After discussions in the crypto mailing list [1][2][3] about how we
could re-enable algorithms to be used by dm-crypt, we came to the
conclusion that we can change slightly the meaning of the flag
!CRYPTO_ALG_ALLOCATES_MEMORY. If an algorithm does not allocate
memory for requests with a scatterlist of 4 or less entries
(the typical case for dm-crypt), then it can avoid marking the
implementation with the flag CRYPTO_ALG_ALLOCATES_MEMORY.
This set adjusts the meaning of CRYPTO_ALG_ALLOCATES_MEMORY in the
documentation, removes the filtering for algorithms that do not
allocate memory in dm-integrity and removes the
CRYPTO_ALG_ALLOCATES_MEMORY from the algorithms registered in the QAT
driver as this is not allocating memory in the datapath for requests
with 4 or less entries in the source and destination scatterlists.
[1] https://lore.kernel.org/linux-crypto/20200722072932.GA27544@gondor.apana.org.au/
[2] https://lore.kernel.org/linux-crypto/20230523165503.GA864814@google.com/
[3] https://lore.kernel.org/linux-crypto/Ysw9E2Az2oK4jfCf@lucas-Virtual-Machine/
Giovanni Cabiddu (3):
dm integrity: do not filter algos with CRYPTO_ALG_ALLOCATES_MEMORY
crypto: api - adjust meaning of CRYPTO_ALG_ALLOCATES_MEMORY
crypto: qat - remove CRYPTO_ALG_ALLOCATES_MEMORY flag
drivers/crypto/intel/qat/qat_common/qat_algs.c | 13 ++++++-------
.../intel/qat/qat_common/qat_comp_algs.c | 2 +-
drivers/md/dm-integrity.c | 2 +-
include/linux/crypto.h | 18 ++++++++++++++++--
4 files changed, 24 insertions(+), 11 deletions(-)
--
2.40.1
next reply other threads:[~2023-07-05 16:40 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-07-05 16:40 Giovanni Cabiddu [this message]
2023-07-05 16:40 ` [PATCH 1/3] dm integrity: do not filter algos with CRYPTO_ALG_ALLOCATES_MEMORY Giovanni Cabiddu
2023-07-05 20:12 ` Eric Biggers
2023-07-05 20:57 ` Giovanni Cabiddu
2023-07-05 21:57 ` Herbert Xu
2024-02-07 6:22 ` Meenakshi Aggarwal
2025-02-18 8:37 ` Herbert Xu
2025-02-20 10:18 ` Meenakshi Aggarwal
2024-07-04 10:39 ` Horia Geanta
2023-07-07 10:25 ` [dm-devel] " Mikulas Patocka
2023-07-05 16:40 ` [PATCH 2/3] crypto: api - adjust meaning of CRYPTO_ALG_ALLOCATES_MEMORY Giovanni Cabiddu
2023-07-05 20:18 ` Eric Biggers
2023-07-07 10:41 ` [dm-devel] " Mikulas Patocka
2023-07-05 16:40 ` [PATCH 3/3] crypto: qat - remove CRYPTO_ALG_ALLOCATES_MEMORY flag Giovanni Cabiddu
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230705164009.58351-1-giovanni.cabiddu@intel.com \
--to=giovanni.cabiddu@intel.com \
--cc=V.Sethi@nxp.com \
--cc=agk@redhat.com \
--cc=davem@davemloft.net \
--cc=dm-devel@redhat.com \
--cc=ebiggers@kernel.org \
--cc=gaurav.jain@nxp.com \
--cc=heinzm@redhat.com \
--cc=herbert@gondor.apana.org.au \
--cc=horia.geanta@nxp.com \
--cc=iuliana.prodan@nxp.com \
--cc=linux-crypto@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=meenakshi.aggarwal@nxp.com \
--cc=pankaj.gupta@nxp.com \
--cc=qat-linux@intel.com \
--cc=snitzer@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox