ceph-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 0/6] fscrypt: Switch to sync_skcipher and on-stack requests
@ 2025-07-10  6:07 Eric Biggers
  2025-07-10  6:07 ` [PATCH v2 1/6] fscrypt: Don't use asynchronous CryptoAPI algorithms Eric Biggers
                   ` (5 more replies)
  0 siblings, 6 replies; 10+ messages in thread
From: Eric Biggers @ 2025-07-10  6:07 UTC (permalink / raw)
  To: linux-fscrypt
  Cc: linux-crypto, Yuwen Chen, linux-mtd, ceph-devel, linux-kernel,
	Eric Biggers

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
-- 
2.50.1


^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2025-07-10 19:32 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-07-10  6:07 [PATCH v2 0/6] fscrypt: Switch to sync_skcipher and on-stack requests Eric Biggers
2025-07-10  6:07 ` [PATCH v2 1/6] fscrypt: Don't use asynchronous CryptoAPI algorithms Eric Biggers
2025-07-10  6:07 ` [PATCH v2 2/6] fscrypt: Drop FORBID_WEAK_KEYS flag for AES-ECB Eric Biggers
2025-07-10  6:07 ` [PATCH v2 3/6] fscrypt: Switch to sync_skcipher and on-stack requests Eric Biggers
2025-07-10  6:07 ` [PATCH v2 4/6] fscrypt: Remove gfp_t argument from fscrypt_crypt_data_unit() Eric Biggers
2025-07-10  6:07 ` [PATCH v2 5/6] fscrypt: Remove gfp_t argument from fscrypt_encrypt_block_inplace() Eric Biggers
2025-07-10 11:08   ` Alex Markuze
2025-07-10  6:07 ` [PATCH v2 6/6] ceph: Remove gfp_t argument from ceph_fscrypt_encrypt_*() Eric Biggers
2025-07-10 11:07   ` Alex Markuze
2025-07-10 19:32     ` Eric Biggers

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).