linux/fs
Linus Torvalds 4effd80841 vfs-7.4-rc1.close_range
Please consider pulling these changes from the signed vfs-7.4-rc1.close_range tag.
 
 Thanks!
 Christian
 -----BEGIN PGP SIGNATURE-----
 
 iHUEABYKAB0WIQRAhzRXHqcMeLMyaSiRxhvAZXjcogUCatHrlgAKCRCRxhvAZXjc
 ouFoAP9oJWCJRlKwbki5KP0P3O6/gnQXUz8gR07qxzWk8Gz/NgD/V3+MHkU8fX2w
 oTOGPuwrbbRNBTK/cmRG2kF6xxOPSw8=
 =jDl8
 -----END PGP SIGNATURE-----

Merge tag 'vfs-7.4-rc1.close_range' of git://git.kernel.org/pub/scm/linux/kernel/git/vfs/vfs

Pull close_range updates from Christian Brauner:
 "This adds two new close_range() flags.

  CLOSE_RANGE_EXCEPT makes close_range() operate on all file descriptors
  outside of [fd, max_fd] instead of the ones inside. Alone it closes
  everything but the range. With CLOSE_RANGE_CLOEXEC it marks everything
  but the range close-on-exec. With CLOSE_RANGE_UNSHARE dup_fd() never
  takes a reference on what is dropped. So a task between
  clone(CLONE_FILES | CLONE_VM | CLONE_VFORK) and execve() that has the
  descriptors for the child in one window can shed the rest of the
  shared table in one call and nothing outside of the window is
  referenced by the child at any point.

  CLOSE_RANGE_CLOEXEC_ONLY closes the close-on-exec descriptors in the
  range and leaves everything else alone. Whatever the caller
  deliberately passes down, stdio, LISTEN_FDS, an inherited pipe, stays
  where it is. Combined with CLOSE_RANGE_EXCEPT it names the handful of
  close-on-exec descriptors that have to survive, the executable or an
  error pipe, and closes every other close-on-exec descriptor.

  Along the way dup_fd() stops copying a range in the middle of the
  table only to close it again. close_range(CLOSE_RANGE_UNSHARE) only
  avoided the copy when the range sat at the end of the table.

  Descriptors in a skipped range are never copied and no reference is
  taken on them, so ->flush() isn't called anymore for files from a
  table they were never part of. The flags are turned into an enum and
  selftests cover the window positions, the shared and the private table
  and the unshare form"

* tag 'vfs-7.4-rc1.close_range' of git://git.kernel.org/pub/scm/linux/kernel/git/vfs/vfs:
  selftests/core: test CLOSE_RANGE_CLOEXEC_ONLY
  file: add CLOSE_RANGE_CLOEXEC_ONLY
  file: let dup_fd() drop only close-on-exec descriptors
  selftests/core: test CLOSE_RANGE_EXCEPT
  file: add CLOSE_RANGE_EXCEPT
  close_range: turn the flags into an enum
  file: let dup_fd() drop everything outside of the range
  file: rename dup_fd()'s punch_hole to range
  selftests/core: test the hole CLOSE_RANGE_UNSHARE leaves behind
  file: let dup_fd() leave the punched hole behind
