linux/fs/ext4
Linus Torvalds 1d7443e4dc fscrypt updates for 7.3
The main change this cycle is a significant simplification that's been
 overdue for a while now: standardizing on a single file contents
 encryption implementation in ext4 and f2fs, instead of having two.
 
 Specifically, the original filesystem-layer file contents encryption
 implementation is removed, and the blk-crypto implementation is now
 used unconditionally. blk-crypto delegates either to inline crypto
 hardware or to the CPU via blk-crypto-fallback. The latter is
 functionally equivalent to the original filesystem-layer code.
 
 The blk-crypto implementation already existed, but previously it was
 used only when the filesystem was mounted with "-o inlinecrypt". Now,
 "-o inlinecrypt" just selects whether inline crypto hardware is used.
 
 To allow maintaining that user control over hardware use, the
 blk-crypto API is extended with a new flag BLK_CRYPTO_CFG_ALLOW_HW.
 
 Overall, this removes quite a bit of redundant code from ext4, f2fs,
 and fs/crypto/. It should make things easier for ongoing filesystem
 efforts such as iomap support, large folios, and btrfs encryption.
 (btrfs had already been planning to use blk-crypto exclusively.)
 
 There are two small behavior changes of note:
 
 - Direct I/O now works on encrypted files even without
   "-o inlinecrypt", rather than falling back to buffered I/O. This is
   effectively a bugfix, though I'll continue to keep an eye out for
   any user that may have been depending on the buffered I/O fallback.
 
 - IV_INO_LBLK_32 policies are no longer supported in certain cases
   that didn't make sense and have no known uses.
 
 This has been in linux-next since July 22 with no reported issues.
 All encryption xfstests pass on ext4 and f2fs. As usual I've also been
 using it on a system with an fscrypt-encrypted home directory. Of
 course, the blk-crypto code paths also aren't new and were already
 being used on many systems via the inlinecrypt mount option.
 
 In addition to the main change described above, there are a few other
 cleanups such as using lock guards for mutexes, improving
 documentation, and removing a workaround for outdated gcc versions.
 -----BEGIN PGP SIGNATURE-----
 
 iIoEABYIADIWIQSacvsUNc7UX4ntmEPzXCl4vpKOKwUCaoDumhQcZWJpZ2dlcnNA
 a2VybmVsLm9yZwAKCRDzXCl4vpKOKwk1AP9gAHdxAK2tr+Wpklkos/qTMR3a7h2I
 xLmgwhLHmHoHTgD/cD+0eMoK4RIVVGS/73Bf7oF2qY5jOyfi1aGh4ERQ0AA=
 =0+o6
 -----END PGP SIGNATURE-----

Merge tag 'fscrypt-for-linus' of git://git.kernel.org/pub/scm/fs/fscrypt/linux

Pull fscrypt updates from Eric Biggers:
 "The main change this cycle is a significant simplification that's been
  overdue for a while now: standardizing on a single file contents
  encryption implementation in ext4 and f2fs, instead of having two.

  Specifically, the original filesystem-layer file contents encryption
  implementation is removed, and the blk-crypto implementation is now
  used unconditionally. blk-crypto delegates either to inline crypto
  hardware or to the CPU via blk-crypto-fallback. The latter is
  functionally equivalent to the original filesystem-layer code.

  The blk-crypto implementation already existed, but previously it was
  used only when the filesystem was mounted with "-o inlinecrypt". Now,
  "-o inlinecrypt" just selects whether inline crypto hardware is used.

  To allow maintaining that user control over hardware use, the
  blk-crypto API is extended with a new flag BLK_CRYPTO_CFG_ALLOW_HW.

  Overall, this removes quite a bit of redundant code from ext4, f2fs,
  and fs/crypto/. It should make things easier for ongoing filesystem
  efforts such as iomap support, large folios, and btrfs encryption
  (btrfs had already been planning to use blk-crypto exclusively.)

  There are two small behavior changes of note:

   - Direct I/O now works on encrypted files even without "-o inlinecrypt",
     rather than falling back to buffered I/O. This is effectively a
     bugfix, though I'll continue to keep an eye out for any user that
     may have been depending on the buffered I/O fallback.

   - IV_INO_LBLK_32 policies are no longer supported in certain cases
     that didn't make sense and have no known uses.

  This has been in linux-next since July 22 with no reported issues. All
  encryption xfstests pass on ext4 and f2fs. As usual I've also been
  using it on a system with an fscrypt-encrypted home directory. Of
  course, the blk-crypto code paths also aren't new and were already
  being used on many systems via the inlinecrypt mount option.

  In addition to the main change described above, there are a few other
  cleanups such as using lock guards for mutexes, improving
  documentation, and removing a workaround for outdated gcc versions"

