Skip to content

fscrypt: Switch to sync_skcipher and on-stack requests

Eric Biggers ceph-devel linux-crypto linux-fscrypt linux-mtd lkml 2 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest6 patches 3 repliesIn review
  2. v13 patches 0 repliesSuperseded

Changes in v2 from the cover letter

- Added patches that remove the gfp_t argument from functions that no longer need it.
- Eliminated the goto in derive_key_aes().
- Improved commit messages.

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/6fscrypt: Don't use asynchronous CryptoAPI algorithmsfs/crypto/crypto.c fs/crypto/fname.c fs/crypto/fscrypt_private.h +1 more+18 -210 replies
2/6fscrypt: Drop FORBID_WEAK_KEYS flag for AES-ECBfs/crypto/keysetup_v1.c+0 -10 replies
3/6fscrypt: Switch to sync_skcipher and on-stack requestsfs/crypto/crypto.c fs/crypto/fname.c fs/crypto/fscrypt_private.h +2 more+61 -950 replies
4/6fscrypt: Remove gfp_t argument from fscrypt_crypt_data_unit()fs/crypto/bio.c fs/crypto/crypto.c fs/crypto/fscrypt_private.h+7 -130 replies
5/6fscrypt: Remove gfp_t argument from fscrypt_encrypt_block_inplace()fs/ceph/crypto.c fs/crypto/crypto.c fs/ubifs/crypto.c +1 more+5 -81 reply
6/6ceph: Remove gfp_t argument from ceph_fscrypt_encrypt_*()fs/ceph/crypto.c fs/ceph/crypto.h fs/ceph/file.c +1 more+10 -162 replies

Reviews trailers per patch

2 of 6 patches have a Reviewed-by or Acked-by.

PatchAlex Markuze
1/6
2/6
3/6
4/6
5/6R-b
6/6R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v2 thread

Cover letter [PATCH v2 0/6] fscrypt: Switch to sync_skcipher and on-stack requests

Simplify the code and eliminate per-encryption-op dynamic memory allocations by switching from crypto_skcipher to crypto_sync_skcipher, and from dynamic request allocation to SYNC_SKCIPHER_REQUEST_ON_STACK.

Previously, this change would have made the x86 accelerated AES code no longer be used, which would have been very bad. However, I fixed that in 6.16. So we can make this simplification now.

This patchset applies to fscrypt/for-next. The base-commit (listed below) can be found in next-20250708

Changed in v2:
- Added patches that remove the gfp_t argument from functions that no longer need it.
- Eliminated the goto in derive_key_aes().
- Improved commit messages.

Eric Biggers (6):
fscrypt: Don't use asynchronous CryptoAPI algorithms
fscrypt: Drop FORBID_WEAK_KEYS flag for AES-ECB
fscrypt: Switch to sync_skcipher and on-stack requests
fscrypt: Remove gfp_t argument from fscrypt_crypt_data_unit()
fscrypt: Remove gfp_t argument from fscrypt_encrypt_block_inplace()
ceph: Remove gfp_t argument from ceph_fscrypt_encrypt_*()

 fs/ceph/crypto.c            | 13 +++-----
 fs/ceph/crypto.h            | 10 +++---
 fs/ceph/file.c              |  3 +-
 fs/ceph/inode.c             |  3 +-
 fs/crypto/bio.c             |  3 +-
 fs/crypto/crypto.c          | 44 +++++++++-----------------
 fs/crypto/fname.c           | 63 +++++++++++++------------------------
 fs/crypto/fscrypt_private.h | 10 +++---
 fs/crypto/keysetup.c        | 23 +++++++-------
 fs/crypto/keysetup_v1.c     | 56 ++++++++++++++-------------------
 fs/ubifs/crypto.c           |  2 +-
 include/linux/fscrypt.h     |  5 ++-
 12 files changed, 91 insertions(+), 144 deletions(-)

base-commit: b41c1d8d07906786c60893980d52688f31d114a6

Signature · 1 line
2.50.1