* [GIT PULL 01/12 for v6.18] misc
  2025-09-26 14:18 [GIT PULL 00/12 for v6.18] vfs 6.18 Christian Brauner
@ 2025-09-26 14:18 ` Christian Brauner
  2025-09-29  9:47   ` Christian Brauner
  2025-09-29 19:31   ` pr-tracker-bot
  2025-09-26 14:18 ` [GIT PULL 02/12 for v6.18] mount Christian Brauner
                   ` (10 subsequent siblings)
  11 siblings, 2 replies; 32+ messages in thread
From: Christian Brauner @ 2025-09-26 14:18 UTC (permalink / raw)
  To: Linus Torvalds; +Cc: Christian Brauner, linux-fsdevel, linux-kernel
Hey Linus,
/* Summary */
This contains the usual selections of misc updates for this cycle.
Features:
- Add "initramfs_options" parameter to set initramfs mount options. This
  allows to add specific mount options to the rootfs to e.g., limit the
  memory size.
- Add RWF_NOSIGNAL flag for pwritev2()
  Add RWF_NOSIGNAL flag for pwritev2. This flag prevents the SIGPIPE
  signal from being raised when writing on disconnected pipes or
  sockets. The flag is handled directly by the pipe filesystem and
  converted to the existing MSG_NOSIGNAL flag for sockets.
- Allow to pass pid namespace as procfs mount option
  Ever since the introduction of pid namespaces, procfs has had very
  implicit behaviour surrounding them (the pidns used by a procfs mount
  is auto-selected based on the mounting process's active pidns, and the
  pidns itself is basically hidden once the mount has been constructed).
  This implicit behaviour has historically meant that userspace was
  required to do some special dances in order to configure the pidns of
  a procfs mount as desired. Examples include:
  * In order to bypass the mnt_too_revealing() check, Kubernetes creates
    a procfs mount from an empty pidns so that user namespaced
    containers can be nested (without this, the nested containers would
    fail to mount procfs). But this requires forking off a helper
    process because you cannot just one-shot this using mount(2).
  * Container runtimes in general need to fork into a container before
    configuring its mounts, which can lead to security issues in the
    case of shared-pidns containers (a privileged process in the pidns
    can interact with your container runtime process).
    While SUID_DUMP_DISABLE and user namespaces make this less of an
    issue, the strict need for this due to a minor uAPI wart is kind of
    unfortunate.
    Things would be much easier if there was a way for userspace to just
    specify the pidns they want. So this pull request contains changes
    to implement a new "pidns" argument which can be set using
    fsconfig(2):
        fsconfig(procfd, FSCONFIG_SET_FD, "pidns", NULL, nsfd);
        fsconfig(procfd, FSCONFIG_SET_STRING, "pidns", "/proc/self/ns/pid", 0);
    or classic mount(2) / mount(8):
        // mount -t proc -o pidns=/proc/self/ns/pid proc /tmp/proc
        mount("proc", "/tmp/proc", "proc", MS_..., "pidns=/proc/self/ns/pid");
Cleanups:
- Remove the last references to EXPORT_OP_ASYNC_LOCK.
- Make file_remove_privs_flags() static.
- Remove redundant __GFP_NOWARN when GFP_NOWAIT is used.
- Use try_cmpxchg() in start_dir_add().
- Use try_cmpxchg() in sb_init_done_wq().
- Replace offsetof() with struct_size() in ioctl_file_dedupe_range().
- Remove vfs_ioctl() export.
- Replace rwlock() with spinlock in epoll code as rwlock causes priority
  inversion on preempt rt kernels.
- Make ns_entries in fs/proc/namespaces const.
- Use a switch() statement() in init_special_inode() just like we do in
  may_open().
- Use struct_size() in dir_add() in the initramfs code.
- Use str_plural() in rd_load_image().
- Replace strcpy() with strscpy() in find_link().
- Rename generic_delete_inode() to inode_just_drop() and
  generic_drop_inode() to inode_generic_drop().
- Remove unused arguments from fcntl_{g,s}et_rw_hint().
Fixes:
- Document @name parameter for name_contains_dotdot() helper.
- Fix spelling mistake.
- Always return zero from replace_fd() instead of the file descriptor number.
- Limit the size for copy_file_range() in compat mode to prevent a signed
  overflow.
- Fix debugfs mount options not being applied.
- Verify the inode mode when loading it from disk in minixfs.
- Verify the inode mode when loading it from disk in cramfs.
- Don't trigger automounts with RESOLVE_NO_XDEV
  If openat2() was called with RESOLVE_NO_XDEV it didn't traverse
  through automounts, but could still trigger them.
- Add FL_RECLAIM flag to show_fl_flags() macro so it appears in tracepoints.
- Fix unused variable warning in rd_load_image() on s390.
- Make INITRAMFS_PRESERVE_MTIME depend on BLK_DEV_INITRD.
- Use ns_capable_noaudit() when determining net sysctl permissions.
- Don't call path_put() under namespace semaphore in listmount() and statmount().
/* 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
================================
No known conflicts.
The following changes since commit 8f5ae30d69d7543eee0d70083daf4de8fe15d585:
  Linux 6.17-rc1 (2025-08-10 19:41:16 +0300)
are available in the Git repository at:
  git@gitolite.kernel.org:pub/scm/linux/kernel/git/vfs/vfs tags/vfs-6.18-rc1.misc
for you to fetch changes up to 28986dd7e38fb5ba2f180f9eb3ff330798719369:
  fcntl: trim arguments (2025-09-26 10:21:23 +0200)
Please consider pulling these changes from the signed vfs-6.18-rc1.misc tag.
Thanks!
Christian
----------------------------------------------------------------
vfs-6.18-rc1.misc
----------------------------------------------------------------
Aleksa Sarai (3):
      pidns: move is-ancestor logic to helper
      procfs: add "pidns" mount option
      selftests/proc: add tests for new pidns APIs
Askar Safin (4):
      namei: move cross-device check to traverse_mounts
      namei: remove LOOKUP_NO_XDEV check from handle_mounts
      namei: move cross-device check to __traverse_mounts
      openat2: don't trigger automounts with RESOLVE_NO_XDEV
Charalampos Mitrodimas (1):
      debugfs: fix mount options not being applied
Christian Brauner (5):
      Merge patch series "vfs: if RESOLVE_NO_XDEV passed to openat2, don't *trigger* automounts"
      Merge patch series "procfs: make reference pidns more user-visible"
      Merge patch "eventpoll: Fix priority inversion problem"
      statmount: don't call path_put() under namespace semaphore
      listmount: don't call path_put() under namespace semaphore
Christian Göttsche (1):
      pid: use ns_capable_noaudit() when determining net sysctl permissions
Christoph Hellwig (1):
      fs: mark file_remove_privs_flags static
Geert Uytterhoeven (1):
      init: INITRAMFS_PRESERVE_MTIME should depend on BLK_DEV_INITRD
Greg Kroah-Hartman (1):
      fs: remove vfs_ioctl export
Jeff Layton (1):
      filelock: add FL_RECLAIM to show_fl_flags() macro
Kanchan Joshi (1):
      fcntl: trim arguments
Kriish Sharma (1):
      fs: document 'name' parameter for name_contains_dotdot()
Lauri Vasama (1):
      Add RWF_NOSIGNAL flag for pwritev2
Lichen Liu (1):
      fs: Add 'initramfs_options' to set initramfs mount options
Mateusz Guzik (2):
      fs: use the switch statement in init_special_inode()
      fs: rename generic_delete_inode() and generic_drop_inode()
Max Kellermann (1):
      fs/proc/namespaces: make ns_entries const
Miklos Szeredi (1):
      copy_file_range: limit size if in compat mode
Nam Cao (1):
      eventpoll: Replace rwlock with spinlock
Qianfeng Rong (1):
      fs-writeback: Remove redundant __GFP_NOWARN
Tetsuo Handa (3):
      vfs: show filesystem name at dump_inode()
      minixfs: Verify inode mode when loading from disk
      cramfs: Verify inode mode when loading from disk
Thiago Becker (1):
      locks: Remove the last reference to EXPORT_OP_ASYNC_LOCK.
Thomas Weißschuh (1):
      fs: always return zero on success from replace_fd()
Thorsten Blum (4):
      initrd: Fix unused variable warning in rd_load_image() on s390
      initramfs: Use struct_size() helper to improve dir_add()
      initrd: Use str_plural() in rd_load_image()
      initramfs: Replace strcpy() with strscpy() in find_link()
Uros Bizjak (2):
      fs: Use try_cmpxchg() in start_dir_add()
      fs: Use try_cmpxchg() in sb_init_done_wq()
Xichao Zhao (2):
      fs: fix "writen"->"written"
      fs: Replace offsetof() with struct_size() in ioctl_file_dedupe_range()
 Documentation/admin-guide/kernel-parameters.txt |   3 +
 Documentation/filesystems/porting.rst           |   4 +-
 Documentation/filesystems/proc.rst              |   8 +
 Documentation/filesystems/vfs.rst               |   4 +-
 block/bdev.c                                    |   2 +-
 drivers/dax/super.c                             |   2 +-
 drivers/misc/ibmasm/ibmasmfs.c                  |   2 +-
 drivers/usb/gadget/function/f_fs.c              |   2 +-
 drivers/usb/gadget/legacy/inode.c               |   2 +-
 fs/9p/vfs_super.c                               |   2 +-
 fs/afs/inode.c                                  |   4 +-
 fs/btrfs/inode.c                                |   2 +-
 fs/ceph/super.c                                 |   2 +-
 fs/configfs/mount.c                             |   2 +-
 fs/cramfs/inode.c                               |  11 +-
 fs/dcache.c                                     |   4 +-
 fs/debugfs/inode.c                              |  11 +-
 fs/efivarfs/super.c                             |   2 +-
 fs/eventpoll.c                                  | 139 +++-------------
 fs/ext4/super.c                                 |   2 +-
 fs/f2fs/super.c                                 |   2 +-
 fs/fcntl.c                                      |  10 +-
 fs/file.c                                       |   5 +-
 fs/fs-writeback.c                               |   2 +-
 fs/fuse/inode.c                                 |   2 +-
 fs/gfs2/super.c                                 |   2 +-
 fs/hostfs/hostfs_kern.c                         |   2 +-
 fs/inode.c                                      |  30 ++--
 fs/ioctl.c                                      |   5 +-
 fs/kernfs/mount.c                               |   2 +-
 fs/locks.c                                      |   4 +-
 fs/minix/inode.c                                |   8 +-
 fs/namei.c                                      |  22 ++-
 fs/namespace.c                                  | 106 ++++++++----
 fs/nfs/inode.c                                  |   2 +-
 fs/ocfs2/dlmfs/dlmfs.c                          |   2 +-
 fs/orangefs/super.c                             |   2 +-
 fs/overlayfs/super.c                            |   2 +-
 fs/pidfs.c                                      |   2 +-
 fs/pipe.c                                       |   6 +-
 fs/proc/inode.c                                 |   2 +-
 fs/proc/namespaces.c                            |   6 +-
 fs/proc/root.c                                  |  98 ++++++++++-
 fs/pstore/inode.c                               |   2 +-
 fs/ramfs/inode.c                                |   2 +-
 fs/read_write.c                                 |  14 +-
 fs/smb/client/cifsfs.c                          |   2 +-
 fs/super.c                                      |   8 +-
 fs/ubifs/super.c                                |   2 +-
 fs/xfs/xfs_super.c                              |   2 +-
 include/linux/fs.h                              |  10 +-
 include/linux/pid_namespace.h                   |   9 +
 include/trace/events/filelock.h                 |   3 +-
 include/uapi/linux/fs.h                         |   5 +-
 init/Kconfig                                    |   1 +
 init/do_mounts_rd.c                             |  14 +-
 init/initramfs.c                                |   5 +-
 kernel/bpf/inode.c                              |   2 +-
 kernel/pid.c                                    |   2 +-
 kernel/pid_namespace.c                          |  22 ++-
 mm/shmem.c                                      |   2 +-
 net/socket.c                                    |   3 +
 tools/testing/selftests/proc/.gitignore         |   1 +
 tools/testing/selftests/proc/Makefile           |   1 +
 tools/testing/selftests/proc/proc-pidns.c       | 211 ++++++++++++++++++++++++
 65 files changed, 592 insertions(+), 265 deletions(-)
 create mode 100644 tools/testing/selftests/proc/proc-pidns.c
^ permalink raw reply	[flat|nested] 32+ messages in thread* Re: [GIT PULL 01/12 for v6.18] misc
  2025-09-26 14:18 ` [GIT PULL 01/12 for v6.18] misc Christian Brauner
