crypto: adjust meaning of CRYPTO_ALG_ALLOCATES_MEMORY
Get series with b4
b4 am [email protected]Versions newest first
- v1 Latest3 patches 10 repliesIn review
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/3 | dm integrity: do not filter algos with CRYPTO_ALG_ALLOCATES_MEMORYdrivers/ | +1 | 8 replies | |
| 2/3 | crypto: api - adjust meaning of CRYPTO_ALG_ALLOCATES_MEMORYinclude/ | +16 | 2 replies | |
| 3/3 | crypto: qat - remove CRYPTO_ALG_ALLOCATES_MEMORY flagdrivers/ drivers/ | +7 | 0 replies |
Reviews trailers per patch
All 3 patches have a Reviewed-by or Acked-by.
| Patch | Fiona Trahe |
|---|---|
| 1/3 | R-b |
| 2/3 | R-b |
| 3/3 | R-b |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [PATCH 0/3] crypto: adjust meaning of CRYPTO_ALG_ALLOCATES_MEMORY
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/[email protected]/
[2] https://lore.kernel.org/linux-crypto/[email protected]/
[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(-)
Signature · 1 line
2.40.1