linux/block
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
..
partitions partitions: aix: bound the lvd scan to one sector 2026-07-15 16:32:49 -06:00
badblocks.c badblocks: Fix a nonsense WARN_ON() which checks whether a u64 variable < 0 2025-03-10 07:41:58 -06:00
bdev.c block: reject block device inodes with i_rdev == 0 in lookup_bdev() 2026-07-03 15:12:09 +02:00
bfq-cgroup.c blk-cgroup: don't nest queue_lock under rcu in blkcg_print_blkgs() 2026-06-24 06:42:19 -06:00
bfq-iosched.c block, bfq: don't grab queue_lock to initialize bfq 2026-06-24 06:42:31 -06:00
bfq-iosched.h block, bfq: update outdated comment 2026-01-01 08:57:37 -07:00
bfq-wf2q.c block, bfq: inject I/O to underutilized actuators 2023-01-29 15:18:33 -07:00
bio-integrity-auto.c block: fix GFP_ flags confusion in bio_integrity_alloc_buf 2026-06-24 06:53:25 -06:00
bio-integrity-fs.c block: fix GFP_ flags confusion in bio_integrity_alloc_buf 2026-06-24 06:53:25 -06:00
bio-integrity.c block: handle REQ_OP_ZONE_APPEND in __bio_integrity_action 2026-06-24 06:53:25 -06:00
bio.c block: fix aligning of bounced dio read bios 2026-07-16 06:11:37 -06:00
blk-cgroup-fc-appid.c block: Replace all non-returning strlcpy with strscpy 2023-06-01 09:13:31 -06:00
blk-cgroup-rwstat.c blk-cgroup: don't nest queue_lock under rcu in blkcg_print_blkgs() 2026-06-24 06:42:19 -06:00
blk-cgroup-rwstat.h blk-cgroup: rwstat: fix kernel-doc warnings in header file 2025-01-13 07:47:09 -07:00
blk-cgroup.c blk-cgroup: fix leaks and online flag on radix_tree_insert failure 2026-07-15 16:31:43 -06:00
blk-cgroup.h blk-cgroup: don't nest queue_lock under rcu in blkcg_print_blkgs() 2026-06-24 06:42:19 -06:00
blk-core.c block: Remove redundant plug in __submit_bio() 2026-06-16 10:06:27 -06:00
blk-crypto-fallback.c blk-crypto: Simplify check for fallback support 2026-07-20 10:39:25 -07:00
blk-crypto-internal.h blk-crypto: Fold __blk_crypto_cfg_supported() into its caller 2026-07-20 10:39:25 -07:00
blk-crypto-profile.c blk-crypto: Fold __blk_crypto_cfg_supported() into its caller 2026-07-20 10:39:25 -07:00
blk-crypto-sysfs.c blk-crypto: make blk_crypto_attr instances const 2026-03-17 19:29:16 -06:00
blk-crypto.c blk-crypto: Remove unused function blk_crypto_config_supported() 2026-07-20 10:39:26 -07:00
blk-flush.c block: pass io_comp_batch to rq_end_io_fn callback 2026-01-20 10:12:54 -07:00
blk-ia-ranges.c block: ia-ranges: make blk_ia_range_sysfs_entry instances const 2026-03-17 19:29:16 -06:00
blk-integrity.c block: don't merge bios with different app_tags 2026-01-06 19:10:08 -07:00
blk-ioc.c copy_process: pass clone_flags as u64 across calltree 2025-09-01 15:31:34 +02:00
blk-iocost.c blk-cgroup: don't nest queue_lock under rcu in blkcg_print_blkgs() 2026-06-24 06:42:19 -06:00
blk-iolatency.c blk-cgroup: delay freeing policy data after rcu grace period 2026-06-24 06:37:54 -06:00
blk-ioprio.c treewide: Replace kmalloc with kmalloc_obj for non-scalar types 2026-02-21 01:02:28 -08:00
blk-ioprio.h blk-ioprio: remove per-disk structure 2024-07-28 16:47:51 -06:00
blk-lib.c block: add a bio_submit_or_kill helper 2026-04-07 08:22:24 -06:00
blk-map.c block: free copied pages when blk_rq_map_kern() fails 2026-07-16 06:08:14 -06:00
blk-merge.c block: propagate in_flight to whole disk on partition I/O 2026-06-09 10:12:50 -06:00
blk-mq-cpumap.c blk-mq: add number of queue calc helper 2025-07-01 10:24:19 -06:00
blk-mq-debugfs.c block/blk-mq-debugfs: Improve lock context annotations 2026-06-05 13:41:11 -06:00
blk-mq-debugfs.h blk-mq-debugfs: remove blk_mq_debugfs_unregister_rqos() 2026-02-02 07:05:19 -07:00
blk-mq-dma.c block: fix partial IOVA mapping cleanup in blk_rq_dma_map_iova 2026-02-12 04:23:31 -07:00
blk-mq-sched.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
blk-mq-sched.h blk-mq-sched: unify elevators checking for async requests 2026-02-03 07:45:36 -07:00
blk-mq-sysfs.c blk-mq: make blk_mq_hw_ctx_sysfs_entry instances const 2026-03-17 19:29:16 -06:00
blk-mq-tag.c blk-mq: add tracepoint block_rq_tag_wait 2026-05-26 11:01:54 -06:00
blk-mq.c blk-mq: bound blk_hctx_poll() to one jiffy 2026-06-26 10:41:33 -06:00
blk-mq.h blk-mq: use queue_hctx in blk_mq_map_queue_type 2025-12-01 07:18:31 -07:00
blk-pm.c block: force noio scope in blk_mq_freeze_queue 2025-01-31 07:20:08 -07:00
blk-pm.h block: Remove unused blk_pm_*() function definitions 2021-02-22 06:33:48 -07:00
blk-rq-qos.c blk-mq-debugfs: remove blk_mq_debugfs_unregister_rqos() 2026-02-02 07:05:19 -07:00
blk-rq-qos.h blk-rq-qos: Remove unlikely() hints from QoS checks 2026-01-06 19:08:23 -07:00
blk-settings.c block: clear BLK_FEAT_PCI_P2PDMA in blk_stack_limits() for non-supporting devices 2026-05-26 15:51:48 -06:00
blk-stat.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
blk-stat.h blk-stat: convert struct blk_stat_callback to kernel-doc 2026-02-16 10:21:06 -07:00
blk-sysfs.c block: add configurable error injection 2026-06-12 10:40:35 -06:00
blk-throttle.c blk-cgroup: delay freeing policy data after rcu grace period 2026-06-24 06:37:54 -06:00
blk-throttle.h blk-throttle: fix access race during throttle policy activation 2025-09-08 08:24:44 -06:00
blk-timeout.c
blk-wbt.c block: Make WBT latency writes honor enable state 2026-07-01 19:07:20 -06:00
blk-wbt.h blk-wbt: factor out a helper wbt_set_lat() 2026-02-02 07:05:19 -07:00
blk-zoned.c block: avoid potential deadlock on zone revalidation failure 2026-07-01 05:34:35 -06:00
blk.h block: fix race in blk_time_get_ns() returning 0 2026-07-15 16:31:05 -06:00
bsg-lib.c block: switch numa_node to int in blk_mq_hw_ctx and init_request 2026-05-26 11:01:55 -06:00
bsg.c bsg: add io_uring command support to generic layer 2026-03-19 11:38:24 -06:00
disk-events.c loop: fix partition scan race between udev and loop_reread_partitions() 2026-03-31 07:04:34 -06:00
early-lookup.c wrapper for access to ->bd_partno 2024-05-02 17:48:09 -04:00
elevator.c block: serialize elevator changes for the same queue using a writer lock 2026-07-16 06:08:38 -06:00
elevator.h block: fix race between wbt_enable_default and IO submission 2025-12-12 12:51:11 -07:00
error-injection.c block: show operation in error injection rules 2026-07-16 06:08:55 -06:00
error-injection.h block: add configurable error injection 2026-06-12 10:40:35 -06:00
fops.c block: convert iomap ops to ->iomap_next() 2026-07-31 12:28:50 +02:00
genhd.c block: stop the timeout timer when releasing a never added disk 2026-07-29 05:23:20 -06:00
holder.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
ioctl.c block: fix IORING_URING_CMD_REISSUE flags check in blkdev_uring_cmd 2026-06-16 09:56:38 -06:00
ioprio.c block: remove test of incorrect io priority level 2025-05-08 09:04:12 -06:00
Kconfig block: add configurable error injection 2026-06-12 10:40:35 -06:00
Kconfig.iosched block: Default to use cgroup support for BFQ 2023-01-30 09:42:42 -07:00
kyber-iosched.c block/Kyber: Make the lock context annotations compatible with Clang 2026-06-05 13:41:11 -06:00
Makefile block: add configurable error injection 2026-06-12 10:40:35 -06:00
mq-deadline.c block/mq-deadline: Make the lock context annotations compatible with Clang 2026-06-05 13:41:11 -06:00
opal_proto.h sed-opal: Add STACK_RESET command 2026-03-31 07:04:00 -06:00
sed-opal.c sed-opal: Add STACK_RESET command 2026-03-31 07:04:00 -06:00
t10-pi.c blk-integrity: support arbitrary buffer alignment 2026-03-14 07:44:30 -06:00