@ 2025-09-29  9:47   ` Christian Brauner
  2025-09-29 19:31   ` pr-tracker-bot
  1 sibling, 0 replies; 32+ messages in thread
From: Christian Brauner @ 2025-09-29  9:47 UTC (permalink / raw)
  To: Linus Torvalds; +Cc: linux-fsdevel, linux-kernel
[-- Attachment #1: Type: text/plain, Size: 5064 bytes --]
On Fri, Sep 26, 2025 at 04:18:55PM +0200, Christian Brauner wrote:
> Hey Linus,
> 
> /* Summary */
> This contains the usual selections of misc updates for this cycle.
> 
> Features:
> 
> - Add "initramfs_options" parameter to set initramfs mount options. This
>   allows to add specific mount options to the rootfs to e.g., limit the
>   memory size.
> 
> - Add RWF_NOSIGNAL flag for pwritev2()
> 
>   Add RWF_NOSIGNAL flag for pwritev2. This flag prevents the SIGPIPE
>   signal from being raised when writing on disconnected pipes or
>   sockets. The flag is handled directly by the pipe filesystem and
>   converted to the existing MSG_NOSIGNAL flag for sockets.
> 
> - Allow to pass pid namespace as procfs mount option
> 
>   Ever since the introduction of pid namespaces, procfs has had very
>   implicit behaviour surrounding them (the pidns used by a procfs mount
>   is auto-selected based on the mounting process's active pidns, and the
>   pidns itself is basically hidden once the mount has been constructed).
> 
>   This implicit behaviour has historically meant that userspace was
>   required to do some special dances in order to configure the pidns of
>   a procfs mount as desired. Examples include:
> 
>   * In order to bypass the mnt_too_revealing() check, Kubernetes creates
>     a procfs mount from an empty pidns so that user namespaced
>     containers can be nested (without this, the nested containers would
>     fail to mount procfs). But this requires forking off a helper
>     process because you cannot just one-shot this using mount(2).
> 
>   * Container runtimes in general need to fork into a container before
>     configuring its mounts, which can lead to security issues in the
>     case of shared-pidns containers (a privileged process in the pidns
>     can interact with your container runtime process).
>     While SUID_DUMP_DISABLE and user namespaces make this less of an
>     issue, the strict need for this due to a minor uAPI wart is kind of
>     unfortunate.
> 
>     Things would be much easier if there was a way for userspace to just
>     specify the pidns they want. So this pull request contains changes
>     to implement a new "pidns" argument which can be set using
>     fsconfig(2):
> 
>         fsconfig(procfd, FSCONFIG_SET_FD, "pidns", NULL, nsfd);
>         fsconfig(procfd, FSCONFIG_SET_STRING, "pidns", "/proc/self/ns/pid", 0);
> 
>     or classic mount(2) / mount(8):
> 
>         // mount -t proc -o pidns=/proc/self/ns/pid proc /tmp/proc
>         mount("proc", "/tmp/proc", "proc", MS_..., "pidns=/proc/self/ns/pid");
> 
> Cleanups:
> 
> - Remove the last references to EXPORT_OP_ASYNC_LOCK.
> 
> - Make file_remove_privs_flags() static.
> 
> - Remove redundant __GFP_NOWARN when GFP_NOWAIT is used.
> 
> - Use try_cmpxchg() in start_dir_add().
> 
> - Use try_cmpxchg() in sb_init_done_wq().
> 
> - Replace offsetof() with struct_size() in ioctl_file_dedupe_range().
> 
> - Remove vfs_ioctl() export.
> 
> - Replace rwlock() with spinlock in epoll code as rwlock causes priority
>   inversion on preempt rt kernels.
> 
> - Make ns_entries in fs/proc/namespaces const.
> 
> - Use a switch() statement() in init_special_inode() just like we do in
>   may_open().
> 
> - Use struct_size() in dir_add() in the initramfs code.
> 
> - Use str_plural() in rd_load_image().
> 
> - Replace strcpy() with strscpy() in find_link().
> 
> - Rename generic_delete_inode() to inode_just_drop() and
>   generic_drop_inode() to inode_generic_drop().
> 
> - Remove unused arguments from fcntl_{g,s}et_rw_hint().
> 
> Fixes:
> 
> - Document @name parameter for name_contains_dotdot() helper.
> 
> - Fix spelling mistake.
> 
> - Always return zero from replace_fd() instead of the file descriptor number.
> 
> - Limit the size for copy_file_range() in compat mode to prevent a signed
>   overflow.
> 
> - Fix debugfs mount options not being applied.
> 
> - Verify the inode mode when loading it from disk in minixfs.
> 
> - Verify the inode mode when loading it from disk in cramfs.
> 
> - Don't trigger automounts with RESOLVE_NO_XDEV
> 
>   If openat2() was called with RESOLVE_NO_XDEV it didn't traverse
>   through automounts, but could still trigger them.
> 
> - Add FL_RECLAIM flag to show_fl_flags() macro so it appears in tracepoints.
> 
> - Fix unused variable warning in rd_load_image() on s390.
> 
> - Make INITRAMFS_PRESERVE_MTIME depend on BLK_DEV_INITRD.
> 
> - Use ns_capable_noaudit() when determining net sysctl permissions.
> 
> - Don't call path_put() under namespace semaphore in listmount() and statmount().
> 
> /* 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 */
There is one issue that was reported after I had generated the pull
request. The mnt_ns_release() function can be passed a NULL pointer and
that case needs to be handled.
I'm appending a patch that I would ask you to please just apply on top
of it. If you rather want me resend the pull request please just tell
me!
[-- Attachment #2: 0001-mount-handle-NULL-values-in-mnt_ns_release.patch --]
[-- Type: text/x-diff, Size: 933 bytes --]
From 9f11a1a5cab7e70bdb31077e475ab15d86d03682 Mon Sep 17 00:00:00 2001
From: Christian Brauner <brauner@kernel.org>
Date: Mon, 29 Sep 2025 11:41:16 +0200
Subject: [PATCH] mount: handle NULL values in mnt_ns_release()
When calling in listmount() mnt_ns_release() may be passed a NULL
pointer. Handle that case gracefully.
Signed-off-by: Christian Brauner <brauner@kernel.org>
---
 fs/namespace.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fs/namespace.c b/fs/namespace.c
index 6686c9f54b40..8db446cd7f4a 100644
--- a/fs/namespace.c
+++ b/fs/namespace.c
@@ -180,7 +180,7 @@ static void mnt_ns_tree_add(struct mnt_namespace *ns)
 static void mnt_ns_release(struct mnt_namespace *ns)
 {
 	/* keep alive for {list,stat}mount() */
-	if (refcount_dec_and_test(&ns->passive)) {
+	if (ns && refcount_dec_and_test(&ns->passive)) {
 		fsnotify_mntns_delete(ns);
 		put_user_ns(ns->user_ns);
 		kfree(ns);
-- 
2.47.3
^ permalink raw reply related	[flat|nested] 32+ messages in thread* Re: [GIT PULL 01/12 for v6.18] misc
  2025-09-26 14:18 ` [GIT PULL 01/12 for v6.18] misc Christian Brauner
  2025-09-29  9:47   ` Christian Brauner
@ 2025-09-29 19:31   ` pr-tracker-bot
  1 sibling, 0 replies; 32+ messages in thread
From: pr-tracker-bot @ 2025-09-29 19:31 UTC (permalink / raw)
  To: Christian Brauner
  Cc: Linus Torvalds, Christian Brauner, linux-fsdevel, linux-kernel
The pull request you sent on Fri, 26 Sep 2025 16:18:55 +0200:
> git@gitolite.kernel.org:pub/scm/linux/kernel/git/vfs/vfs tags/vfs-6.18-rc1.misc
has been merged into torvalds/linux.git:
https://git.kernel.org/torvalds/c/b7ce6fa90fd9554482847b19756a06232c1dc78c
Thank you!
-- 
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/prtracker.html
^ permalink raw reply	[flat|nested] 32+ messages in thread
* [GIT PULL 02/12 for v6.18] mount
  2025-09-26 14:18 [GIT PULL 00/12 for v6.18] vfs 6.18 Christian Brauner
  2025-09-26 14:18 ` [GIT PULL 01/12 for v6.18] misc Christian Brauner
@ 2025-09-26 14:18 ` Christian Brauner
  2025-09-29 19:31   ` pr-tracker-bot
  2025-09-26 14:18 ` [GIT PULL 03/12 for v6.18] inode Christian Brauner
                   ` (9 subsequent siblings)
  11 siblings, 1 reply; 32+ messages in thread
From: Christian Brauner @ 2025-09-26 14:18 UTC (permalink / raw)
  To: Linus Torvalds; +Cc: Christian Brauner, linux-fsdevel, linux-kernel
Hey Linus,
/* Summary */
This contains some work around mount api handling:
* Output the warning message for mnt_too_revealing() triggered during
  fsmount() to the fscontext log. This makes it possible for the mount
  tool to output appropriate warnings on the command line. For example,
  with the newest fsopen()-based mount(8) from util-linux, the error
  messages now look like:
  # mount -t proc proc /tmp
  mount: /tmp: fsmount() failed: VFS: Mount too revealing.
         dmesg(1) may have more information after failed mount system call.
* Do not consume fscontext log entries when returning -EMSGSIZE
  Userspace generally expects APIs that return -EMSGSIZE to allow for
  them to adjust their buffer size and retry the operation. However, the
  fscontext log would previously clear the message even in the -EMSGSIZE
  case.
  Given that it is very cheap for us to check whether the buffer is too
  small before we remove the message from the ring buffer, let's just do
  that instead.
* Drop an unused argument from do_remount().
/* 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
================================
[1] https://lore.kernel.org/linux-next/aNO0BKAXphoFEgUk@finisterre.sirena.org.uk
The following changes since commit 8f5ae30d69d7543eee0d70083daf4de8fe15d585:
  Linux 6.17-rc1 (2025-08-10 19:41:16 +0300)
are available in the Git repository at:
  git@gitolite.kernel.org:pub/scm/linux/kernel/git/vfs/vfs tags/vfs-6.18-rc1.mount
for you to fetch changes up to 1e5f0fb41fccf5ecbb5506551790335c9578e320:
  vfs: fs/namespace.c: remove ms_flags argument from do_remount (2025-08-11 16:08:31 +0200)
Please consider pulling these changes from the signed vfs-6.18-rc1.mount tag.
Thanks!
Christian
----------------------------------------------------------------
vfs-6.18-rc1.mount
----------------------------------------------------------------
Aleksa Sarai (4):
      fscontext: add custom-prefix log helpers
      vfs: output mount_too_revealing() errors to fscontext
      fscontext: do not consume log entries when returning -EMSGSIZE
      selftests/filesystems: add basic fscontext log tests
Askar Safin (1):
      vfs: fs/namespace.c: remove ms_flags argument from do_remount
Christian Brauner (3):
      Merge patch series "fs: Remove old mount API helpers"
      Merge patch series "vfs: output mount_too_revealing() errors to fscontext"
      Merge patch series "fscontext: do not consume log entries when returning -EMSGSIZE"
Pedro Falcato (3):
      fs: Remove mount_nodev
      fs: Remove mount_bdev
      docs/vfs: Remove mentions to the old mount API helpers
 Documentation/filesystems/vfs.rst              |  27 +----
 fs/fsopen.c                                    |  70 +++++++------
 fs/namespace.c                                 |  10 +-
 fs/super.c                                     |  63 ------------
 include/linux/fs.h                             |   6 --
 include/linux/fs_context.h                     |  18 +++-
 tools/testing/selftests/filesystems/.gitignore |   1 +
 tools/testing/selftests/filesystems/Makefile   |   2 +-
 tools/testing/selftests/filesystems/fclog.c    | 130 +++++++++++++++++++++++++
 9 files changed, 192 insertions(+), 135 deletions(-)
 create mode 100644 tools/testing/selftests/filesystems/fclog.c
^ permalink raw reply	[flat|nested] 32+ messages in thread* [GIT PULL 03/12 for v6.18] inode
  2025-09-26 14:18 [GIT PULL 00/12 for v6.18] vfs 6.18 Christian Brauner
  2025-09-26 14:18 ` [GIT PULL 01/12 for v6.18] misc Christian Brauner
  2025-09-26 14:18 ` [GIT PULL 02/12 for v6.18] mount Christian Brauner
@ 2025-09-26 14:18 ` Christian Brauner
  2025-09-29 19:31   ` pr-tracker-bot
  2025-09-26 14:18 ` [GIT PULL 04/12 for v6.18] iomap Christian Brauner
                   ` (8 subsequent siblings)
  11 siblings, 1 reply; 32+ messages in thread
From: Christian Brauner @ 2025-09-26 14:18 UTC (permalink / raw)
  To: Linus Torvalds; +Cc: Christian Brauner, linux-fsdevel, linux-kernel
Hey Linus,
/* Summary */
This contains a series I originally wrote and that Eric brought over the
finish line. It moves out the i_crypt_info and i_verity_info pointers
out of 'struct inode' and into the fs-specific part of the inode.
So now the few filesytems that actually make use of this pay the price
in their own private inode storage instead of forcing it upon every user
of struct inode.
The pointer for the crypt and verity info is simply found by storing an
offset to its address in struct fsverity_operations and struct
fscrypt_operations. This shrinks struct inode by 16 bytes.
I hope to move a lot more out of it in the future so that struct inode
becomes really just about very core stuff that we need, much like struct
dentry and struct file, instead of the dumping ground it has become over
the years.
On top of this are a various changes associated with the ongoing inode
lifetime handling rework that multiple people are pushing forward:
* Stop accessing inode->i_count directly in f2fs and gfs2. They simply
  should use the __iget() and iput() helpers.
* Make the i_state flags an enum.
* Rework the iput() logic
  Currently, if we are the last iput, and we have the I_DIRTY_TIME bit
  set, we will grab a reference on the inode again and then mark it
  dirty and then redo the put.  This is to make sure we delay the time
  update for as long as possible.
  We can rework this logic to simply dec i_count if it is not 1, and if
  it is do the time update while still holding the i_count reference.
  Then we can replace the atomic_dec_and_lock with locking the ->i_lock
  and doing atomic_dec_and_test, since we did the atomic_add_unless
  above.
* Add an icount_read() helper and convert everyone that accesses
  inode->i_count directly for this purpose to use the helper.
* Expand dump_inode() to dump more information about an inode helping in
  debugging.
* Add some might_sleep() annotations to iput() and associated helpers.
/* 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
================================
[1] This will have a merge conflict with the vfs-6.18-rc1.misc pull request.
    The conflict resolution is to simply use exactly what the tag here
    brings in.
The following changes since commit 8f5ae30d69d7543eee0d70083daf4de8fe15d585:
  Linux 6.17-rc1 (2025-08-10 19:41:16 +0300)
are available in the Git repository at:
  git@gitolite.kernel.org:pub/scm/linux/kernel/git/vfs/vfs tags/vfs-6.18-rc1.inode
for you to fetch changes up to c3c616c53dbabddf32a0485bd133d8d3b9f6656a:
  Merge branch 'vfs-6.18.inode.refcount.preliminaries' (2025-09-19 16:46:02 +0200)
Please consider pulling these changes from the signed vfs-6.18-rc1.inode tag.
Thanks!
Christian
----------------------------------------------------------------
vfs-6.18-rc1.inode
----------------------------------------------------------------
Christian Brauner (3):
      Merge patch series "Move fscrypt and fsverity info out of struct inode"
      inode: fix whitespace issues
      Merge branch 'vfs-6.18.inode.refcount.preliminaries'
Eric Biggers (13):
      fscrypt: replace raw loads of info pointer with helper function
      fscrypt: add support for info in fs-specific part of inode
      ext4: move crypt info pointer to fs-specific part of inode
      f2fs: move crypt info pointer to fs-specific part of inode
      ubifs: move crypt info pointer to fs-specific part of inode
      ceph: move crypt info pointer to fs-specific part of inode
      fs: remove inode::i_crypt_info
      fsverity: add support for info in fs-specific part of inode
      ext4: move verity info pointer to fs-specific part of inode
      f2fs: move verity info pointer to fs-specific part of inode
      btrfs: move verity info pointer to fs-specific part of inode
      fs: remove inode::i_verity_info
      fsverity: check IS_VERITY() in fsverity_cleanup_inode()
Josef Bacik (4):
      fs: stop accessing ->i_count directly in f2fs and gfs2
      fs: make the i_state flags an enum
      fs: rework iput logic
      fs: add an icount_read helper
Mateusz Guzik (1):
      fs: expand dump_inode()
Max Kellermann (1):
      fs: add might_sleep() annotation to iput() and more
 arch/powerpc/platforms/cell/spufs/file.c |   2 +-
 fs/btrfs/btrfs_inode.h                   |   5 +
 fs/btrfs/inode.c                         |   5 +-
 fs/btrfs/verity.c                        |   2 +
 fs/ceph/crypto.c                         |   2 +
 fs/ceph/inode.c                          |   1 +
 fs/ceph/mds_client.c                     |   2 +-
 fs/ceph/super.h                          |   1 +
 fs/crypto/bio.c                          |   2 +-
 fs/crypto/crypto.c                       |  14 +-
 fs/crypto/fname.c                        |  11 +-
 fs/crypto/fscrypt_private.h              |   4 +-
 fs/crypto/hooks.c                        |   2 +-
 fs/crypto/inline_crypt.c                 |  12 +-
 fs/crypto/keysetup.c                     |  43 +++---
 fs/crypto/policy.c                       |   7 +-
 fs/ext4/crypto.c                         |   2 +
 fs/ext4/ext4.h                           |   8 +
 fs/ext4/ialloc.c                         |   4 +-
 fs/ext4/super.c                          |   6 +
 fs/ext4/verity.c                         |   2 +
 fs/f2fs/f2fs.h                           |   6 +
 fs/f2fs/super.c                          |  14 +-
 fs/f2fs/verity.c                         |   2 +
 fs/fs-writeback.c                        |   2 +-
 fs/gfs2/ops_fstype.c                     |   2 +-
 fs/hpfs/inode.c                          |   2 +-
 fs/inode.c                               |  90 ++++++++---
 fs/nfs/inode.c                           |   4 +-
 fs/notify/fsnotify.c                     |   2 +-
 fs/smb/client/inode.c                    |   2 +-
 fs/ubifs/crypto.c                        |   2 +
 fs/ubifs/super.c                         |   2 +-
 fs/ubifs/ubifs.h                         |   4 +
 fs/verity/enable.c                       |   6 +-
 fs/verity/fsverity_private.h             |   9 +-
 fs/verity/open.c                         |  23 +--
 fs/verity/verify.c                       |   2 +-
 fs/xfs/xfs_inode.c                       |   2 +-
 fs/xfs/xfs_trace.h                       |   2 +-
 include/linux/fs.h                       | 246 ++++++++++++++++---------------
 include/linux/fscrypt.h                  |  40 ++++-
 include/linux/fsverity.h                 |  57 +++++--
 include/trace/events/filelock.h          |   2 +-
 security/landlock/fs.c                   |   2 +-
 45 files changed, 428 insertions(+), 234 deletions(-)
^ permalink raw reply	[flat|nested] 32+ messages in thread* [GIT PULL 04/12 for v6.18] iomap
  2025-09-26 14:18 [GIT PULL 00/12 for v6.18] vfs 6.18 Christian Brauner
                   ` (2 preceding siblings ...)
  2025-09-26 14:18 ` [GIT PULL 03/12 for v6.18] inode Christian Brauner
@ 2025-09-26 14:18 ` Christian Brauner
  2025-09-29 19:31   ` pr-tracker-bot
  2025-09-26 14:18 ` [GIT PULL 05/12 for v6.18] pidfs Christian Brauner
                   ` (7 subsequent siblings)
  11 siblings, 1 reply; 32+ messages in thread
From: Christian Brauner @ 2025-09-26 14:18 UTC (permalink / raw)
  To: Linus Torvalds; +Cc: Christian Brauner, linux-fsdevel, linux-kernel
Hey Linus,
/* Summary */
This contains minor fixes and cleanups to the iomap code.
Nothing really stands out here.
/* 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
================================
No known conflicts.
The following changes since commit 8f5ae30d69d7543eee0d70083daf4de8fe15d585:
  Linux 6.17-rc1 (2025-08-10 19:41:16 +0300)
are available in the Git repository at:
  git@gitolite.kernel.org:pub/scm/linux/kernel/git/vfs/vfs tags/vfs-6.18-rc1.iomap
for you to fetch changes up to c59c965292f75e39cc4cfefb50d56d4b1900812e:
  Merge patch series "iomap: cleanups ahead of adding fuse support" (2025-09-19 14:17:16 +0200)
Please consider pulling these changes from the signed vfs-6.18-rc1.iomap tag.
Thanks!
Christian
----------------------------------------------------------------
vfs-6.18-rc1.iomap
----------------------------------------------------------------
Christian Brauner (1):
      Merge patch series "iomap: cleanups ahead of adding fuse support"
Darrick J. Wong (2):
      iomap: trace iomap_zero_iter zeroing activities
      iomap: error out on file IO when there is no inline_data buffer
 fs/iomap/buffered-io.c | 18 +++++++++++++-----
 fs/iomap/direct-io.c   |  3 +++
 fs/iomap/trace.h       |  1 +
 3 files changed, 17 insertions(+), 5 deletions(-)
^ permalink raw reply	[flat|nested] 32+ messages in thread* [GIT PULL 05/12 for v6.18] pidfs
  2025-09-26 14:18 [GIT PULL 00/12 for v6.18] vfs 6.18 Christian Brauner
                   ` (3 preceding siblings ...)
  2025-09-26 14:18 ` [GIT PULL 04/12 for v6.18] iomap Christian Brauner
@ 2025-09-26 14:18 ` Christian Brauner
  2025-09-29 19:31   ` pr-tracker-bot
  2025-10-01 14:18   ` Oleg Nesterov
  2025-09-26 14:19 ` [GIT PULL 06/12 for v6.18] rust Christian Brauner
                   ` (6 subsequent siblings)
  11 siblings, 2 replies; 32+ messages in thread
From: Christian Brauner @ 2025-09-26 14:18 UTC (permalink / raw)
  To: Linus Torvalds; +Cc: Christian Brauner, linux-fsdevel, linux-kernel
Hey Linus,
/* Summary */
This just contains a few changes to pid_nr_ns() to make it more robust
and cleanups or improves a few users that ab- or misuse it currently.
/* 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
================================
No known conflicts.
The following changes since commit 8f5ae30d69d7543eee0d70083daf4de8fe15d585:
  Linux 6.17-rc1 (2025-08-10 19:41:16 +0300)
are available in the Git repository at:
  git@gitolite.kernel.org:pub/scm/linux/kernel/git/vfs/vfs tags/vfs-6.18-rc1.pidfs
for you to fetch changes up to da664c6db895f70c2be8c3dd371c273b6f8b920f:
  Merge patch series "Improve pid_nr_ns()" (2025-08-19 13:38:26 +0200)
Please consider pulling these changes from the signed vfs-6.18-rc1.pidfs tag.
Thanks!
Christian
----------------------------------------------------------------
vfs-6.18-rc1.pidfs
----------------------------------------------------------------
Christian Brauner (1):
      Merge patch series "Improve pid_nr_ns()"
Oleg Nesterov (3):
      pid: make __task_pid_nr_ns(ns => NULL) safe for zombie callers
      pid: change bacct_add_tsk() to use task_ppid_nr_ns()
      pid: change task_state() to use task_ppid_nr_ns()
gaoxiang17 (1):
      pid: Add a judgment for ns null in pid_nr_ns
 fs/proc/array.c | 4 +---
 kernel/pid.c    | 5 +++--
 kernel/tsacct.c | 3 +--
 3 files changed, 5 insertions(+), 7 deletions(-)
^ permalink raw reply	[flat|nested] 32+ messages in thread* Re: [GIT PULL 05/12 for v6.18] pidfs
  2025-09-26 14:18 ` [GIT PULL 05/12 for v6.18] pidfs Christian Brauner
@ 2025-09-29 19:31   ` pr-tracker-bot
  2025-10-01 14:18   ` Oleg Nesterov
  1 sibling, 0 replies; 32+ messages in thread
From: pr-tracker-bot @ 2025-09-29 19:31 UTC (permalink / raw)
  To: Christian Brauner
  Cc: Linus Torvalds, Christian Brauner, linux-fsdevel, linux-kernel
The pull request you sent on Fri, 26 Sep 2025 16:18:59 +0200:
> git@gitolite.kernel.org:pub/scm/linux/kernel/git/vfs/vfs tags/vfs-6.18-rc1.pidfs
has been merged into torvalds/linux.git:
https://git.kernel.org/torvalds/c/e571372101522fa91735dac6d30a160b2abe600c
Thank you!
-- 
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/prtracker.html
^ permalink raw reply	[flat|nested] 32+ messages in thread
* Re: [GIT PULL 05/12 for v6.18] pidfs
  2025-09-26 14:18 ` [GIT PULL 05/12 for v6.18] pidfs Christian Brauner
  2025-09-29 19:31   ` pr-tracker-bot
@ 2025-10-01 14:18   ` Oleg Nesterov
  2025-10-06 13:48     ` Christian Brauner
  1 sibling, 1 reply; 32+ messages in thread
From: Oleg Nesterov @ 2025-10-01 14:18 UTC (permalink / raw)
  To: Christian Brauner
  Cc: Linus Torvalds, linux-fsdevel, linux-kernel, Mateusz Guzik
On 09/26, Christian Brauner wrote:
>
> Oleg Nesterov (3):
>       pid: make __task_pid_nr_ns(ns => NULL) safe for zombie callers
...
> gaoxiang17 (1):
>       pid: Add a judgment for ns null in pid_nr_ns
Oh... I already tried to complain twice
	https://lore.kernel.org/all/20250819142557.GA11345@redhat.com/
	https://lore.kernel.org/all/20250901153054.GA5587@redhat.com/
One of these patches should be reverted. It doesn't really hurt, but it makes
no sense to check ns != NULL twice.
Oleg.
^ permalink raw reply	[flat|nested] 32+ messages in thread
* Re: [GIT PULL 05/12 for v6.18] pidfs
  2025-10-01 14:18   ` Oleg Nesterov
@ 2025-10-06 13:48     ` Christian Brauner
  2025-10-07 14:34       ` Oleg Nesterov
  0 siblings, 1 reply; 32+ messages in thread
From: Christian Brauner @ 2025-10-06 13:48 UTC (permalink / raw)
  To: Oleg Nesterov; +Cc: Linus Torvalds, linux-fsdevel, linux-kernel, Mateusz Guzik
On Wed, Oct 01, 2025 at 04:18:12PM +0200, Oleg Nesterov wrote:
> On 09/26, Christian Brauner wrote:
> >
> > Oleg Nesterov (3):
> >       pid: make __task_pid_nr_ns(ns => NULL) safe for zombie callers
> ...
> > gaoxiang17 (1):
> >       pid: Add a judgment for ns null in pid_nr_ns
> 
> Oh... I already tried to complain twice
> 
> 	https://lore.kernel.org/all/20250819142557.GA11345@redhat.com/
> 	https://lore.kernel.org/all/20250901153054.GA5587@redhat.com/
> 
> One of these patches should be reverted. It doesn't really hurt, but it makes
> no sense to check ns != NULL twice.
Sorry, those somehow got lost.
Do you mind sending me a revert?
^ permalink raw reply	[flat|nested] 32+ messages in thread
* Re: [GIT PULL 05/12 for v6.18] pidfs
  2025-10-06 13:48     ` Christian Brauner
@ 2025-10-07 14:34       ` Oleg Nesterov
  2025-10-10 11:00         ` Christian Brauner
  0 siblings, 1 reply; 32+ messages in thread
From: Oleg Nesterov @ 2025-10-07 14:34 UTC (permalink / raw)
  To: Christian Brauner
  Cc: Linus Torvalds, linux-fsdevel, linux-kernel, Mateusz Guzik
On 10/06, Christian Brauner wrote:
>
> On Wed, Oct 01, 2025 at 04:18:12PM +0200, Oleg Nesterov wrote:
> > On 09/26, Christian Brauner wrote:
> > >
> > > Oleg Nesterov (3):
> > >       pid: make __task_pid_nr_ns(ns => NULL) safe for zombie callers
> > ...
> > > gaoxiang17 (1):
> > >       pid: Add a judgment for ns null in pid_nr_ns
> >
> > Oh... I already tried to complain twice
> >
> > 	https://lore.kernel.org/all/20250819142557.GA11345@redhat.com/
> > 	https://lore.kernel.org/all/20250901153054.GA5587@redhat.com/
> >
> > One of these patches should be reverted. It doesn't really hurt, but it makes
> > no sense to check ns != NULL twice.
>
> Sorry, those somehow got lost.
> Do you mind sending me a revert?
Thanks, will do.
But which one? I am biased, but I'd prefer to revert 006568ab4c5ca2309ceb36
("pid: Add a judgment for ns null in pid_nr_ns")
Mostly because abdfd4948e45c51b1916 ("pid: make __task_pid_nr_ns(ns => NULL)
safe for zombie callers") tries to explain why this change makes sense and
why it is not easy to avoid ns == NULL.
OK?
Oleg.
^ permalink raw reply	[flat|nested] 32+ messages in thread* Re: [GIT PULL 05/12 for v6.18] pidfs
  2025-10-07 14:34       ` Oleg Nesterov
@ 2025-10-10 11:00         ` Christian Brauner
  0 siblings, 0 replies; 32+ messages in thread
From: Christian Brauner @ 2025-10-10 11:00 UTC (permalink / raw)
  To: Oleg Nesterov; +Cc: Linus Torvalds, linux-fsdevel, linux-kernel, Mateusz Guzik
On Tue, Oct 07, 2025 at 04:34:19PM +0200, Oleg Nesterov wrote:
> On 10/06, Christian Brauner wrote:
> >
> > On Wed, Oct 01, 2025 at 04:18:12PM +0200, Oleg Nesterov wrote:
> > > On 09/26, Christian Brauner wrote:
> > > >
> > > > Oleg Nesterov (3):
> > > >       pid: make __task_pid_nr_ns(ns => NULL) safe for zombie callers
> > > ...
> > > > gaoxiang17 (1):
> > > >       pid: Add a judgment for ns null in pid_nr_ns
> > >
> > > Oh... I already tried to complain twice
> > >
> > > 	https://lore.kernel.org/all/20250819142557.GA11345@redhat.com/
> > > 	https://lore.kernel.org/all/20250901153054.GA5587@redhat.com/
> > >
> > > One of these patches should be reverted. It doesn't really hurt, but it makes
> > > no sense to check ns != NULL twice.
> >
> > Sorry, those somehow got lost.
> > Do you mind sending me a revert?
> 
> Thanks, will do.
> 
> But which one? I am biased, but I'd prefer to revert 006568ab4c5ca2309ceb36
> ("pid: Add a judgment for ns null in pid_nr_ns")
> 
> Mostly because abdfd4948e45c51b1916 ("pid: make __task_pid_nr_ns(ns => NULL)
> safe for zombie callers") tries to explain why this change makes sense and
> why it is not easy to avoid ns == NULL.
> 
> OK?
Yes, sounds perfect. Thank you!
^ permalink raw reply	[flat|nested] 32+ messages in thread
* [GIT PULL 06/12 for v6.18] rust
  2025-09-26 14:18 [GIT PULL 00/12 for v6.18] vfs 6.18 Christian Brauner
                   ` (4 preceding siblings ...)
  2025-09-26 14:18 ` [GIT PULL 05/12 for v6.18] pidfs Christian Brauner
@ 2025-09-26 14:19 ` Christian Brauner
  2025-09-29 19:31   ` pr-tracker-bot
  2025-09-26 14:19 ` [GIT PULL 07/12 for v6.18] workqueue Christian Brauner
                   ` (5 subsequent siblings)
  11 siblings, 1 reply; 32+ messages in thread
From: Christian Brauner @ 2025-09-26 14:19 UTC (permalink / raw)
  To: Linus Torvalds; +Cc: Christian Brauner, linux-fsdevel, linux-kernel
Hey Linus,
/* Summary */
This contains a few minor vfs rust changes:
* Add the pid namespace Rust wrappers to the correct MAINTAINERS entry.
* Use to_result() in the Rust file error handling code.
* Update imports for fs and pid_namespce Rust wrappers.
/* 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
================================
No known conflicts.
The following changes since commit 8f5ae30d69d7543eee0d70083daf4de8fe15d585:
  Linux 6.17-rc1 (2025-08-10 19:41:16 +0300)
are available in the Git repository at:
  git@gitolite.kernel.org:pub/scm/linux/kernel/git/vfs/vfs tags/vfs-6.18-rc1.rust
for you to fetch changes up to c37adf34a5dc511e017b5a3bab15fe3171269e46:
  rust: file: use to_result for error handling (2025-09-01 13:55:22 +0200)
Please consider pulling these changes from the signed vfs-6.18-rc1.rust tag.
Thanks!
Christian
----------------------------------------------------------------
vfs-6.18-rc1.rust
----------------------------------------------------------------
Alice Ryhl (1):
      pid: add Rust files to MAINTAINERS
Onur Özkan (1):
      rust: file: use to_result for error handling
Shankari Anand (2):
      rust: pid_namespace: update AlwaysRefCounted imports from sync::aref
      rust: fs: update ARef and AlwaysRefCounted imports from sync::aref
 MAINTAINERS                  |  1 +
 rust/kernel/fs/file.rs       | 10 +++++-----
 rust/kernel/pid_namespace.rs |  5 +----
 3 files changed, 7 insertions(+), 9 deletions(-)
^ permalink raw reply	[flat|nested] 32+ messages in thread* [GIT PULL 07/12 for v6.18] workqueue
  2025-09-26 14:18 [GIT PULL 00/12 for v6.18] vfs 6.18 Christian Brauner
                   ` (5 preceding siblings ...)
  2025-09-26 14:19 ` [GIT PULL 06/12 for v6.18] rust Christian Brauner
@ 2025-09-26 14:19 ` Christian Brauner
  2025-09-29 19:31   ` pr-tracker-bot
  2025-09-26 14:19 ` [GIT PULL 08/12 for v6.18] core kernel Christian Brauner
                   ` (4 subsequent siblings)
  11 siblings, 1 reply; 32+ messages in thread
From: Christian Brauner @ 2025-09-26 14:19 UTC (permalink / raw)
  To: Linus Torvalds; +Cc: Christian Brauner, linux-fsdevel, linux-kernel
Hey Linus,
/* Summary */
This contains various workqueue changes affecting the filesystem layer.
Currently if a user enqueue a work item using schedule_delayed_work()
the used wq is "system_wq" (per-cpu wq) while queue_delayed_work() use
WORK_CPU_UNBOUND (used when a cpu is not specified). The same applies to
schedule_work() that is using system_wq and queue_work(), that makes use
again of WORK_CPU_UNBOUND.
This replaces the use of system_wq and system_unbound_wq. system_wq is a
per-CPU workqueue which isn't very obvious from the name and
system_unbound_wq is to be used when locality is not required.
So this renames system_wq to system_percpu_wq, and system_unbound_wq to
system_dfl_wq.
This also adds a new WQ_PERCPU flag to allow the fs subsystem users to
explicitly request the use of per-CPU behavior. Both WQ_UNBOUND and
WQ_PERCPU flags coexist for one release cycle to allow callers to
transition their calls. WQ_UNBOUND will be removed in a next release
cycle.
/* 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
================================
[1] https://lore.kernel.org/linux-next/aNEKzrMMxLAVHGIn@finisterre.sirena.org.uk
    This will have a merge conflict with changes in the quota tree.
    Steven's proposed resolution is correct.
No known conflicts.
The following changes since commit 8f5ae30d69d7543eee0d70083daf4de8fe15d585:
  Linux 6.17-rc1 (2025-08-10 19:41:16 +0300)
are available in the Git repository at:
  git@gitolite.kernel.org:pub/scm/linux/kernel/git/vfs/vfs tags/vfs-6.18-rc1.workqueue
for you to fetch changes up to 56ce6c8b11a95c65764e27cb6021b1e98ccc4212:
  Merge patch series "fs: replace wq users and add WQ_PERCPU to alloc_workqueue() users" (2025-09-19 16:15:12 +0200)
Please consider pulling these changes from the signed vfs-6.18-rc1.workqueue tag.
Thanks!
Christian
----------------------------------------------------------------
vfs-6.18-rc1.workqueue
----------------------------------------------------------------
Christian Brauner (1):
      Merge patch series "fs: replace wq users and add WQ_PERCPU to alloc_workqueue() users"
Marco Crivellari (3):
      fs: replace use of system_unbound_wq with system_dfl_wq
      fs: replace use of system_wq with system_percpu_wq
      fs: WQ_PERCPU added to alloc_workqueue users
 fs/afs/callback.c                |  4 ++--
 fs/afs/main.c                    |  4 ++--
 fs/afs/write.c                   |  2 +-
 fs/aio.c                         |  2 +-
 fs/bcachefs/btree_write_buffer.c |  2 +-
 fs/bcachefs/io_read.c            |  8 ++++----
 fs/bcachefs/journal_io.c         |  2 +-
 fs/bcachefs/super.c              | 10 +++++-----
 fs/btrfs/block-group.c           |  2 +-
 fs/btrfs/disk-io.c               |  2 +-
 fs/btrfs/extent_map.c            |  2 +-
 fs/btrfs/space-info.c            |  4 ++--
 fs/btrfs/zoned.c                 |  2 +-
 fs/ceph/super.c                  |  2 +-
 fs/coredump.c                    |  2 +-
 fs/dlm/lowcomms.c                |  2 +-
 fs/dlm/main.c                    |  2 +-
 fs/ext4/mballoc.c                |  2 +-
 fs/fs-writeback.c                |  4 ++--
 fs/fuse/dev.c                    |  2 +-
 fs/fuse/inode.c                  |  2 +-
 fs/gfs2/main.c                   |  5 +++--
 fs/gfs2/ops_fstype.c             |  6 ++++--
 fs/netfs/misc.c                  |  2 +-
 fs/netfs/objects.c               |  2 +-
 fs/nfs/namespace.c               |  2 +-
 fs/nfs/nfs4renewd.c              |  2 +-
 fs/nfsd/filecache.c              |  2 +-
 fs/notify/mark.c                 |  4 ++--
 fs/ocfs2/dlm/dlmdomain.c         |  3 ++-
 fs/ocfs2/dlmfs/dlmfs.c           |  3 ++-
 fs/quota/dquot.c                 |  2 +-
 fs/smb/client/cifsfs.c           | 16 +++++++++++-----
 fs/smb/server/ksmbd_work.c       |  2 +-
 fs/smb/server/transport_rdma.c   |  3 ++-
 fs/super.c                       |  3 ++-
 fs/verity/verify.c               |  2 +-
 fs/xfs/xfs_log.c                 |  3 +--
 fs/xfs/xfs_mru_cache.c           |  3 ++-
 fs/xfs/xfs_super.c               | 15 ++++++++-------
 40 files changed, 79 insertions(+), 65 deletions(-)
^ permalink raw reply	[flat|nested] 32+ messages in thread* [GIT PULL 08/12 for v6.18] core kernel
  2025-09-26 14:18 [GIT PULL 00/12 for v6.18] vfs 6.18 Christian Brauner
                   ` (6 preceding siblings ...)
  2025-09-26 14:19 ` [GIT PULL 07/12 for v6.18] workqueue Christian Brauner
@ 2025-09-26 14:19 ` Christian Brauner
  2025-09-27 12:19   ` Sasha Levin
  2025-09-29 19:31   ` pr-tracker-bot
  2025-09-26 14:19 ` [GIT PULL 9/12 for v6.18] afs Christian Brauner
                   ` (3 subsequent siblings)
  11 siblings, 2 replies; 32+ messages in thread
From: Christian Brauner @ 2025-09-26 14:19 UTC (permalink / raw)
  To: Linus Torvalds; +Cc: Christian Brauner, linux-fsdevel, linux-kernel
Hey Linus,
/* Testing */
This contains the changes to enable support for clone3() on nios2 which
apparently is still a thing. The more exciting part of this is that it
cleans up the inconsistency in how the 64-bit flag argument is passed
from copy_process() into the various other copy_*() helpers.
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
================================
No known conflicts.
The following changes since commit 8f5ae30d69d7543eee0d70083daf4de8fe15d585:
  Linux 6.17-rc1 (2025-08-10 19:41:16 +0300)
are available in the Git repository at:
  git@gitolite.kernel.org:pub/scm/linux/kernel/git/vfs/vfs tags/kernel-6.18-rc1.clone3
for you to fetch changes up to 76cea30ad520238160bf8f5e2f2803fcd7a08d22:
  Merge patch series "nios2: Add architecture support for clone3" (2025-09-01 15:31:40 +0200)
Please consider pulling these changes from the signed kernel-6.18-rc1.clone3 tag.
Thanks!
Christian
----------------------------------------------------------------
kernel-6.18-rc1.clone3
----------------------------------------------------------------
Christian Brauner (1):
      Merge patch series "nios2: Add architecture support for clone3"
Simon Schuster (4):
      copy_sighand: Handle architectures where sizeof(unsigned long) < sizeof(u64)
      copy_process: pass clone_flags as u64 across calltree
      arch: copy_thread: pass clone_flags as u64
      nios2: implement architecture-specific portion of sys_clone3
 arch/alpha/kernel/process.c       |  2 +-
 arch/arc/kernel/process.c         |  2 +-
 arch/arm/kernel/process.c         |  2 +-
 arch/arm64/kernel/process.c       |  2 +-
 arch/csky/kernel/process.c        |  2 +-
 arch/hexagon/kernel/process.c     |  2 +-
 arch/loongarch/kernel/process.c   |  2 +-
 arch/m68k/kernel/process.c        |  2 +-
 arch/microblaze/kernel/process.c  |  2 +-
 arch/mips/kernel/process.c        |  2 +-
 arch/nios2/include/asm/syscalls.h |  1 +
 arch/nios2/include/asm/unistd.h   |  2 --
 arch/nios2/kernel/entry.S         |  6 ++++++
 arch/nios2/kernel/process.c       |  2 +-
 arch/nios2/kernel/syscall_table.c |  1 +
 arch/openrisc/kernel/process.c    |  2 +-
 arch/parisc/kernel/process.c      |  2 +-
 arch/powerpc/kernel/process.c     |  2 +-
 arch/riscv/kernel/process.c       |  2 +-
 arch/s390/kernel/process.c        |  2 +-
 arch/sh/kernel/process_32.c       |  2 +-
 arch/sparc/kernel/process_32.c    |  2 +-
 arch/sparc/kernel/process_64.c    |  2 +-
 arch/um/kernel/process.c          |  2 +-
 arch/x86/include/asm/fpu/sched.h  |  2 +-
 arch/x86/include/asm/shstk.h      |  4 ++--
 arch/x86/kernel/fpu/core.c        |  2 +-
 arch/x86/kernel/process.c         |  2 +-
 arch/x86/kernel/shstk.c           |  2 +-
 arch/xtensa/kernel/process.c      |  2 +-
 block/blk-ioc.c                   |  2 +-
 fs/namespace.c                    |  2 +-
 include/linux/cgroup.h            |  4 ++--
 include/linux/cred.h              |  2 +-
 include/linux/iocontext.h         |  6 +++---
 include/linux/ipc_namespace.h     |  4 ++--
 include/linux/lsm_hook_defs.h     |  2 +-
 include/linux/mnt_namespace.h     |  2 +-
 include/linux/nsproxy.h           |  2 +-
 include/linux/pid_namespace.h     |  4 ++--
 include/linux/rseq.h              |  4 ++--
 include/linux/sched/task.h        |  2 +-
 include/linux/security.h          |  4 ++--
 include/linux/sem.h               |  4 ++--
 include/linux/time_namespace.h    |  4 ++--
 include/linux/uprobes.h           |  4 ++--
 include/linux/user_events.h       |  4 ++--
 include/linux/utsname.h           |  4 ++--
 include/net/net_namespace.h       |  4 ++--
 include/trace/events/task.h       |  6 +++---
 ipc/namespace.c                   |  2 +-
 ipc/sem.c                         |  2 +-
 kernel/cgroup/namespace.c         |  2 +-
 kernel/cred.c                     |  2 +-
 kernel/events/uprobes.c           |  2 +-
 kernel/fork.c                     | 10 +++++-----
 kernel/nsproxy.c                  |  4 ++--
 kernel/pid_namespace.c            |  2 +-
 kernel/sched/core.c               |  4 ++--
 kernel/sched/fair.c               |  2 +-
 kernel/sched/sched.h              |  4 ++--
 kernel/time/namespace.c           |  2 +-
 kernel/utsname.c                  |  2 +-
 net/core/net_namespace.c          |  2 +-
 security/apparmor/lsm.c           |  2 +-
 security/security.c               |  2 +-
 security/selinux/hooks.c          |  2 +-
 security/tomoyo/tomoyo.c          |  2 +-
 68 files changed, 95 insertions(+), 89 deletions(-)
^ permalink raw reply	[flat|nested] 32+ messages in thread* Re: [GIT PULL 08/12 for v6.18] core kernel
  2025-09-26 14:19 ` [GIT PULL 08/12 for v6.18] core kernel Christian Brauner
@ 2025-09-27 12:19   ` Sasha Levin
  2025-09-29  9:53     ` Christian Brauner
  2025-09-29 19:31   ` pr-tracker-bot
  1 sibling, 1 reply; 32+ messages in thread
From: Sasha Levin @ 2025-09-27 12:19 UTC (permalink / raw)
  To: Christian Brauner; +Cc: Linus Torvalds, linux-fsdevel, linux-kernel
On Fri, Sep 26, 2025 at 04:19:02PM +0200, Christian Brauner wrote:
>Hey Linus,
>
>/* Testing */
>This contains the changes to enable support for clone3() on nios2 which
>apparently is still a thing. The more exciting part of this is that it
>cleans up the inconsistency in how the 64-bit flag argument is passed
>from copy_process() into the various other copy_*() helpers.
>
>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
>================================
>
>No known conflicts.
>
>The following changes since commit 8f5ae30d69d7543eee0d70083daf4de8fe15d585:
>
>  Linux 6.17-rc1 (2025-08-10 19:41:16 +0300)
>
>are available in the Git repository at:
>
>  git@gitolite.kernel.org:pub/scm/linux/kernel/git/vfs/vfs tags/kernel-6.18-rc1.clone3
Hi Christian,
After pulling this tag, I started seeing a build failure.
a9769a5b9878 ("rv: Add support for LTL monitors") which was merged a few weeks
ago added a usage of task_newtask:
	static void handle_task_newtask(void *data, struct task_struct *task, unsigned long flags)
But commit edd3cb05c00a ("copy_process: pass clone_flags as u64 across
calltree") from this pull request modified the signature without updating rv.
./include/rv/ltl_monitor.h: In function ‘ltl_monitor_init’:
./include/rv/ltl_monitor.h:75:51: error: passing argument 1 of ‘check_trace_callback_type_task_newtask’ from incompatible pointer type [-Wincompatible-pointer-types]
    75 |         rv_attach_trace_probe(name, task_newtask, handle_task_newtask);
       |                                                   ^~~~~~~~~~~~~~~~~~~
       |                                                   |
       |                                                   void (*)(void *, struct task_struct *, long unsigned int)
./include/rv/instrumentation.h:18:48: note: in definition of macro ‘rv_attach_trace_probe’
    18 |                 check_trace_callback_type_##tp(rv_handler);                             \
       |                                                ^~~~~~~~~~
I've fixed it up by simply:
diff --git a/include/rv/ltl_monitor.h b/include/rv/ltl_monitor.h
index 67031a774e3d3..5368cf5fd623e 100644
--- a/include/rv/ltl_monitor.h
+++ b/include/rv/ltl_monitor.h
@@ -56,7 +56,7 @@ static void ltl_task_init(struct task_struct *task, bool task_creation)
         ltl_atoms_fetch(task, mon);
  }
  
-static void handle_task_newtask(void *data, struct task_struct *task, unsigned long flags)
+static void handle_task_newtask(void *data, struct task_struct *task, u64 flags)
  {
         ltl_task_init(task, true);
  }
-- 
Thanks,
Sasha
^ permalink raw reply related	[flat|nested] 32+ messages in thread* Re: [GIT PULL 08/12 for v6.18] core kernel
  2025-09-27 12:19   ` Sasha Levin
@ 2025-09-29  9:53     ` Christian Brauner
  0 siblings, 0 replies; 32+ messages in thread
From: Christian Brauner @ 2025-09-29  9:53 UTC (permalink / raw)
  To: Sasha Levin; +Cc: Linus Torvalds, linux-fsdevel, linux-kernel
On Sat, Sep 27, 2025 at 08:19:12AM -0400, Sasha Levin wrote:
> On Fri, Sep 26, 2025 at 04:19:02PM +0200, Christian Brauner wrote:
> > Hey Linus,
> > 
> > /* Testing */
> > This contains the changes to enable support for clone3() on nios2 which
> > apparently is still a thing. The more exciting part of this is that it
> > cleans up the inconsistency in how the 64-bit flag argument is passed
> > from copy_process() into the various other copy_*() helpers.
> > 
> > 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
> > ================================
> > 
> > No known conflicts.
> > 
> > The following changes since commit 8f5ae30d69d7543eee0d70083daf4de8fe15d585:
> > 
> >  Linux 6.17-rc1 (2025-08-10 19:41:16 +0300)
> > 
> > are available in the Git repository at:
> > 
> >  git@gitolite.kernel.org:pub/scm/linux/kernel/git/vfs/vfs tags/kernel-6.18-rc1.clone3
> 
> Hi Christian,
> 
> After pulling this tag, I started seeing a build failure.
> 
> a9769a5b9878 ("rv: Add support for LTL monitors") which was merged a few weeks
> ago added a usage of task_newtask:
> 
> 	static void handle_task_newtask(void *data, struct task_struct *task, unsigned long flags)
> 
> But commit edd3cb05c00a ("copy_process: pass clone_flags as u64 across
> calltree") from this pull request modified the signature without updating rv.
> 
> ./include/rv/ltl_monitor.h: In function ‘ltl_monitor_init’:
> ./include/rv/ltl_monitor.h:75:51: error: passing argument 1 of ‘check_trace_callback_type_task_newtask’ from incompatible pointer type [-Wincompatible-pointer-types]
>    75 |         rv_attach_trace_probe(name, task_newtask, handle_task_newtask);
>       |                                                   ^~~~~~~~~~~~~~~~~~~
>       |                                                   |
>       |                                                   void (*)(void *, struct task_struct *, long unsigned int)
> ./include/rv/instrumentation.h:18:48: note: in definition of macro ‘rv_attach_trace_probe’
>    18 |                 check_trace_callback_type_##tp(rv_handler);                             \
>       |                                                ^~~~~~~~~~
> 
> I've fixed it up by simply:
> 
> diff --git a/include/rv/ltl_monitor.h b/include/rv/ltl_monitor.h
> index 67031a774e3d3..5368cf5fd623e 100644
> --- a/include/rv/ltl_monitor.h
> +++ b/include/rv/ltl_monitor.h
> @@ -56,7 +56,7 @@ static void ltl_task_init(struct task_struct *task, bool task_creation)
>         ltl_atoms_fetch(task, mon);
>  }
> -static void handle_task_newtask(void *data, struct task_struct *task, unsigned long flags)
> +static void handle_task_newtask(void *data, struct task_struct *task, u64 flags)
>  {
>         ltl_task_init(task, true);
>  }
Hm, thanks! That is only in -next, I guess. I probably didn't catch this
because I didn't have CONFIG_RV_REACTORS turn on (whatever that is).
@Linus please let me know if you want me to resend this pull request or
if you just want to apply this fixup directly. Thank you!
Christian
^ permalink raw reply	[flat|nested] 32+ messages in thread
* Re: [GIT PULL 08/12 for v6.18] core kernel
  2025-09-26 14:19 ` [GIT PULL 08/12 for v6.18] core kernel Christian Brauner
  2025-09-27 12:19   ` Sasha Levin
@ 2025-09-29 19:31   ` pr-tracker-bot
  1 sibling, 0 replies; 32+ messages in thread
From: pr-tracker-bot @ 2025-09-29 19:31 UTC (permalink / raw)
  To: Christian Brauner
  Cc: Linus Torvalds, Christian Brauner, linux-fsdevel, linux-kernel
The pull request you sent on Fri, 26 Sep 2025 16:19:02 +0200:
> git@gitolite.kernel.org:pub/scm/linux/kernel/git/vfs/vfs tags/kernel-6.18-rc1.clone3
has been merged into torvalds/linux.git:
https://git.kernel.org/torvalds/c/722df25ddf4f13e303dcc4cd65b3df5b197a79e6
Thank you!
-- 
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/prtracker.html
^ permalink raw reply	[flat|nested] 32+ messages in thread
* [GIT PULL 9/12 for v6.18] afs
  2025-09-26 14:18 [GIT PULL 00/12 for v6.18] vfs 6.18 Christian Brauner
                   ` (7 preceding siblings ...)
  2025-09-26 14:19 ` [GIT PULL 08/12 for v6.18] core kernel Christian Brauner
@ 2025-09-26 14:19 ` Christian Brauner
  2025-09-29 19:31   ` pr-tracker-bot
  2025-09-26 14:19 ` [GIT PULL 10/12 for v6.18] namespaces Christian Brauner
                   ` (2 subsequent siblings)
  11 siblings, 1 reply; 32+ messages in thread
From: Christian Brauner @ 2025-09-26 14:19 UTC (permalink / raw)
  To: Linus Torvalds; +Cc: Christian Brauner, linux-fsdevel, linux-kernel
Hey Linus,
/* Summary */
This contains the change to enable afs to support RENAME_NOREPLACE and
RENAME_EXCHANGE if the server supports it.
/* 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
================================
No known conflicts.
The following changes since commit 8f5ae30d69d7543eee0d70083daf4de8fe15d585:
  Linux 6.17-rc1 (2025-08-10 19:41:16 +0300)
are available in the Git repository at:
  git@gitolite.kernel.org:pub/scm/linux/kernel/git/vfs/vfs tags/vfs-6.18-rc1.afs
for you to fetch changes up to a19239ba14525c26ad097d59fd52cd9198b5bcdb:
  afs: Add support for RENAME_NOREPLACE and RENAME_EXCHANGE (2025-09-25 09:19:07 +0200)
Please consider pulling these changes from the signed vfs-6.18-rc1.afs tag.
Thanks!
Christian
----------------------------------------------------------------
vfs-6.18-rc1.afs
----------------------------------------------------------------
David Howells (1):
      afs: Add support for RENAME_NOREPLACE and RENAME_EXCHANGE
 fs/afs/dir.c               | 223 +++++++++++++++++++++++++++++++---------
 fs/afs/dir_edit.c          |  18 ++--
 fs/afs/dir_silly.c         |  11 ++
 fs/afs/internal.h          |  15 ++-
 fs/afs/misc.c              |   1 +
 fs/afs/protocol_yfs.h      |   3 +
 fs/afs/rotate.c            |  17 +++-
 fs/afs/yfsclient.c         | 249 +++++++++++++++++++++++++++++++++++++++++++++
 fs/dcache.c                |   1 +
 include/trace/events/afs.h |   6 ++
 10 files changed, 480 insertions(+), 64 deletions(-)
^ permalink raw reply	[flat|nested] 32+ messages in thread* [GIT PULL 10/12 for v6.18] namespaces
  2025-09-26 14:18 [GIT PULL 00/12 for v6.18] vfs 6.18 Christian Brauner
                   ` (8 preceding siblings ...)
  2025-09-26 14:19 ` [GIT PULL 9/12 for v6.18] afs Christian Brauner
@ 2025-09-26 14:19 ` Christian Brauner
  2025-09-29 19:31   ` pr-tracker-bot
  2025-09-26 14:19 ` [GIT PULL 11/12 for v6.18] writeback Christian Brauner
  2025-09-26 14:19 ` [GIT PULL 12/12 for v6.18] async directory preliminaries Christian Brauner
  11 siblings, 1 reply; 32+ messages in thread
From: Christian Brauner @ 2025-09-26 14:19 UTC (permalink / raw)
  To: Linus Torvalds; +Cc: Christian Brauner, linux-fsdevel, linux-kernel
Hey Linus,
/* Summary */
This contains a larger set of changes around the generic namespace
infrastructure of the kernel.
Each specific namespace type (net, cgroup, mnt, ...) embedds a struct
ns_common which carries the reference count of the namespace and so on.
We open-coded and cargo-culted so many quirks for each namespace type
that it just wasn't scalable anymore. So given there's a bunch of new
changes coming in that area I've started cleaning all of this up.
The core change is to make it possible to correctly initialize every
namespace uniformly and derive the correct initialization settings from
the type of the namespace such as namespace operations, namespace type
and so on. This leaves the new ns_common_init() function with a single
parameter which is the specific namespace type which derives the correct
parameters statically. This also means the compiler will yell as soon as
someone does something remotely fishy.
The ns_common_init() addition also allows us to remove ns_alloc_inum()
and drops any special-casing of the initial network namespace in the
network namespace initialization code that Linus complained about.
Another part is reworking the reference counting. The reference counting
was open-coded and copy-pasted for each namespace type even though they
all followed the same rules. This also removes all open accesses to the
reference count and makes it private and only uses a very small set of
dedicated helpers to manipulate them just like we do for e.g., files.
In addition this generalizes the mount namespace iteration
infrastructure introduced a few cycles ago. As reminder, the vfs makes
it possible to iterate sequentially and bidirectionally through all
mount namespaces on the system or all mount namespaces that the caller
holds privilege over. This allow userspace to iterate over all mounts in
all mount namespaces using the listmount() and statmount() system call.
Each mount namespace has a unique identifier for the lifetime of the
systems that is exposed to userspace. The network namespace also has a
unique identifier working exactly the same way. This extends the concept
to all other namespace types.
The new nstree type makes it possible to lookup namespaces purely by
their identifier and to walk the namespace list sequentially and
bidirectionally for all namespace types, allowing userspace to iterate
through all namespaces. Looking up namespaces in the namespace tree
works completely lockless.
This also means we can move the mount namespace onto the generic
infrastructure and remove a bunch of code and members from struct
mnt_namespace itself.
There's a bunch of stuff coming on top of this in the future but for now
this uses the generic namespace tree to extend a concept introduced
first for pidfs a few cycles ago. For a while now we have supported
pidfs file handles for pidfds. This has proven to be very useful.
This extends the concept to cover namespaces as well. It is possible to
encode and decode namespace file handles using the common
name_to_handle_at() and open_by_handle_at() apis.
As with pidfs file handles, namespace file handles are exhaustive,
meaning it is not required to actually hold a reference to nsfs in able
to decode aka open_by_handle_at() a namespace file handle. Instead the
FD_NSFS_ROOT constant can be passed which will let the kernel grab a
reference to the root of nsfs internally and thus decode the file
handle.
Namespaces file descriptors can already be derived from pidfds which
means they aren't subject to overmount protection bugs. IOW, it's
irrelevant if the caller would not have access to an appropriate
/proc/<pid>/ns/ directory as they could always just derive the namespace
based on a pidfd already.
It has the same advantage as pidfds. It's possible to reliably and for
the lifetime of the system refer to a namespace without pinning any
resources and to compare them trivially.
Permission checking is kept simple. If the caller is located in the
namespace the file handle refers to they are able to open it otherwise
they must hold privilege over the owning namespace of the relevant
namespace.
The namespace file handle layout is exposed as uapi and has a stable and
extensible format. For now it simply contains the namespace identifier,
the namespace type, and the inode number. The stable format means that
userspace may construct its own namespace file handles without going
through name_to_handle_at() as they are already allowed for pidfs and
cgroup file handles.
/* 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
================================
[1] This will have merge conflict and requires some minor changes after having
    merged the vfs-6.18-rc1.misc and kernel-6.18-rc1.clone3 pull requests. The
    patch required looks like this:
diff --cc include/linux/cgroup.h
index 56d9556a181a,5156fed8cbc3..000000000000
--- a/include/linux/cgroup.h
+++ b/include/linux/cgroup.h
@@@ -783,52 -784,7 +784,6 @@@ static inline void cgroup_sk_free(struc
  
  #endif	/* CONFIG_CGROUP_DATA */
  
- struct cgroup_namespace {
- 	struct ns_common	ns;
- 	struct user_namespace	*user_ns;
- 	struct ucounts		*ucounts;
- 	struct css_set          *root_cset;
- };
- 
- extern struct cgroup_namespace init_cgroup_ns;
- 
- #ifdef CONFIG_CGROUPS
- 
- void free_cgroup_ns(struct cgroup_namespace *ns);
- 
- struct cgroup_namespace *copy_cgroup_ns(u64 flags,
- 					struct user_namespace *user_ns,
- 					struct cgroup_namespace *old_ns);
- 
- int cgroup_path_ns(struct cgroup *cgrp, char *buf, size_t buflen,
- 		   struct cgroup_namespace *ns);
- 
- static inline void get_cgroup_ns(struct cgroup_namespace *ns)
- {
- 	refcount_inc(&ns->ns.count);
- }
- 
- static inline void put_cgroup_ns(struct cgroup_namespace *ns)
- {
- 	if (refcount_dec_and_test(&ns->ns.count))
- 		free_cgroup_ns(ns);
- }
- 
- #else /* !CONFIG_CGROUPS */
- 
- static inline void free_cgroup_ns(struct cgroup_namespace *ns) { }
- static inline struct cgroup_namespace *
- copy_cgroup_ns(u64 flags, struct user_namespace *user_ns,
- 	       struct cgroup_namespace *old_ns)
- {
- 	return old_ns;
- }
- 
- static inline void get_cgroup_ns(struct cgroup_namespace *ns) { }
- static inline void put_cgroup_ns(struct cgroup_namespace *ns) { }
- 
- #endif /* !CONFIG_CGROUPS */
--
  #ifdef CONFIG_CGROUPS
  
  void cgroup_enter_frozen(void);
diff --cc include/linux/ipc_namespace.h
index 4b399893e2b3,21eff63f47da..000000000000
--- a/include/linux/ipc_namespace.h
+++ b/include/linux/ipc_namespace.h
@@@ -129,9 -129,14 +129,14 @@@ static inline int mq_init_ns(struct ipc
  #endif
  
  #if defined(CONFIG_IPC_NS)
 +extern struct ipc_namespace *copy_ipcs(u64 flags,
 +	struct user_namespace *user_ns, struct ipc_namespace *ns);
 +
+ static inline struct ipc_namespace *to_ipc_ns(struct ns_common *ns)
+ {
+ 	return container_of(ns, struct ipc_namespace, ns);
+ }
+ 
 -extern struct ipc_namespace *copy_ipcs(unsigned long flags,
 -	struct user_namespace *user_ns, struct ipc_namespace *ns);
 -
  static inline struct ipc_namespace *get_ipc_ns(struct ipc_namespace *ns)
  {
  	if (ns)
diff --cc include/linux/mnt_namespace.h
index ff290c87b2e7,6d1c4c218c14..000000000000
--- a/include/linux/mnt_namespace.h
+++ b/include/linux/mnt_namespace.h
@@@ -11,7 -11,9 +11,9 @@@ struct fs_struct
  struct user_namespace;
  struct ns_common;
  
+ extern struct mnt_namespace init_mnt_ns;
+ 
 -extern struct mnt_namespace *copy_mnt_ns(unsigned long, struct mnt_namespace *,
 +extern struct mnt_namespace *copy_mnt_ns(u64, struct mnt_namespace *,
  		struct user_namespace *, struct fs_struct *);
  extern void put_mnt_ns(struct mnt_namespace *ns);
  DEFINE_FREE(put_mnt_ns, struct mnt_namespace *, if (!IS_ERR_OR_NULL(_T)) put_mnt_ns(_T))
diff --cc include/linux/utsname.h
index ba34ec0e2f95,547bd4439706..000000000000
--- a/include/linux/utsname.h
+++ b/include/linux/utsname.h
diff --git a/fs/proc/root.c b/fs/proc/root.c
index fd1f1c8a939a..1e24e085c7d5 100644
--- a/fs/proc/root.c
+++ b/fs/proc/root.c
@@ -143,7 +143,7 @@ static int proc_parse_pidns_param(struct fs_context *fc,
 	if (!proc_ns_file(ns_filp))
 		return invalfc(fc, "pidns argument is not an nsfs file");
 	ns = get_proc_ns(file_inode(ns_filp));
-	if (ns->ops->type != CLONE_NEWPID)
+	if (ns->ns_type != CLONE_NEWPID)
 		return invalfc(fc, "pidns argument is not a pidns file");
 	target = container_of(ns, struct pid_namespace, ns);
 
diff --git a/include/linux/cgroup_namespace.h b/include/linux/cgroup_namespace.h
index 81ccbdee425b..78a8418558a4 100644
--- a/include/linux/cgroup_namespace.h
+++ b/include/linux/cgroup_namespace.h
@@ -22,7 +22,7 @@ static inline struct cgroup_namespace *to_cg_ns(struct ns_common *ns)
 
 void free_cgroup_ns(struct cgroup_namespace *ns);
 
-struct cgroup_namespace *copy_cgroup_ns(unsigned long flags,
+struct cgroup_namespace *copy_cgroup_ns(u64 flags,
 					struct user_namespace *user_ns,
 					struct cgroup_namespace *old_ns);
 
@@ -44,7 +44,7 @@ static inline void put_cgroup_ns(struct cgroup_namespace *ns)
 
 static inline void free_cgroup_ns(struct cgroup_namespace *ns) { }
 static inline struct cgroup_namespace *
-copy_cgroup_ns(unsigned long flags, struct user_namespace *user_ns,
+copy_cgroup_ns(u64 flags, struct user_namespace *user_ns,
 	       struct cgroup_namespace *old_ns)
 {
 	return old_ns;
diff --git a/include/linux/uts_namespace.h b/include/linux/uts_namespace.h
index 23b4f0e1b338..60f37fec0f4b 100644
--- a/include/linux/uts_namespace.h
+++ b/include/linux/uts_namespace.h
@@ -28,7 +28,7 @@ static inline void get_uts_ns(struct uts_namespace *ns)
 	ns_ref_inc(ns);
 }
 
-extern struct uts_namespace *copy_utsname(unsigned long flags,
+extern struct uts_namespace *copy_utsname(u64 flags,
 	struct user_namespace *user_ns, struct uts_namespace *old_ns);
 extern void free_uts_ns(struct uts_namespace *ns);
 
@@ -48,7 +48,7 @@ static inline void put_uts_ns(struct uts_namespace *ns)
 {
 }
 
-static inline struct uts_namespace *copy_utsname(unsigned long flags,
+static inline struct uts_namespace *copy_utsname(u64 flags,
 	struct user_namespace *user_ns, struct uts_namespace *old_ns)
 {
 	if (flags & CLONE_NEWUTS)
[2] https://lore.kernel.org/linux-next/aNEPxbts2exyK_2A@finisterre.sirena.org.uk
The following changes since commit b320789d6883cc00ac78ce83bccbfe7ed58afcf0:
  Linux 6.17-rc4 (2025-08-31 15:33:07 -0700)
are available in the Git repository at:
  git@gitolite.kernel.org:pub/scm/linux/kernel/git/vfs/vfs tags/namespace-6.18-rc1
for you to fetch changes up to 6e65f4e8fc5b02f7a60ebb5b1b83772df0b86663:
  Merge patch series "ns: tweak ns common handling" (2025-09-25 09:23:55 +0200)
Please consider pulling these changes from the signed namespace-6.18-rc1 tag.
Thanks!
Christian
----------------------------------------------------------------
namespace-6.18-rc1
----------------------------------------------------------------
Al Viro (1):
      mnt_ns_tree_remove(): DTRT if mnt_ns had never been added to mnt_ns_list
Christian Brauner (70):
      pidfs: validate extensible ioctls
      nsfs: drop tautological ioctl() check
      nsfs: validate extensible ioctls
      block: use extensible_ioctl_valid()
      ns: move to_ns_common() to ns_common.h
      nsfs: add nsfs.h header
      ns: uniformly initialize ns_common
      cgroup: use ns_common_init()
      ipc: use ns_common_init()
      mnt: use ns_common_init()
      net: use ns_common_init()
      pid: use ns_common_init()
      time: use ns_common_init()
      user: use ns_common_init()
      uts: use ns_common_init()
      ns: remove ns_alloc_inum()
      nstree: make iterator generic
      Merge branch 'no-rebase-mnt_ns_tree_remove'
      mnt: support ns lookup
      cgroup: support ns lookup
      ipc: support ns lookup
      net: support ns lookup
      pid: support ns lookup
      time: support ns lookup
      user: support ns lookup
      uts: support ns lookup
      ns: add to_<type>_ns() to respective headers
      nsfs: add current_in_namespace()
      nsfs: support file handles
      nsfs: support exhaustive file handles
      nsfs: add missing id retrieval support
      tools: update nsfs.h uapi header
      selftests/namespaces: add identifier selftests
      selftests/namespaces: add file handle selftests
      uts: split namespace into separate header
      Merge patch series "ns: support file handles"
      mnt: expose pointer to init_mnt_ns
      nscommon: move to separate file
      cgroup: split namespace into separate header
      nsfs: add inode number for anon namespace
      mnt: simplify ns_common_init() handling
      net: centralize ns_common initialization
      nscommon: simplify initialization
      ns: add reference count helpers
      mnt: port to ns_ref_*() helpers
      ns: add ns_common_free()
      cgroup: port to ns_ref_*() helpers
      Merge patch series "ns: rework common initialization"
      ipc: port to ns_ref_*() helpers
      pid: port to ns_ref_*() helpers
      time: port to ns_ref_*() helpers
      user: port to ns_ref_*() helpers
      net-sysfs: use check_net()
      net: use check_net()
      ipv4: use check_net()
      uts: port to ns_ref_*() helpers
      net: port to ns_ref_*() helpers
      nsfs: port to ns_ref_*() helpers
      ns: rename to __ns_ref
      Merge patch series "ns: rework reference counting"
      selftests/namespaces: verify initial namespace inode numbers
      ns: use inode initializer for initial namespaces
      cgroup: add missing ns_common include
      ns: simplify ns_common_init() further
      ns: add ns_debug()
      Merge patch series "ns: minor tweaks"
      nstree: make struct ns_tree private
      ns: move ns type into struct ns_common
      ns: drop assert
      Merge patch series "ns: tweak ns common handling"
 block/blk-integrity.c                              |    8 +-
 fs/fhandle.c                                       |    6 +
 fs/internal.h                                      |    1 +
 fs/mount.h                                         |   12 +-
 fs/namespace.c                                     |  196 +--
 fs/nsfs.c                                          |  211 ++-
 fs/pidfs.c                                         |    2 +-
 include/linux/cgroup.h                             |   46 +-
 include/linux/cgroup_namespace.h                   |   58 +
 include/linux/exportfs.h                           |    6 +
 include/linux/fs.h                                 |   14 +
 include/linux/ipc_namespace.h                      |    9 +-
 include/linux/mnt_namespace.h                      |    2 +
 include/linux/ns_common.h                          |  139 +-
 include/linux/nsfs.h                               |   40 +
 include/linux/nsproxy.h                            |   11 -
 include/linux/nstree.h                             |   78 ++
 include/linux/pid_namespace.h                      |    7 +-
 include/linux/proc_ns.h                            |   22 +-
 include/linux/time_namespace.h                     |   13 +-
 include/linux/user_namespace.h                     |    9 +-
 include/linux/uts_namespace.h                      |   65 +
 include/linux/utsname.h                            |   53 +-
 include/net/net_namespace.h                        |   13 +-
 include/uapi/linux/fcntl.h                         |    1 +
 include/uapi/linux/nsfs.h                          |   18 +-
 init/main.c                                        |    2 +
 init/version-timestamp.c                           |    5 +-
 ipc/msgutil.c                                      |    6 +-
 ipc/namespace.c                                    |   19 +-
 ipc/shm.c                                          |    2 +
 kernel/Makefile                                    |    2 +-
 kernel/cgroup/cgroup.c                             |    7 +-
 kernel/cgroup/namespace.c                          |   27 +-
 kernel/nscommon.c                                  |   77 ++
 kernel/nsproxy.c                                   |    4 +-
 kernel/nstree.c                                    |  247 ++++
 kernel/pid.c                                       |    5 +-
 kernel/pid_namespace.c                             |   23 +-
 kernel/time/namespace.c                            |   32 +-
 kernel/user.c                                      |    5 +-
 kernel/user_namespace.c                            |   24 +-
 kernel/utsname.c                                   |   31 +-
 net/core/net-sysfs.c                               |    6 +-
 net/core/net_namespace.c                           |   58 +-
 net/ipv4/inet_timewait_sock.c                      |    4 +-
 net/ipv4/tcp_metrics.c                             |    2 +-
 tools/include/uapi/linux/nsfs.h                    |   17 +-
 tools/testing/selftests/namespaces/.gitignore      |    3 +
 tools/testing/selftests/namespaces/Makefile        |    7 +
 tools/testing/selftests/namespaces/config          |    7 +
 .../selftests/namespaces/file_handle_test.c        | 1429 ++++++++++++++++++++
 tools/testing/selftests/namespaces/init_ino_test.c |   61 +
 tools/testing/selftests/namespaces/nsid_test.c     |  986 ++++++++++++++
 54 files changed, 3677 insertions(+), 461 deletions(-)
 create mode 100644 include/linux/cgroup_namespace.h
 create mode 100644 include/linux/nsfs.h
 create mode 100644 include/linux/nstree.h
 create mode 100644 include/linux/uts_namespace.h
 create mode 100644 kernel/nscommon.c
 create mode 100644 kernel/nstree.c
 create mode 100644 tools/testing/selftests/namespaces/.gitignore
 create mode 100644 tools/testing/selftests/namespaces/Makefile
 create mode 100644 tools/testing/selftests/namespaces/config
 create mode 100644 tools/testing/selftests/namespaces/file_handle_test.c
 create mode 100644 tools/testing/selftests/namespaces/init_ino_test.c
 create mode 100644 tools/testing/selftests/namespaces/nsid_test.c
^ permalink raw reply related	[flat|nested] 32+ messages in thread* [GIT PULL 11/12 for v6.18] writeback
  2025-09-26 14:18 [GIT PULL 00/12 for v6.18] vfs 6.18 Christian Brauner
                   ` (9 preceding siblings ...)
  2025-09-26 14:19 ` [GIT PULL 10/12 for v6.18] namespaces Christian Brauner
@ 2025-09-26 14:19 ` Christian Brauner
  2025-09-29 19:31   ` pr-tracker-bot
  2025-09-26 14:19 ` [GIT PULL 12/12 for v6.18] async directory preliminaries Christian Brauner
  11 siblings, 1 reply; 32+ messages in thread
From: Christian Brauner @ 2025-09-26 14:19 UTC (permalink / raw)
  To: Linus Torvalds; +Cc: Christian Brauner, linux-fsdevel, linux-kernel
Hey Linus,
/* Summary */
This contains work adressing lockups reported by users when a systemd
unit reading lots of files from a filesystem mounted with the lazytime
mount option exits.
With the lazytime mount option enabled we can be switching many dirty
inodes on cgroup exit to the parent cgroup. The numbers observed in
practice when systemd slice of a large cron job exits can easily reach
hundreds of thousands or millions.
The logic in inode_do_switch_wbs() which sorts the inode into
appropriate place in b_dirty list of the target wb however has linear
complexity in the number of dirty inodes thus overall time complexity of
switching all the inodes is quadratic leading to workers being pegged
for hours consuming 100% of the CPU and switching inodes to the parent wb.
Simple reproducer of the issue:
  FILES=10000
  # Filesystem mounted with lazytime mount option
  MNT=/mnt/
  echo "Creating files and switching timestamps"
  for (( j = 0; j < 50; j ++ )); do
      mkdir $MNT/dir$j
      for (( i = 0; i < $FILES; i++ )); do
          echo "foo" >$MNT/dir$j/file$i
      done
      touch -a -t 202501010000 $MNT/dir$j/file*
  done
  wait
  echo "Syncing and flushing"
  sync
  echo 3 >/proc/sys/vm/drop_caches
  echo "Reading all files from a cgroup"
  mkdir /sys/fs/cgroup/unified/mycg1 || exit
  echo $$ >/sys/fs/cgroup/unified/mycg1/cgroup.procs || exit
  for (( j = 0; j < 50; j ++ )); do
      cat /mnt/dir$j/file* >/dev/null &
  done
  wait
  echo "Switching wbs"
  # Now rmdir the cgroup after the script exits
This can be solved by:
* Avoiding contention on the wb->list_lock when switching inodes by
  running a single work item per wb and managing a queue of items
  switching to the wb.
* Allow rescheduling when switching inodes over to a different cgroup to
  avoid softlockups.
* Maintain b_dirty list ordering instead of sorting it.
/* 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
================================
No known conflicts.
The following changes since commit 8f5ae30d69d7543eee0d70083daf4de8fe15d585:
  Linux 6.17-rc1 (2025-08-10 19:41:16 +0300)
are available in the Git repository at:
  git@gitolite.kernel.org:pub/scm/linux/kernel/git/vfs/vfs tags/vfs-6.18-rc1.writeback
for you to fetch changes up to 9426414f0d42f824892ecd4dccfebf8987084a41:
  Merge patch series "writeback: Avoid lockups when switching inodes" (2025-09-19 13:11:06 +0200)
Please consider pulling these changes from the signed vfs-6.18-rc1.writeback tag.
Thanks!
Christian
----------------------------------------------------------------
vfs-6.18-rc1.writeback
----------------------------------------------------------------
Christian Brauner (1):
      Merge patch series "writeback: Avoid lockups when switching inodes"
Jan Kara (4):
      writeback: Avoid contention on wb->list_lock when switching inodes
      writeback: Avoid softlockup when switching many inodes
      writeback: Avoid excessively long inode switching times
      writeback: Add tracepoint to track pending inode switches
 fs/fs-writeback.c                | 133 +++++++++++++++++++++++++--------------
 include/linux/backing-dev-defs.h |   4 ++
 include/linux/writeback.h        |   2 +
 include/trace/events/writeback.h |  29 +++++++++
 mm/backing-dev.c                 |   5 ++
 5 files changed, 126 insertions(+), 47 deletions(-)
^ permalink raw reply	[flat|nested] 32+ messages in thread* [GIT PULL 12/12 for v6.18] async directory preliminaries
  2025-09-26 14:18 [GIT PULL 00/12 for v6.18] vfs 6.18 Christian Brauner
                   ` (10 preceding siblings ...)
  2025-09-26 14:19 ` [GIT PULL 11/12 for v6.18] writeback Christian Brauner
@ 2025-09-26 14:19 ` Christian Brauner
  2025-09-29 19:31   ` pr-tracker-bot
  11 siblings, 1 reply; 32+ messages in thread
From: Christian Brauner @ 2025-09-26 14:19 UTC (permalink / raw)
  To: Linus Torvalds; +Cc: Christian Brauner, linux-fsdevel, linux-kernel
Hey Linus,
/* Summary */
This contains further preparatory changes for the asynchronous directory
locking scheme:
* Add lookup_one_positive_killable() which allows overlayfs to perform
  lookup that won't block on a fatal signal.
* Unify the mount idmap handling in struct renamedata as a rename can
  only happen within a single mount.
* Introduce kern_path_parent() for audit which sets the path to the
  parent and returns a dentry for the target without holding any locks
  on return.
* Rename kern_path_locked() as it is only used to prepare for the
  removal of an object from the filesystem:
   kern_path_locked()    => start_removing_path()
   kern_path_create()    => start_creating_path()
   user_path_create()    => start_creating_user_path()
   user_path_locked_at() => start_removing_user_path_at()
   done_path_create()    => end_creating_path()
   NA                    => end_removing_path()
/* 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
================================
[1] https://lore.kernel.org/linux-next/aNOyrz1bd1WTrZgc@finisterre.sirena.org.uk
[2] https://lore.kernel.org/linux-next/aNU3FtEZ3w_NcYwI@sirena.org.uk
The following changes since commit 8f5ae30d69d7543eee0d70083daf4de8fe15d585:
  Linux 6.17-rc1 (2025-08-10 19:41:16 +0300)
are available in the Git repository at:
  git@gitolite.kernel.org:pub/scm/linux/kernel/git/vfs/vfs tags/vfs-6.18-rc1.async
for you to fetch changes up to 4f5ea5aa0dcdd3c7487fbabad5b86b3cd7d2b8c4:
  Merge patch series "vfs: preparatory changes to centralize locking of create/remove/rename" (2025-09-23 12:37:42 +0200)
Please consider pulling these changes from the signed vfs-6.18-rc1.async tag.
Thanks!
Christian
----------------------------------------------------------------
vfs-6.18-rc1.async
----------------------------------------------------------------
Christian Brauner (1):
      Merge patch series "vfs: preparatory changes to centralize locking of create/remove/rename"
NeilBrown (6):
      VFS/ovl: add lookup_one_positive_killable()
      VFS: discard err2 in filename_create()
      VFS: unify old_mnt_idmap and new_mnt_idmap in renamedata
      VFS/audit: introduce kern_path_parent() for audit
      VFS: rename kern_path_locked() and related functions.
      debugfs: rename start_creating() to debugfs_start_creating()
 Documentation/filesystems/porting.rst        |  12 ++
 arch/powerpc/platforms/cell/spufs/syscalls.c |   4 +-
 drivers/base/devtmpfs.c                      |  22 ++--
 fs/bcachefs/fs-ioctl.c                       |  10 +-
 fs/cachefiles/namei.c                        |   3 +-
 fs/debugfs/inode.c                           |  11 +-
 fs/ecryptfs/inode.c                          |   3 +-
 fs/init.c                                    |  17 +--
 fs/namei.c                                   | 164 ++++++++++++++++++++-------
 fs/nfsd/vfs.c                                |   3 +-
 fs/ocfs2/refcounttree.c                      |   4 +-
 fs/overlayfs/overlayfs.h                     |   3 +-
 fs/overlayfs/readdir.c                       |  28 ++---
 fs/smb/server/vfs.c                          |  11 +-
 include/linux/fs.h                           |   6 +-
 include/linux/namei.h                        |  21 ++--
 kernel/audit_fsnotify.c                      |  11 +-
 kernel/audit_watch.c                         |   3 +-
 kernel/bpf/inode.c                           |   4 +-
 net/unix/af_unix.c                           |   6 +-
 20 files changed, 216 insertions(+), 130 deletions(-)
^ permalink raw reply	[flat|nested] 32+ messages in thread