[GIT PULL 14/12 for v7.0] vfs misc 2

Christian Brauner posted 12 patches 1 month, 3 weeks ago
Only 5 patches received!
[GIT PULL 14/12 for v7.0] vfs misc 2
Posted by Christian Brauner 1 month, 2 weeks ago
Hey Linus,

as announced in [1] this is one of pull requests that was delayed.

/* Summary */

This contains the second and last batch of misc vfs changes.

Features:

- Optimize close_range() from O(range size) to O(active FDs) by using
  find_next_bit() on the open_fds bitmap instead of linearly scanning
  the entire requested range. This is a significant improvement for
  large-range close operations on sparse file descriptor tables.

- Add FS_XFLAG_VERITY file attribute for fs-verity files, retrievable
  via FS_IOC_FSGETXATTR and file_getattr(). The flag is read-only. Add
  tracepoints for fs-verity enable and verify operations, replacing the
  previously removed debug printk's.

- Prevent nfsd from exporting special kernel filesystems like pidfs and
  nsfs. These filesystems have custom ->open() and ->permission() export
  methods that are designed for open_by_handle_at(2) only and are
  incompatible with nfsd. Update the exportfs documentation accordingly.

Fixes:

- Fix KMSAN uninit-value in ovl_fill_real() where strcmp() was used on a
  non-null-terminated decrypted directory entry name from fscrypt. This
  triggered on encrypted lower layers when the decrypted name buffer
  contained uninitialized tail data. The fix also adds VFS-level
  name_is_dot(), name_is_dotdot(), and name_is_dot_dotdot() helpers,
  replacing various open-coded "." and ".." checks across the tree.

- Fix read-only fsflags not being reset together with xflags in
  vfs_fileattr_set(). Currently harmless since no read-only xflags
  overlap with flags, but this would cause inconsistencies for any future
  shared read-only flag.

- Return -EREMOTE instead of -ESRCH from PIDFD_GET_INFO when the target
  process is in a different pid namespace. This lets userspace
  distinguish "process exited" from "process in another namespace",
  matching glibc's pidfd_getpid() behavior.

Cleanups:

- Use C-string literals in the Rust seq_file bindings, replacing the
  kernel::c_str!() macro (available since Rust 1.77).

- Fix typo in d_walk_ret enum comment, add porting notes for the
  readlink_copy() calling convention change.

Link: https://lore.kernel.org/20260206-vfs-v70-7df0b750d594@brauner [1]
/* Testing */

gcc (Debian 14.2.0-19) 14.2.0
Debian clang version 19.1.7 (3+b1)

No build failures or warnings were observed.

/* Conflicts */

Merge conflicts with mainline
=============================

No known conflicts.

Merge conflicts with other trees
================================

This has a merge conflict with my kernel-7.0-rc1.misc pull request:

diff --cc Documentation/filesystems/porting.rst
index 79e2c3008289,bd4128ccbb67..000000000000
--- a/Documentation/filesystems/porting.rst
+++ b/Documentation/filesystems/porting.rst
@@@ -1336,18 -1339,8 +1336,28 @@@ in-tree filesystems have done)

  **mandatory**

 +The ->setlease() file_operation must now be explicitly set in order to provide
 +support for leases. When set to NULL, the kernel will now return -EINVAL to
 +attempts to set a lease. Filesystems that wish to use the kernel-internal lease
 +implementation should set it to generic_setlease().
 +
 +---
 +
 +**mandatory**
 +
 +fs/namei.c primitives that consume filesystem references (do_renameat2(),
 +do_linkat(), do_symlinkat(), do_mkdirat(), do_mknodat(), do_unlinkat()
 +and do_rmdir()) are gone; they are replaced with non-consuming analogues
 +(filename_renameat2(), etc.)
 +Callers are adjusted - responsibility for dropping the filenames belongs
 +to them now.
++
++---
++
++**mandatory**
++
+ readlink_copy() now requires link length as the 4th argument. Said length needs
+ to match what strlen() would return if it was ran on the string.
+
+ However, if the string is freely accessible for the duration of inode's
+ lifetime, consider using inode_set_cached_link() instead.