2026-10-19 17:11:41 -10:00
..
9p 9p: free the session after a grace period 2026-10-14 22:08:03 +02:00
adfs vfs-7.4-rc1.bh 2026-10-19 16:57:24 -10:00
affs vfs-7.3-rc1.sync 2026-08-17 14:21:00 -07:00
afs afs: free the super info after a grace period 2026-10-14 22:08:02 +02:00
autofs autofs: ignore notification errors from a replaced pipe 2026-10-14 22:08:04 +02:00
befs
btrfs for-7.3-rc6-tag 2026-10-07 15:58:48 +02:00
cachefiles cachefiles: Fix potential UAF/KASAN warning 2026-08-31 09:54:38 +02:00
ceph kmalloc_obj conversions for v7.3-rc2 2026-09-05 20:45:18 -07:00
coda vfs-7.3-rc1.misc 2026-08-17 12:56:12 -07:00
configfs configfs: unhash the dentry before dropping the item in rmdir 2026-09-07 09:15:05 -07:00
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: don't warn about uninitialized debugfs for an error parent 2026-09-11 23:13:07 +02:00
devpts
dlm
ecryptfs eCryptfs updates for 7.3-rc1 2026-08-21 12:32:01 -07:00
efivarfs EFI updates for v7.3 2026-08-23 09:24:34 -07:00
erofs erofs: add missing buf->off in erofs_bread() 2026-09-11 12:16:20 +08:00
exfat exfat: check for a directory write error with buffer_write_io_error() 2026-09-10 09:27:25 +02:00
exportfs find_acceptable_alias(): skip NORCU aliases with zero refcount 2026-06-05 00:34:55 -04:00
ext2 ext2: check for an xattr block write error with buffer_write_io_error() 2026-09-10 09:27:24 +02:00
ext4 vfs-7.4-rc1.bh 2026-10-19 16:57:24 -10:00
f2fs f2fs-for-7.3-rc1 2026-08-28 10:48:48 -07:00
fat fat: check for a metadata write error with buffer_write_io_error() 2026-09-10 09:27:25 +02:00
fuse treewide: refresh kmalloc_obj() conversions 2026-09-04 21:37:00 -07:00
gfs2 buffer: clear BH_Write_EIO when a write succeeds, not when one starts 2026-09-10 09:27:27 +02:00
hfs treewide: refresh kmalloc_obj() conversions 2026-09-04 21:37:00 -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 mm.git review status for mm-hotfixes-stable..mm-stable 2026-08-20 18:17:08 -07:00
iomap for-7.3/block-20260819 2026-08-20 13:55:16 -07:00
isofs isofs: Fix handling of directories with tight blocks 2026-09-23 18:58:11 +02:00
jbd2 buffer: clear BH_Write_EIO when a write succeeds, not when one starts 2026-09-10 09:27:27 +02: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 super: make iterate_supers_type() deletion-safe 2026-09-23 09:26:46 +02:00
lockd NFS client updates for Linux 7.3 2026-08-26 15:09:21 -07:00
minix vfs-7.3-rc1.sync 2026-08-17 14:21:00 -07:00
netfs netfs: zero the tail of a short DIO/unbuffered read 2026-09-30 14:24:12 -03:00
nfs mm.git review status for linus..mm-stable 2026-08-27 09:17:06 -07:00
nfs_common NFS/localio: fix ref leak on nfs_uuid_add_file failure 2026-08-10 09:54:35 -04:00
nfsd nfsd-7.3 fixes: 2026-09-14 10:41:30 -07:00
nilfs2 nilfs2 updates for v7.3 2026-08-17 18:34:43 -07:00
nls
notify fsnotify: prevent mark additions during connector teardown 2026-10-14 22:08:05 +02:00
ntfs - Make MFT extension work on existing Windows-created volumes by 2026-09-18 11:02:08 -07:00
ntfs3 ntfs3: free replaced mount options after a grace period 2026-10-14 22:08:04 +02:00
ocfs2 vfs-7.4-rc1.bh 2026-10-19 16:57:24 -10:00
omfs omfs: check for an inode write error with buffer_write_io_error() 2026-09-10 09:27:24 +02:00
openpromfs
orangefs Fixes: 2026-08-20 12:36:26 -07:00
overlayfs ovl: reject lowerdir ending with unescaped backslash 2026-10-14 22:08:05 +02:00
proc mm.git review status for linus..mm-stable 2026-08-27 09:17:06 -07:00
pstore
qnx4
qnx6
quota quota: Don't issue audit messages on quota enforcing 2026-08-21 09:09:54 +02:00
ramfs mm.git review status for linus..mm-stable 2026-08-27 09:17:06 -07:00
resctrl fs/resctrl: Inform user space when status buffer overflowed 2026-07-26 21:40:26 -07:00
romfs vfs-7.3-rc1.super 2026-08-17 13:57:04 -07:00
smb kernel-7.4-rc1.signal 2026-10-19 16:22:15 -10:00
squashfs squashfs: Add dictionary size range check to prevent shift-out-of-bounds 2026-09-16 10:26:47 +02:00
sysfs Driver core changes for 7.2-rc1 2026-06-15 12:41:17 +05:30
tests
tracefs eventfs: free the eventfs_inode after an rcu grace period too 2026-10-14 22:08:03 +02:00
ubifs This pull request contains updates for UBI and UBIFS: 2026-08-28 10:59:07 -07:00
udf \n 2026-08-20 12:52:35 -07:00
ufs ufs: do not treat unreadable directory blocks as empty 2026-08-25 14:44:18 +02:00
unicode unicode: free the map after a grace period 2026-10-14 22:08:03 +02:00
vboxsf Remove excl arg to ->create inode_operation 2026-07-31 10:18:30 +02:00
verity fsverity: RCU-delay the freeing of struct fsverity_info 2026-10-05 10:50:37 +02:00
xfs xfs: fix exchange-range-to-eof file size exchange 2026-10-11 08:23:43 +02:00
zonefs zonefs: convert iomap ops to ->iomap_next() 2026-07-31 12:28:50 +02:00
aio.c mm.git review status for mm-hotfixes-stable..mm-stable 2026-08-20 18:17:08 -07: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 mm.git review status for mm-hotfixes-stable..mm-stable 2026-08-20 18:17:08 -07:00
binfmt_flat.c
binfmt_misc_bpf.c binfmt_misc: fix racy checks in bpf set_interp kfuncs 2026-09-18 11:20:55 +02:00
binfmt_misc.c vfs-7.4-rc1.binfmt 2026-10-19 17:02:56 -10:00
binfmt_script.c
bpf_fs_kfuncs.c bpf: fs/xattr: don't assume the inode is locked in path_unlink/path_rmdir 2026-09-25 17:22:09 +02:00
buffer.c buffer: Rename label 2026-09-10 09:27:28 +02:00
char_dev.c
compat_binfmt_elf.c
coredump.c kernel-7.4-rc1.signal 2026-10-19 16:22:15 -10:00
d_path.c fs: add failfs 2026-07-27 17:17:59 +02:00
dax.c fs/dax: check zero or empty entry before converting xarray entry 2026-09-05 11:47:49 -07:00
dcache.c dcache: don't put a mountpoint on a dentry that's being removed 2026-10-01 14:20:07 +02:00
direct-io.c
drop_caches.c
eventfd.c
eventpoll.c vfs-7.3-rc1.misc 2026-08-17 12:56:12 -07:00
exec.c kernel-7.4-rc1.signal 2026-10-19 16:22:15 -10:00
failfs.c fs: support FD_FAILFS_ROOT in fchdir() 2026-07-27 17:17:59 +02:00
fcntl.c fcntl: refuse F_SET_RW_HINT on an immutable inode 2026-10-04 12:31:38 +02:00
fhandle.c fhandle: decide the subtree check under mount_lock 2026-10-04 12:31:40 +02:00
file_attr.c
file_table.c namespace: drop the file's reference first in dissolve_on_fput() 2026-09-26 15:47:41 +02:00
file.c file: add CLOSE_RANGE_CLOEXEC_ONLY 2026-10-05 13:02:41 +02:00
filesystems.c fs: fix switch/case indentation in sysfs() syscall 2026-08-12 11:36:40 +02:00
fs_context.c namespace: don't reconfigure internal superblocks via remount and umount 2026-10-01 14:20:07 +02: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: bound cleanup_offline_cgwb() rescans by rotating scanned inodes 2026-09-17 12:32:51 +02:00
fserror.c
fsopen.c namespace: don't reconfigure internal superblocks via remount and umount 2026-10-01 14:20:07 +02:00
init.c
inode.c fs: avoid repeated scans in evict_inodes() 2026-09-17 12:30:14 +02:00
internal.h vfs-7.3-rc1.super 2026-08-17 13:57:04 -07:00
ioctl.c
Kconfig bfs: remove the filesystem 2026-09-04 12:43:07 +02: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
Makefile bfs: remove the filesystem 2026-09-04 12:43:07 +02:00
mbcache.c
mnt_idmapping.c
mount.h namespace: rework connected mounts 2026-10-07 00:45:49 +02:00
mpage.c
namei.c Revert "namei: don't reveal overmounted entries in refwalk" 2026-10-16 10:50:57 +02:00
namespace.c namespace-7.4-rc1.misc 2026-10-19 16:09:10 -10:00
nsfs.c vfs-7.2-rc1.misc 2026-06-15 03:59:45 +05:30
nullfs.c nullfs: add an empty immutable regular file 2026-10-07 00:45:49 +02: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: preserve existing fasync readers on writer setup failure 2026-10-14 22:08:02 +02:00
pnode.c namespace: rework connected mounts 2026-10-07 00:45:49 +02:00
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 readdir: take no inode lock on an immutable directory 2026-10-04 12:36:13 +02:00
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-rc5.fixes 2026-09-25 11:12:06 -07:00
sync.c
sysctls.c
timerfd.c
utimes.c
xattr.c lsm/stable-7.2 PR 20260615 2026-06-17 12:34:16 +01:00