linux/fs
Linus Torvalds d47db9bf50 Crypto library updates for 7.3
Add library APIs for most AES encryption modes that are used in the
 kernel (ECB, CBC, CBC-CTS, CTR, XCTR, XTS, GCM, CCM).
 
 These AES modes have many in-kernel users that are currently using the
 crypto_skcipher or crypto_aead APIs. These existing APIs are difficult
 to use and inefficient. Until now, the lack of proper library support
 for these has been the main gap in the crypto library.
 
 This set of changes is the next stage of addressing it:
 
   - Implement the new APIs on top of the existing support for
     single-block AES in the library.
 
   - Fully document the new APIs.
 
   - Migrate the only user of the old AES-GCM library API to the new,
     more flexible API; then remove the old API and its implementation.
 
   - Wire up the new APIs to the traditional crypto API by adding
     crypto_skcipher and crypto_aead algorithms.
 
     This makes the new APIs be covered by the traditional crypto API's
     self-tests. It also makes them be already used for real on systems
     that don't have architecture-optimized code for these modes.
 
     But most importantly, this is a prerequisite for migrating the
     architecture-optimized code for these AES modes (i.e.
     arch/*/crypto/aes*) into the library, which as usual will
     eliminate a lot of redundant "glue" code.
 
 Note that unlike some of the other algorithms that have been migrated
 to the library, e.g. SHA-512, for these AES modes there was too much
 to get done in one cycle. Nor did it make sense to handle these modes
 one at a time, because they tend to be coupled together or depend on
 each other, especially in the architecture-optimized AES code.
 
 Thus, most of the benefits (reductions in lines of code, performance
 improvements, etc.) will follow in later cycles when
 architecture-optimized code is migrated into the library and users of
 crypto_skcipher and crypto_aead are updated to use the new APIs.
 
 The design of the new APIs was informed by writing proof-of-concept
 patches for many kernel subsystems currently accessing these same
 algorithms via crypto_skcipher or crypto_aead (patches 18-33 of
 https://lore.kernel.org/r/20260707053503.209874-1-ebiggers@kernel.org/).
 
 While those patches will be resent for real later, the total diffstat
 for them was negative 1905 lines. So clearly the new APIs are quite a
 bit easier to use and align better with what users actually need.
 
 Besides the new AES encryption APIs, there are also a few changes for
 improved AES-CMAC key and context zeroization.
 -----BEGIN PGP SIGNATURE-----
 
 iIoEABYIADIWIQSacvsUNc7UX4ntmEPzXCl4vpKOKwUCaoEqhRQcZWJpZ2dlcnNA
 a2VybmVsLm9yZwAKCRDzXCl4vpKOKy8YAP4o44z09KdugtigFIFX7qQnLk0uPAw+
 sTPqmu+FA4jOGAD/Vy23hzAVpWmSBFhyo7HMK9W0ABK7cqj6x23I/N6JRgM=
 =SLPT
 -----END PGP SIGNATURE-----

Merge tag 'libcrypto-updates-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ebiggers/linux

Pull crypto library updates from Eric Biggers:
 "Add library APIs for most AES encryption modes that are used in the
  kernel (ECB, CBC, CBC-CTS, CTR, XCTR, XTS, GCM, CCM).

  These AES modes have many in-kernel users that are currently using the
  crypto_skcipher or crypto_aead APIs. These existing APIs are difficult
  to use and inefficient. Until now, the lack of proper library support
  for these has been the main gap in the crypto library.

  This set of changes is the next stage of addressing it:

   - Implement the new APIs on top of the existing support for
     single-block AES in the library.

   - Fully document the new APIs.

   - Migrate the only user of the old AES-GCM library API to the new,
     more flexible API; then remove the old API and its implementation.

   - Wire up the new APIs to the traditional crypto API by adding
     crypto_skcipher and crypto_aead algorithms.

     This makes the new APIs be covered by the traditional crypto API's
     self-tests. It also makes them be already used for real on systems
     that don't have architecture-optimized code for these modes.

     But most importantly, this is a prerequisite for migrating the
     architecture-optimized code for these AES modes (i.e.
     arch/*/crypto/aes*) into the library, which as usual will eliminate
     a lot of redundant "glue" code.

  Note that unlike some of the other algorithms that have been migrated
  to the library, e.g. SHA-512, for these AES modes there was too much
  to get done in one cycle. Nor did it make sense to handle these modes
  one at a time, because they tend to be coupled together or depend on
  each other, especially in the architecture-optimized AES code.

  Thus, most of the benefits (reductions in lines of code, performance
  improvements, etc.) will follow in later cycles when
  architecture-optimized code is migrated into the library and users of
  crypto_skcipher and crypto_aead are updated to use the new APIs.

  The design of the new APIs was informed by writing proof-of-concept
  patches for many kernel subsystems currently accessing these same
  algorithms via crypto_skcipher or crypto_aead (patches 18-33 of
  https://lore.kernel.org/r/20260707053503.209874-1-ebiggers@kernel.org/).

  While those patches will be resent for real later, the total diffstat
  for them was negative 1905 lines. So clearly the new APIs are quite a
  bit easier to use and align better with what users actually need.

  Besides the new AES encryption APIs, there are also a few changes for
  improved AES-CMAC key and context zeroization"

* tag 'libcrypto-updates-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ebiggers/linux:
  mac80211: fils_aead: Use __cleanup() instead of memzero_explicit()
  Bluetooth: SMP: clear the aes_cmac_key when done
  smb: clear the aes_cmac_key and aes_cmac_ctx when done
  lib/crypto: aes-cmac: Add zeroization functions
  lib/crypto: aesgcm: Remove old AES-GCM library
  x86/sev: Remove obsolete virtual address check
  x86/sev: Use new AES-GCM library
  crypto: aes - Add CCM support using library
  crypto: aes - Add GCM support using library
  crypto: aes - Add XTS support using library
  crypto: aes - Add CTR and XCTR support using library
  crypto: aes - Add CBC and CBC-CTS support using library
  crypto: aes - Add ECB support using library
  lib/crypto: aes: Add CCM support
  lib/crypto: aes: Add GCM support
  lib/crypto: aes: Add XTS support
  lib/crypto: aes: Add CTR and XCTR support
  lib/crypto: aes: Add CBC and CBC-CTS support
  lib/crypto: aes: Add ECB support
  crypto: xts - Split out __xts_verify_key() helper
2026-08-17 19:16:42 -07:00
..
9p vfs-7.3-rc1.misc 2026-08-17 12:56:12 -07:00
adfs ARM development for 7.1-rc1 2026-04-25 07:44:26 -07:00
affs vfs-7.3-rc1.sync 2026-08-17 14:21:00 -07:00
afs vfs-7.3-rc1.misc 2026-08-17 12:56:12 -07:00
autofs autofs: drop redundant S_IFDIR from mkdir 2026-07-01 12:48:44 +02:00
befs befs: handle set_blocksize failures 2026-05-21 13:39:35 +02:00
bfs vfs-7.3-rc1.sync 2026-08-17 14:21:00 -07:00
btrfs vfs-7.3-rc1.super 2026-08-17 13:57:04 -07:00
cachefiles cachefiles,netfs: sunset ondemand mode 2026-08-12 16:24:26 +02:00
ceph vfs-7.3-rc1.misc 2026-08-17 12:56:12 -07:00
coda vfs-7.3-rc1.misc 2026-08-17 12:56:12 -07:00
configfs configfs work 2026-06-15 04:28:20 +05:30
cramfs fs: add dedicated block device open helpers for filesystems 2026-06-29 10:31:52 +02:00
crypto fscrypt updates for 7.3 2026-08-17 19:04:16 -07:00
debugfs debugfs: fix placement of EXPORT_SYMBOL_GPL for debugfs_create_str() 2026-04-02 16:15:23 +02:00
devpts
dlm dlm: init per node debugfs before add to node hash 2026-05-08 08:38:03 -05:00
ecryptfs Remove excl arg to ->create inode_operation 2026-07-31 10:18:30 +02:00
efivarfs Remove excl arg to ->create inode_operation 2026-07-31 10:18:30 +02:00
erofs vfs-7.3-rc1.super 2026-08-17 13:57:04 -07:00
exfat vfs-7.3-rc1.lookup 2026-08-17 12:03:34 -07:00
exportfs find_acceptable_alias(): skip NORCU aliases with zero refcount 2026-06-05 00:34:55 -04:00
ext2 vfs-7.3-rc1.sync 2026-08-17 14:21:00 -07:00
ext4 fscrypt updates for 7.3 2026-08-17 19:04:16 -07:00
f2fs fscrypt updates for 7.3 2026-08-17 19:04:16 -07:00
fat vfs-7.3-rc1.sync 2026-08-17 14:21:00 -07:00
fuse vfs-7.3-rc1.misc 2026-08-17 12:56:12 -07:00
gfs2 gfs2 changes 2026-08-17 17:03:34 -07:00
hfs hfs/hfsplus updates for v7.3 2026-08-17 18:14:32 -07:00
hfsplus hfs/hfsplus updates for v7.3 2026-08-17 18:14:32 -07:00
hostfs Remove excl arg to ->create inode_operation 2026-07-31 10:18:30 +02:00
hpfs vfs-7.3-rc1.misc 2026-08-17 12:56:12 -07:00
hugetlbfs vfs-7.3-rc1.misc 2026-08-17 12:56:12 -07:00
iomap vfs-7.3-rc1.misc 2026-08-17 12:56:12 -07:00
isofs \n 2026-06-16 11:58:52 +05:30
jbd2 Various ext4 updates for 7.2-rc1: 2026-06-18 09:42:02 -07:00
jffs2 vfs-7.3-rc1.misc 2026-08-17 12:56:12 -07:00
jfs vfs-7.3-rc1.misc 2026-08-17 12:56:12 -07:00
kernfs Driver core changes for 7.2-rc1 2026-06-15 12:41:17 +05:30
lockd lockd: fix NLMv3 GRANTED_MSG handling 2026-07-17 09:31:50 -04:00
minix vfs-7.3-rc1.sync 2026-08-17 14:21:00 -07:00
netfs netfs: Fix folio_queue ENOMEM in writeback by adding a mempool 2026-07-28 15:42:31 +02:00
nfs vfs-7.3-rc1.misc 2026-08-17 12:56:12 -07:00
nfs_common
nfsd nfsd-7.2 fixes: 2026-07-13 08:38:01 -07:00
nilfs2 nilfs2 updates for v7.3 2026-08-17 18:34:43 -07:00
nls
notify \n 2026-06-16 11:56:43 +05:30
ntfs vfs-7.3-rc1.misc 2026-08-17 12:56:12 -07:00
ntfs3 vfs-7.3-rc1.misc 2026-08-17 12:56:12 -07:00
ocfs2 vfs-7.3-rc1.super 2026-08-17 13:57:04 -07:00
omfs vfs-7.3-rc1.misc 2026-08-17 12:56:12 -07:00
openpromfs
orangefs vfs-7.3-rc1.misc 2026-08-17 12:56:12 -07:00
overlayfs vfs-7.3-rc1.ovl 2026-08-17 13:38:36 -07:00
proc vfs-7.3-rc1.kthread 2026-08-17 11:35:12 -07:00
pstore mm.git review status for linus..mm-stable 2026-04-15 12:59:16 -07:00
qnx4 qnx4: handle set_blocksize failures 2026-05-21 13:39:35 +02:00
qnx6 fs/qnx6: fix pointer arithmetic in directory iteration 2026-05-28 14:16:33 +02:00
quota quota: allocate dquot_hash with kmalloc() 2026-05-27 15:12:22 +02:00
ramfs vfs-7.3-rc1.misc 2026-08-17 12:56:12 -07:00
resctrl fs/resctrl: Fix double-add of pseudo-locked region's RMID to free list 2026-07-06 19:05:49 -07:00
romfs vfs-7.3-rc1.super 2026-08-17 13:57:04 -07:00
smb Crypto library updates for 7.3 2026-08-17 19:16:42 -07:00
squashfs
sysfs Driver core changes for 7.2-rc1 2026-06-15 12:41:17 +05:30
tests
tracefs eventfs: Use children field for rcu head and add memory barriers 2026-08-08 10:36:05 -04:00
ubifs vfs-7.3-rc1.misc 2026-08-17 12:56:12 -07:00
udf vfs-7.3-rc1.sync 2026-08-17 14:21:00 -07:00
ufs vfs-7.3-rc1.misc 2026-08-17 12:56:12 -07:00
unicode
vboxsf Remove excl arg to ->create inode_operation 2026-07-31 10:18:30 +02:00
verity fsverity: Fix silent truncation in bpf_get_fsverity_digest() 2026-08-04 09:24:23 +02:00
xfs xfs: new patches for Linux 7.3 2026-08-17 16:41:57 -07:00
zonefs zonefs: convert iomap ops to ->iomap_next() 2026-07-31 12:28:50 +02:00
aio.c libfs: drop redundant SB_I_NOEXEC/SB_I_NODEV in init_pseudo() callers 2026-06-04 10:10:49 +02:00
anon_inodes.c libfs: drop redundant SB_I_NOEXEC/SB_I_NODEV in init_pseudo() callers 2026-06-04 10:10:49 +02:00
attr.c fs,fsverity: remove check for fsverity being enabled in setattr_prepare() 2026-07-28 21:25:03 -07:00
backing-file.c fs: fix user path of nested backing files 2026-08-12 11:36:40 +02:00
bad_inode.c Remove excl arg to ->create inode_operation 2026-07-31 10:18:30 +02:00
binfmt_elf_fdpic.c binfmt_elf_fdpic: consume a stashed PT_INTERP substitute 2026-08-03 10:08:46 +02:00
binfmt_elf.c binfmt_elf: consume a stashed PT_INTERP substitute 2026-08-03 10:08:46 +02:00
binfmt_flat.c
binfmt_misc_bpf.c binfmt_misc: let a 'B' entry bind its interpreters 2026-08-03 19:15:44 +02:00
binfmt_misc.c vfs-7.3-rc1.binfmt 2026-08-17 08:35:25 -07:00
binfmt_script.c
bpf_fs_kfuncs.c vfs-7.3-rc1.kfunc 2026-08-17 11:02:10 -07:00
buffer.c fscrypt updates for 7.3 2026-08-17 19:04:16 -07:00
char_dev.c
compat_binfmt_elf.c
coredump.c coredump: use scoped_with_init_fs() for coredump path resolution 2026-06-29 10:44:08 +02:00
d_path.c fs: add failfs 2026-07-27 17:17:59 +02:00
dax.c dax changes for 7.1 2026-04-21 14:12:01 -07:00
dcache.c dcache: keep shrink_dcache_for_umount() making progress on busy roots 2026-07-31 10:46:02 +02:00
direct-io.c direct-io: remove IOCB_NOWAIT support 2026-05-26 11:01:55 -06:00
drop_caches.c
eventfd.c
eventpoll.c vfs-7.3-rc1.misc 2026-08-17 12:56:12 -07:00
exec.c binfmt_misc: let a 'B' entry bind its interpreters 2026-08-03 19:15:44 +02:00
failfs.c fs: support FD_FAILFS_ROOT in fchdir() 2026-07-27 17:17:59 +02:00
fcntl.c vfs-7.2-rc1.misc 2026-06-15 03:59:45 +05:30
fhandle.c fhandle: reject detached mounts in capable_wrt_mount() 2026-07-01 15:26:32 +02:00
file_attr.c fs: Add case sensitivity flags to file_kattr 2026-05-11 16:50:27 +02:00
file_table.c dentry memory safety stuff 2026-06-15 04:15:31 +05:30
file.c fs: retire stale comment in fget_task_next() 2026-05-28 14:27:00 +02:00
filesystems.c fs: fix switch/case indentation in sysfs() syscall 2026-08-12 11:36:40 +02:00
fs_context.c vfs-7.1-rc1.misc 2026-04-13 14:20:11 -07:00
fs_dirent.c
fs_parser.c
fs_pin.c
fs_struct.c fs: stop rewriting paths for PF_EXITING | PF_DUMPCORE 2026-06-29 10:54:43 +02:00
fs-writeback.c writeback: Export __inode_attach_wb() 2026-07-28 14:08:52 +02:00
fserror.c
fsopen.c
init.c
inode.c fs: remove stale inode_insert5() kernel-doc parameter 2026-08-12 11:36:40 +02:00
internal.h vfs-7.3-rc1.super 2026-08-17 13:57:04 -07:00
ioctl.c
Kconfig vfs-7.3-rc1.efs 2026-08-17 08:55:58 -07:00
Kconfig.binfmt binfmt_misc: add binfmt_misc_ops bpf struct_ops 2026-08-03 10:08:41 +02:00
kernel_read_file.c fs: use scoped_with_init_fs() for kernel_read_file_from_path_initns() 2026-06-29 10:44:09 +02:00
libfs.c fs: Provide way for filesystem to wait for metadata writeback 2026-07-27 16:25:32 +02:00
locks.c filelock: add an inode_lease_ignore_mask helper 2026-05-15 19:24:32 +02:00
Makefile vfs-7.3-rc1.failfs 2026-08-17 09:15:52 -07:00
mbcache.c vfs-7.1-rc1.misc 2026-04-13 14:20:11 -07:00
mnt_idmapping.c fs/statmount: fix slab out-of-bounds write in statmount_mnt_idmap 2026-05-11 14:19:01 +02:00
mount.h vfs-7.2-rc1.procfs 2026-06-15 04:07:58 +05:30
mpage.c mm.git review status for linus..mm-stable 2026-04-15 12:59:16 -07:00
namei.c vfs-7.3-rc1.misc 2026-08-17 12:56:12 -07:00
namespace.c vfs-7.3-rc1.super 2026-08-17 13:57:04 -07:00
nsfs.c vfs-7.2-rc1.misc 2026-06-15 03:59:45 +05:30
nullfs.c vfs-7.3-rc1.misc 2026-08-17 12:56:12 -07:00
open.c fs: support FD_FAILFS_ROOT in fchroot() 2026-07-27 17:18:00 +02:00
pidfs.c vfs-7.3-rc1.misc 2026-08-17 12:56:12 -07:00
pipe.c pipe: only enable the extra wake_up(rd_wait) for EPOLLET consumers 2026-08-12 11:36:41 +02:00
pnode.c
pnode.h
posix_acl.c vfs-7.3-rc1.misc 2026-08-17 12:56:12 -07:00
proc_namespace.c fs: add real_fs to track task's actual fs_struct 2026-06-29 10:43:45 +02:00
read_write.c fs/read_write: Do not export __kernel_write() to the entire world 2026-06-05 14:46:20 +02:00
readdir.c
remap_range.c
select.c vfs-7.2-rc1.misc 2026-06-15 03:59:45 +05:30
seq_file.c seq_file: rename mangle_path to seq_mangle_path 2026-07-31 10:09:14 +02:00
signalfd.c
splice.c
stack.c
stat.c fs: annotate inode timestamp accessors 2026-07-31 10:09:11 +02:00
statfs.c
super.c vfs-7.3-rc1.super 2026-08-17 13:57:04 -07:00
sync.c sync_file_range: delete dead S_ISLNK code 2026-05-21 13:39:36 +02:00
sysctls.c
timerfd.c fs/timerfd: Use the new alarm/hrtimer functions 2026-05-01 21:36:13 +02:00
utimes.c
xattr.c lsm/stable-7.2 PR 20260615 2026-06-17 12:34:16 +01:00