* tag 'fscrypt-for-linus' of git://git.kernel.org/pub/scm/fs/fscrypt/linux: (29 commits)
  blk-crypto: Update docs for blk-crypto-fallback motivation
  blk-crypto: Remove unused function blk_crypto_config_supported()
  fscrypt: Update docs for data path
  fscrypt: Remove unused function fscrypt_finalize_bounce_page()
  f2fs: Update outdated comment in f2fs_write_begin()
  fs: Update outdated comment for SB_INLINECRYPT
  fscrypt: Update encryption policy version docs
  fscrypt: Replace some variable-size memsets with fixed-size
  fscrypt: Add safety checks to non-block-based en/decryption
  fscrypt: Merge bio.c and inline_crypt.c into block.c
  fscrypt: Remove unused functions and workqueue
  fscrypt: Remove fs-layer zeroout code
  fscrypt: Remove fscrypt_dio_supported()
  fscrypt: Replace calls to fscrypt_inode_uses_inline_crypto()
  fs/buffer: Remove fs-layer decryption code
  f2fs: Remove fs-layer file contents en/decryption code
  ext4: Further de-generalize the bio postprocessing code
  ext4: Make ext4_bio_write_folio() return void
  ext4: Remove fs-layer file contents en/decryption code
  Documentation: fscrypt: Update docs for inlinecrypt
  ...
