linux/include
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
..
acpi ACPI: bus: Drop two fields from struct acpi_device_pnp 2026-09-01 21:45:50 +02:00
asm-generic kho: make boot time huge page allocation work nicely with KHO 2026-08-23 09:17:38 -07:00
clocksource hyperv-next for v7.3-rc1 2026-08-26 16:47:40 -07:00
crypto This update includes the following changes: 2026-08-19 17:25:42 -07:00
cxl
drm drm/exec: don't immediately add prelocked obj to array of locked objs 2026-10-14 13:57:14 +02:00
dt-bindings sound fixes for 7.3-rc1 2026-08-28 10:01:02 -07:00
hyperv
keys keys: translate request_key_auth pid for the reading procfs instance 2026-09-12 00:43:45 +03:00
kunit gpio updates for v7.3-rc1 2026-08-19 09:10:07 -07:00
kvm KVM/arm64 changes for 7.3 2026-08-24 12:42:07 -04:00
linux vfs-7.4-rc1.close_range 2026-10-19 17:11:41 -10:00
math-emu
media media: hevc: add bounded tile-count helpers 2026-09-07 09:01:05 +02:00
memory
misc
net ipv4: validate checksum_start before completing checksum 2026-10-08 11:03:47 -07:00
pcmcia
ras
rdma RDMA/uverbs: Fix mmap_lock/disassociation_lock circular dependency 2026-09-01 10:03:08 -04:00
rv mm.git review status for linus..mm-stable 2026-08-27 09:17:06 -07:00
scsi SCSI updates for 7.3 2026-08-29 11:55:36 -07:00
soc Mostly the usual clk driver updates and new SoC additions plus non-critical 2026-08-26 11:14:30 -07:00
sound ASoC: cs35l56: Add DAI for SDCA OT25 stream 2026-10-07 13:20:05 +02:00
target
trace Landlock fix for v7.3-rc5 2026-09-24 10:53:59 -07:00
uapi vfs-7.4-rc1.close_range 2026-10-19 17:11:41 -10:00
ufs
vdso random: vDSO: fix repeated word 'to' in comment 2026-09-16 11:51:39 +02:00
video fbdev: maxine: fix 64-bit build error 2026-08-20 23:45:07 +02:00
xen
Kbuild