The following changes since commit 6cbfdf89470ef3c2110f376a507d135e7a7a7378:

  posix_acl: make posix_acl_to_xattr() alloc the buffer (2026-01-16 10:51:12 +0100)

are available in the Git repository at:

  git@gitolite.kernel.org:pub/scm/linux/kernel/git/vfs/vfs tags/vfs-7.0-rc1.misc.2

for you to fetch changes up to dedfae78f00960d703badc500422d10e1f12b2bc:

  fs: add porting notes about readlink_copy() (2026-02-03 15:17:34 +0100)

----------------------------------------------------------------
vfs-7.0-rc1.misc.2

Please consider pulling these changes from the signed vfs-7.0-rc1.misc.2 tag.

Thanks!
Christian

----------------------------------------------------------------
Amir Goldstein (4):
      fs: add helpers name_is_dot{,dot,_dotdot}
      ovl: use name_is_dot* helpers in readdir code
      exportfs: clarify the documentation of open()/permission() expotrfs ops
      nfsd: do not allow exporting of special kernel filesystems

Andrey Albershteyn (3):
      fs: reset read-only fsflags together with xflags
      fs: add FS_XFLAG_VERITY for fs-verity files
      fsverity: add tracepoints

Chelsy Ratnawat (1):
      fs: dcache: fix typo in enum d_walk_ret comment

Christian Brauner (2):
      Merge patch series "name_is_dot* cleanup"
      Merge patch series "Add traces and file attributes for fs-verity"

Luca Boccassi (1):
      pidfs: return -EREMOTE when PIDFD_GET_INFO is called on another ns

Mateusz Guzik (1):
      fs: add porting notes about readlink_copy()

Qiliang Yuan (1):
      fs/file: optimize close_range() complexity from O(N) to O(Sparse)

Qing Wang (1):
      ovl: Fix uninit-value in ovl_fill_real

Tamir Duberstein (1):
      rust: seq_file: replace `kernel::c_str!` with C-Strings

 Documentation/filesystems/fsverity.rst |  16 ++++
 Documentation/filesystems/porting.rst  |  10 +++
 MAINTAINERS                            |   1 +
 fs/crypto/fname.c                      |   2 +-
 fs/dcache.c                            |  10 +--
 fs/ecryptfs/crypto.c                   |   2 +-
 fs/exportfs/expfs.c                    |   3 +-
 fs/f2fs/dir.c                          |   2 +-
 fs/f2fs/hash.c                         |   2 +-
 fs/file.c                              |  10 ++-
 fs/file_attr.c                         |  10 ++-
 fs/namei.c                             |   2 +-
 fs/nfsd/export.c                       |   8 +-
 fs/overlayfs/readdir.c                 |  41 ++++-----
 fs/pidfs.c                             |   2 +-
 fs/smb/server/vfs.c                    |   2 +-
 fs/verity/enable.c                     |   4 +
 fs/verity/fsverity_private.h           |   2 +
 fs/verity/init.c                       |   1 +
 fs/verity/verify.c                     |   9 ++
 include/linux/exportfs.h               |  21 ++++-
 include/linux/fileattr.h               |   6 +-
 include/linux/fs.h                     |  14 +++-
 include/trace/events/fsverity.h        | 146 +++++++++++++++++++++++++++++++++
 include/uapi/linux/fs.h                |   1 +
 rust/kernel/seq_file.rs                |   4 +-
 26 files changed, 274 insertions(+), 57 deletions(-)
 create mode 100644 include/trace/events/fsverity.h
Re: [GIT PULL 14/12 for v7.0] vfs misc 2
Posted by pr-tracker-bot@kernel.org 1 month, 2 weeks ago
The pull request you sent on Mon, 16 Feb 2026 13:55:40 +0100:

> git@gitolite.kernel.org:pub/scm/linux/kernel/git/vfs/vfs tags/vfs-7.0-rc1.misc.2

has been merged into torvalds/linux.git:
https://git.kernel.org/torvalds/c/45a43ac5acc90b8f4835eea92692f620e561a06b

Thank you!

-- 
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/prtracker.html