linux/fs/ceph
Linus Torvalds 50b900c564 vfs-7.2-rc1.openat2
Please consider pulling these changes from the signed vfs-7.2-rc1.openat2 tag.
 
 Thanks!
 Christian
 -----BEGIN PGP SIGNATURE-----
 
 iHUEABYKAB0WIQRAhzRXHqcMeLMyaSiRxhvAZXjcogUCaiwLKgAKCRCRxhvAZXjc
 ogT3AQCKd2J6Qz6vsVaHK8Bo9oE06Px4v2NGeu+FgCV0QQMpJQD+KTEnVl4ZepJu
 JsEw202uWeQw9Aj/SoD1oyuYO0ZIrQw=
 =rQxh
 -----END PGP SIGNATURE-----

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

Pull openat2 updates from Christian Brauner:
 "Features:

   - Add O_EMPTYPATH to openat(2)/openat2(2). To get an operable file
     descriptor from an O_PATH file descriptor it is possible to use
     openat(fd, ".", O_DIRECTORY) for directories, but other file types
     require going through open("/proc/<pid>/fd/<nr>") and thus depend
     on a functioning procfs.

     With O_EMPTYPATH an empty path string is accepted and LOOKUP_EMPTY
     is set at path resolution time, allowing to reopen the file behind
     the file descriptor directly. Selftests are included.

   - Add an OPENAT2_REGULAR flag for openat2(2) which refuses to open
     anything but regular files with the new EFTYPE error code.

     This implements the "ability to only open regular files" feature
     requested by userspace via uapi-group.org and protects services
     from being redirected to fifos, device nodes, and friends.

     All atomic_open implementations were audited for OPENAT2_REGULAR
     handling. Explicit checks were added to ceph, gfs2, nfs (v4), and
     cifs/smb - these are the filesystems whose atomic_open can
     encounter an existing non-regular file and would otherwise call
     finish_open() on it or return a misleading error code.

     The remaining implementations (9p, fuse, vboxsf, nfs v2/v3) only
     call finish_open() on freshly created files and use
     finish_no_open() for lookup hits, letting the VFS catch non-regular
     files via the do_open() safety net.

  Cleanups:

   - Migrate the openat2 selftests to the kselftest harness and move
     them under selftests/filesystems/. The tests were written in the
     early days of selftests' TAP support and the modern kselftest
     harness is much easier to follow and maintain. The contents of the
     tests are unchanged and the new emptypath tests are ported on top.

   - Make the LAST_XXX last-type constants private to fs/namei.c. The
     only user outside of fs/namei.c was ksmbd which only needs to know
     whether the last component is a regular one, so
     vfs_path_parent_lookup() now performs the LAST_NORM check
     internally. The ints are replaced with a dedicated enum last_type"

* tag 'vfs-7.2-rc1.openat2' of git://git.kernel.org/pub/scm/linux/kernel/git/vfs/vfs:
  vfs: replace ints with enum last_type for LAST_XXX
  vfs: make LAST_XXX private to fs/namei.c
  selftests: openat2: port emptypath_test to kselftest harness
  kselftest/openat2: test for OPENAT2_REGULAR flag
  openat2: new OPENAT2_REGULAR flag support
  openat2: introduce EFTYPE error code
  selftest: add tests for O_EMPTYPATH
  vfs: add O_EMPTYPATH to openat(2)/openat2(2)
  selftests: openat2: migrate to kselftest harness
  selftests: openat2: switch from custom ARRAY_LEN to ARRAY_SIZE
  selftests: openat2: move helpers to header
  selftests: move openat2 tests to selftests/filesystems/
2026-06-15 03:11:05 +05:30
..
acl.c posix_acl: make posix_acl_to_xattr() alloc the buffer 2026-01-16 10:51:12 +01:00
addr.c ceph: put folios not suitable for writeback 2026-05-11 10:39:22 +02:00
cache.c ceph: use the new ->i_state accessors 2025-10-20 20:22:27 +02:00
cache.h netfs: Provide invalidate_folio and release_folio calls 2023-12-24 15:08:51 +00:00
caps.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
ceph_frag.c
crypto.c treewide: change inode->i_ino from unsigned long to u64 2026-03-06 14:31:28 +01:00
crypto.h ceph: replace local base64 helpers with lib/base64 2025-11-20 14:03:44 -08:00
debugfs.c ceph: add subvolume metrics collection and reporting 2026-04-22 01:40:23 +02:00
dir.c ceph: only d_add() negative dentries when they are unhashed 2026-04-22 01:40:23 +02:00
export.c ceph: cleanup hardcoded constants of file handle size 2025-06-01 17:53:16 +02:00
file.c openat2: new OPENAT2_REGULAR flag support 2026-05-21 15:33:47 +02:00
inode.c ceph: parse subvolume_id from InodeStat v9 and store in inode 2026-04-22 01:40:23 +02:00
io.c ceph: fix potential race condition on operations with CEPH_I_ODIRECT flag 2025-10-08 23:30:46 +02:00
io.h ceph: make ceph_start_io_*() killable 2025-10-08 23:30:46 +02:00
ioctl.c ceph: fix potential race condition in ceph_ioctl_lazyio() 2025-10-08 23:30:46 +02:00
ioctl.h
Kconfig ceph: stop selecting CRC32, CRYPTO, and CRYPTO_AES 2025-12-10 11:50:54 +01:00
locks.c ceph: add checking of wait_for_completion_killable() return value 2025-10-08 23:30:46 +02:00
Makefile ceph: add subvolume metrics collection and reporting 2026-04-22 01:40:23 +02:00
mds_client.c fs: add icount_read_once() and stop open-coding ->i_count loads 2026-05-11 23:12:28 +02:00
mds_client.h ceph: add subvolume metrics collection and reporting 2026-04-22 01:40:23 +02:00
mdsmap.c treewide: Replace kmalloc with kmalloc_obj for non-scalar types 2026-02-21 01:02:28 -08:00
mdsmap.h ceph: fix NULL pointer dereference in ceph_mds_auth_match() 2026-02-04 22:00:42 +01:00
metric.c ceph: add subvolume metrics collection and reporting 2026-04-22 01:40:23 +02:00
metric.h ceph: add subvolume metrics collection and reporting 2026-04-22 01:40:23 +02:00
quota.c ceph: add ceph_has_realms_with_quotas() check to ceph_quota_update_statfs() 2026-05-11 10:39:22 +02:00
snap.c treewide: Replace kmalloc with kmalloc_obj for non-scalar types 2026-02-21 01:02:28 -08:00
strings.c
subvolume_metrics.c ceph: add subvolume metrics collection and reporting 2026-04-22 01:40:23 +02:00
subvolume_metrics.h ceph: add subvolume metrics collection and reporting 2026-04-22 01:40:23 +02:00
super.c ceph: add subvolume metrics collection and reporting 2026-04-22 01:40:23 +02:00
super.h ceph: add subvolume metrics collection and reporting 2026-04-22 01:40:23 +02:00
util.c
xattr.c ceph: fix BUG_ON in __ceph_build_xattrs_blob() due to stale blob size 2026-05-11 10:39:22 +02:00