2026-08-17 19:04:16 -07:00
..
.kunitconfig ext4: add .kunitconfig fragment to enable ext4-specific tests 2021-02-11 23:16:30 -05:00
acl.c ext4: convert to ctime accessor functions 2023-07-24 10:29:54 +02:00
acl.h Revert "ext4: apply umask if ACL support is disabled" 2024-05-02 18:25:39 -04:00
balloc.c fs/ext4: fix typo in comment 2025-11-26 17:13:34 -05:00
bitmap.c ext4: remove sbi argument from ext4_chksum() 2025-05-20 10:31:12 -04:00
block_validity.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
crypto.c ext4: Remove fs-layer file contents en/decryption code 2026-07-20 10:39:25 -07:00
dir.c treewide: change inode->i_ino from unsigned long to u64 2026-03-06 14:31:28 +01:00
ext4_extents.h ext4: fix extents-test.c is not compiled when EXT4_KUNIT_TESTS=M 2026-03-27 23:36:06 -04:00
ext4_jbd2.c ext4: Allocate mapping_metadata_bhs struct on demand 2026-07-27 16:25:31 +02:00
ext4_jbd2.h ext4/jbd2: convert jbd2_journal_blocks_per_page() to support large folio 2025-05-20 10:31:12 -04:00
ext4.h fscrypt updates for 7.3 2026-08-17 19:04:16 -07:00
extents_status.c treewide: change inode->i_ino from unsigned long to u64 2026-03-06 14:31:28 +01:00
extents_status.h ext4: make ext4_es_lookup_extent() pass out the extent seq counter 2025-11-06 10:44:39 -05:00
extents-test.c ext4: use anonymous devices for KUnit test superblocks 2026-06-29 10:31:52 +02:00
extents.c ext4: convert iomap ops to ->iomap_next() 2026-07-31 12:28:50 +02:00
fast_commit.c Various ext4 updates for 7.2-rc1: 2026-06-18 09:42:02 -07:00
fast_commit.h ext4: mark move extents fast-commit ineligible 2026-01-19 19:26:35 -05:00
file.c iomap: decouple simple direct I/O reads from iomap_dio_rw 2026-07-31 12:28:49 +02:00
fsmap.c treewide: Replace kmalloc with kmalloc_obj for non-scalar types 2026-02-21 01:02:28 -08:00
fsmap.h ext4: fsmap: fix the block/inode bitmap comment 2021-06-24 09:48:29 -04:00
fsync.c ext4: Fix data integrity writeout issues in nojournal mode 2026-07-27 16:25:33 +02:00
hash-test.c ext4: add Kunit coverage for directory hash computation 2026-06-03 10:30:15 -04:00
hash.c ext4: improve str2hashbuf by processing 4-byte chunks and removing function pointers 2026-06-03 10:30:15 -04:00
ialloc.c vfs-7.2-rc1.bh 2026-06-15 03:36:08 +05:30
indirect.c treewide: change inode->i_ino from unsigned long to u64 2026-03-06 14:31:28 +01:00
inline.c vfs-7.1-rc1.kino 2026-04-13 12:19:01 -07:00
inode-test.c ext4: add missing MODULE_DESCRIPTION() 2024-07-05 16:07:24 -04:00
inode.c fscrypt updates for 7.3 2026-08-17 19:04:16 -07:00
ioctl.c ext4: validate donor file superblock early in EXT4_IOC_MOVE_EXT 2026-06-10 10:53:50 -04:00
Kconfig ext4: remove obsolete EXT3 config options 2025-09-25 14:47:05 -04:00
Makefile ext4: add Kunit coverage for directory hash computation 2026-06-03 10:30:15 -04:00
mballoc-test.c ext4: use anonymous devices for KUnit test superblocks 2026-06-29 10:31:52 +02:00
mballoc.c Various clean ups and bug fixes in ext4 for 7.1: 2026-04-17 17:08:31 -07:00
mballoc.h ext4: fix mballoc-test.c is not compiled when EXT4_KUNIT_TESTS=M 2026-03-27 23:36:02 -04:00
migrate.c treewide: change inode->i_ino from unsigned long to u64 2026-03-06 14:31:28 +01:00
mmp.c ext4: Convert write_mmp_block_thawed() to bh_submit() 2026-06-04 10:28:08 +02:00
move_extent.c Various clean ups and bug fixes in ext4 for 7.1: 2026-04-17 17:08:31 -07:00
namei.c vfs-7.3-rc1.misc 2026-08-17 12:56:12 -07:00
orphan.c treewide: change inode->i_ino from unsigned long to u64 2026-03-06 14:31:28 +01:00
page-io.c ext4: Make ext4_bio_write_folio() return void 2026-07-20 10:39:25 -07:00
readpage.c ext4: Further de-generalize the bio postprocessing code 2026-07-20 10:39:25 -07:00
resize.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
super.c fscrypt updates for 7.3 2026-08-17 19:04:16 -07:00
symlink.c ext4: prefer IS_ERR_OR_NULL over manual NULL check 2026-04-09 21:27:24 -04:00
sysfs.c ext4: fix use-after-free in update_super_work when racing with umount 2026-03-27 23:37:39 -04:00
truncate.h ext4: Convert to use mapping->invalidate_lock 2021-07-13 14:29:00 +02:00
verity.c fsverity updates for 7.0 2026-02-12 10:41:34 -08:00
xattr_hurd.c fs: port xattr to mnt_idmap 2023-01-19 09:24:28 +01:00
xattr_security.c fs: port xattr to mnt_idmap 2023-01-19 09:24:28 +01:00
xattr_trusted.c fs: port xattr to mnt_idmap 2023-01-19 09:24:28 +01:00
xattr_user.c fs: port xattr to mnt_idmap 2023-01-19 09:24:28 +01:00
xattr.c Various clean ups and bug fixes in ext4 for 7.1: 2026-04-17 17:08:31 -07:00
xattr.h ext4: fix out-of-bound read in ext4_xattr_inode_dec_ref_all() 2025-03-18 00:15:19 -04:00