Skip to contentSkip to conversation

v7.1

GIT PULL Merged Christian Brauner 3 participants 30 messages Apr 10 – Apr 15

Subsystems (9)
VFS MM core Scheduler Security (LSM) +5 more subsystems
lore
Share & tools
lore

Christian Brauner

author maintainer
#0 lore raw

Hey Linus,

This is the batch of pull requests for the v7.1 merge window.

This cycle has several new features and a good amount of infrastructure work.

There are three new clone3() flags for pidfd-based process lifecycle management. CLONE_AUTOREAP makes a child auto-reap on exit without becoming a zombie. Unlike SA_NOCLDWAIT or SIG_IGN on SIGCHLD this is a per-process property on the child, not a parent-scoped setting affecting all children. The flag survives reparenting so subreaper or init won't need to deal with it. CLONE_NNP sets no_new_privs on the child at clone time, allowing the parent to impose it without affecting itself. CLONE_PIDFD_AUTOKILL ties a child's lifetime to the pidfd returned from clone3() - when the last reference to that struct file is closed the kernel sends SIGKILL to the child. This is useful for container runtimes, service managers, and sandboxed subprocess execution where the child must die if the parent crashes. CLONE_PIDFD_AUTOKILL requires both CLONE_PIDFD and CLONE_AUTOREAP. The pidfd_info struct also gains a coredump_code field.

The mount namespace work introduces FSMOUNT_NAMESPACE for fsmount() which creates a new mount namespace with the newly created filesystem attached, returning a namespace fd instead of an O_PATH mount fd. This accompanies last cycle's OPEN_TREE_NAMESPACE and is especially useful when mounting a real filesystem to serve as a container rootfs.

Also new is support for creating empty mount namespaces via CLONE_EMPTY_MNTNS for clone3() and UNSHARE_EMPTY_MNTNS for unshare(). These create a namespace containing only a single nullfs root mount with an immutable empty directory. The intended workflow is to mount a real filesystem over the root and build the mount table from scratch, which avoids copying and tearing down the entire parent mount tree.

MOVE_MOUNT_BENEATH is extended to target the caller's rootfs and to transfer the MNT_LOCKED property from the top mount to the mount beneath. This allows safely modifying an inherited mount table after unprivileged namespace creation via unshare(CLONE_NEWUSER | CLONE_NEWNS) and makes it possible to switch out the rootfs without pivot_root(2).

The simple_xattr subsystem is reworked from an rbtree protected by a reader-writer spinlock to an rhashtable with RCU-based lockless reads. All consumers (shmem, kernfs, pidfs) are converted and the rbtree code is removed. On top of this, user.* extended attributes are now supported on sockets. Sockfs sockets get per-inode limits of 128 xattrs and 128KB total value size. The practical motivation comes from systemd and GNOME expanding their use of Varlink as an IPC mechanism - with user.* xattrs a service can label its socket with the IPC protocol it speaks and eBPF programs can selectively capture traffic on those sockets.

The inode->i_ino field is widened from unsigned long to u64. This is a treewide change affecting format strings and tracepoints across 222 files. On 64-bit hosts this makes no material difference but it eliminates the 32-bit hashing hacks various filesystems had to use.

Filesystem-level T10 protection information support is added. The existing block layer PI code is refactored to be reusable and wired up through iomap into XFS. This increases read performance up to 15% for 4k I/O compared to the automatic below-the-covers block layer approach.

The metadata buffer_head tracking accumulated in struct address_space over the years is cleaned up and moved into filesystem-private inode structures. The private_list, private_data, and private_lock fields are removed from struct address_space, saving 3 longs in struct inode for the vast majority of inodes.

The audit subsystem's excessive dput/dget calls during context setup and reset are addressed by adding a pool of extra fs->pwd references to fs_struct. This avoids the spinlock contention on the pwd dentry lock that was causing noticeable performance regressions on systems with many CPUs doing open/close with audit enabled.

The directory locking centralization continues. The remaining places where explicit inode_lock(), lock_rename(), or similar are used outside the core VFS are converted to use the start_creating/start_removing/ start_renaming interfaces. The biggest changes are in overlayfs, with smaller conversions in cachefiles, nfsd, apparmor, and selinux. lock_rename(), lock_rename_child(), and unlock_rename() are unexported.

The writeback subsystem gets new helper APIs and f2fs, gfs2, and nfs are converted to stop accessing writeback internals directly.

Smaller items include namespace helper macros (FOR_EACH_NS_TYPE(), CLONE_NS_ALL), FAT timestamp conversion KUnit tests, removal of unused fs_context infrastructure now that the conversion is finished, a fix for architecture-specific compat_ftruncate64 enforcing the non-LFS file size limit, trivial ->setattr rename cleanups, dcache bucket count fixes, mbcache shrink work ordering fix, omfs superblock validation, a coredump tracepoint, dirent_size() helper, scoped user access conversion, runtime const for file/bfile caches, and permitting dynamic_dname()s up to NAME_MAX.

Thanks!
Christian

author maintainer
#1 lore raw

[GIT PULL 01/12 for v7.1] vfs writeback

Hey Linus,

/* Summary */

The series introduces writeback helper APIs and converts f2fs, gfs2 and nfs to stop accessing writeback internals directly.

/* 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
================================

The following changes since commit 9702969978695d9a699a1f34771580cdbb153b33:

Merge tag 'slab-for-7.0-part2' of git://git.kernel.org/pub/scm/linux/kernel/git/vbabka/slab (2026-02-16 13:41:38 -0800)

are available in the Git repository at:

[email protected]:pub/scm/linux/kernel/git/vfs/vfs tags/vfs-7.1-rc1.writeback

for you to fetch changes up to 86566865986c4fa1963aace4ef5181501b2974c7:

Merge patch series "Avoid filesystem references to writeback internals" (2026-02-17 13:25:19 +0100)

----------------------------------------------------------------
vfs-7.1-rc1.writeback

Please consider pulling these changes from the signed vfs-7.1-rc1.writeback tag.

Thanks!
Christian

----------------------------------------------------------------
Christian Brauner (1):
Merge patch series "Avoid filesystem references to writeback internals"

Kundan Kumar (4):
writeback: prep helpers for dirty-limit and writeback accounting
f2fs: stop using writeback internals for dirty_exceeded checks
gfs2: stop using writeback internals for dirty_exceeded check
nfs: stop using writeback internals for WB_WRITEBACK accounting

 fs/f2fs/node.c              |  4 ++--
 fs/f2fs/segment.h           |  2 +-
 fs/gfs2/super.c             |  2 +-
 fs/nfs/internal.h           |  2 +-
 fs/nfs/write.c              |  3 +--
 include/linux/backing-dev.h | 13 +++++++++++++
 6 files changed, 19 insertions(+), 7 deletions(-)
merge bot Merged
#2 lore raw

Re: [GIT PULL 01/12 for v7.1] vfs writeback

The pull request you sent on Fri, 10 Apr 2026 17:16:11 +0200:

The pull request you sent on Fri, 10 Apr 2026 17:16:11 +0200:

Quoted 1 line

[email protected]:pub/scm/linux/kernel/git/vfs/vfs tags/vfs-7.1-rc1.writeback

has been merged into torvalds/linux.git:
https://git.kernel.org/torvalds/c/0e58e3f1c57850f62afd40a642a7fe3417d80b21

Thank you!

Signature · 2 lines
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/prtracker.html
author maintainer
#3 lore raw

[GIT PULL 02/12 for v7.1] vfs xattr

In reply to Christian Brauner

Hey Linus,

/* Summary */

Rework simple xattrs and support user.* xattrs on sockets This reworks the simple_xattr infrastructure and adds support for user.* extended attributes on sockets.

The simple_xattr subsystem currently uses an rbtree protected by a reader-writer spinlock. This series replaces the rbtree with an rhashtable giving O(1) average-case lookup with RCU-based lockless reads. This sped up concurrent access patterns on tmpfs quite a bit and it's an overall easy enough conversion to do and gets rid or rwlock_t.

The conversion is done incrementally: a new rhashtable path is added alongside the existing rbtree, consumers are migrated one at a time (shmem, kernfs, pidfs), and then the rbtree code is removed. All three consumers switch from embedded structs to pointer-based lazy allocation so the rhashtable overhead is only paid for inodes that actually use xattrs.

With this infrastructure in place the series adds support for user.* xattrs on sockets. Path-based AF_UNIX sockets inherit xattr support from the underlying filesystem (e.g. tmpfs) but sockets in sockfs - that is everything created via socket() including abstract namespace AF_UNIX sockets - had no xattr support at all.

The xattr_permission() checks are reworked to allow user.* xattrs on S_IFSOCK inodes. Sockfs sockets get per-inode limits of 128 xattrs and 128KB total value size matching the limits already in use for kernfs.

The practical motivation comes from several directions. systemd and GNOME are expanding their use of Varlink as an IPC mechanism. For D-Bus there are tools like dbus-monitor that can observe IPC traffic across the system but this only works because D-Bus has a central broker. For Varlink there is no broker and there is currently no way to identify which sockets speak Varlink. With user.* xattrs on sockets a service can label its socket with the IPC protocol it speaks (e.g., user.varlink=1) and an eBPF program can then selectively capture traffic on those sockets. Enumerating bound sockets via netlink combined with these xattr labels gives a way to discover all Varlink IPC entrypoints for debugging and introspection.

Similarly, systemd-journald wants to use xattrs on the /dev/log socket for protocol negotiation to indicate whether RFC 5424 structured syslog is supported or whether only the legacy RFC 3164 format should be used.

In containers these labels are particularly useful as high-privilege or more complicated solutions for socket identification aren't available.

The series comes with comprehensive selftests covering path-based AF_UNIX sockets, sockfs socket operations, per-inode limit enforcement, and xattr operations across multiple address families (AF_INET, AF_INET6, AF_NETLINK, AF_PACKET).

/* 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
================================

The following changes since commit 6de23f81a5e08be8fbf5e8d7e9febc72a5b5f27f:

Linux 7.0-rc1 (2026-02-22 13:18:59 -0800)

are available in the Git repository at:

[email protected]:pub/scm/linux/kernel/git/vfs/vfs tags/vfs-7.1-rc1.xattr

for you to fetch changes up to 98779186aa0b3367489a87c6d8bc0911f577444e:

Merge patch series "xattr: rework simple xattrs and support user.* xattrs on sockets" (2026-03-02 11:06:43 +0100)

----------------------------------------------------------------
vfs-7.1-rc1.xattr

Please consider pulling these changes from the signed vfs-7.1-rc1.xattr tag.

Thanks!
Christian

----------------------------------------------------------------
Christian Brauner (15):
xattr: add rcu_head and rhash_head to struct simple_xattr
xattr: add rhashtable-based simple_xattr infrastructure
shmem: adapt to rhashtable-based simple_xattrs with lazy allocation
kernfs: adapt to rhashtable-based simple_xattrs with lazy allocation
pidfs: adapt to rhashtable-based simple_xattrs
xattr: remove rbtree-based simple_xattr infrastructure
xattr: add xattr_permission_error()
xattr: switch xattr_permission() to switch statement
xattr: move user limits for xattrs to generic infra
xattr,net: support limited amount of extended attributes on sockfs sockets
xattr: support extended attributes on sockets
selftests/xattr: path-based AF_UNIX socket xattr tests selftests/xattr: sockfs socket xattr tests
selftests/xattr: test xattrs on various socket families
Merge patch series "xattr: rework simple xattrs and support user.* xattrs on sockets"

 fs/kernfs/dir.c                                    |  15 +-
 fs/kernfs/inode.c                                  |  99 +----
 fs/kernfs/kernfs-internal.h                        |   5 +-
 fs/pidfs.c                                         |  64 +--
 fs/xattr.c                                         | 423 +++++++++++++------
 include/linux/kernfs.h                             |   2 -
 include/linux/shmem_fs.h                           |   2 +-
 include/linux/xattr.h                              |  47 ++-
 mm/shmem.c                                         |  46 +-
 net/socket.c                                       | 119 ++++--
 .../testing/selftests/filesystems/xattr/.gitignore |   3 +
 tools/testing/selftests/filesystems/xattr/Makefile |   6 +
 .../filesystems/xattr/xattr_socket_test.c          | 470 +++++++++++++++++++++
 .../filesystems/xattr/xattr_socket_types_test.c    | 177 ++++++++
 .../filesystems/xattr/xattr_sockfs_test.c          | 363 ++++++++++++++++
 15 files changed, 1546 insertions(+), 295 deletions(-)
 create mode 100644 tools/testing/selftests/filesystems/xattr/.gitignore
 create mode 100644 tools/testing/selftests/filesystems/xattr/Makefile
 create mode 100644 tools/testing/selftests/filesystems/xattr/xattr_socket_test.c
 create mode 100644 tools/testing/selftests/filesystems/xattr/xattr_socket_types_test.c
 create mode 100644 tools/testing/selftests/filesystems/xattr/xattr_sockfs_test.c
merge bot Merged
#4 lore raw

Re: [GIT PULL 02/12 for v7.1] vfs xattr

The pull request you sent on Fri, 10 Apr 2026 17:16:30 +0200:

The pull request you sent on Fri, 10 Apr 2026 17:16:30 +0200:

Quoted 1 line

[email protected]:pub/scm/linux/kernel/git/vfs/vfs tags/vfs-7.1-rc1.xattr

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

Thank you!

Signature · 2 lines
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/prtracker.html
author maintainer
#5 lore raw

[GIT PULL 03/12 for v7.1] vfs directory

In reply to Christian Brauner

Hey Linus,

/* Summary */

Recently "start_creating", "start_removing", "start_renaming" and related interaces were added which combine the locking and the lookup. At that time many callers were changed to use the new interfaces. However there are still an assortment of places out side of the core vfs where the directory is locked explictly, whether with inode_lock() or lock_rename() or similar. These were missed in the first pass for an assortment of uninteresting reasons.

This series addresses the remaining places where explicit locking is used, and changes them to use the new interfaces, or otherwise removes the explicit locking.

The biggest changes are in overlayfs. The other changes are quite simple, though maybe the cachefiles changes is the least simple of those.

/* 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
=============================

security/apparmor/apparmorfs.c +0 -0
diff --cc security/apparmor/apparmorfs.c
index 242c71b3fb6e,f93c4f31d02a..000000000000
@@@ -364,22 -289,13 +358,17 @@@ static struct dentry *aafs_create(cons
        }
        error = __aafs_setup_d_inode(dir, dentry, mode, data, link, fops, iops);

+ simple_done_creating(dentry);
if (error)
- goto fail_dentry;
- inode_unlock(dir);
+ goto fail;
+
+ if (data)
+ aa_get_common_ref(data);
+

        return dentry;

- fail_dentry:
- dput(dentry);
-
- fail_lock:
- inode_unlock(dir);
+ fail:

        simple_release_fs(&aafs_mnt, &aafs_count);
-
        return ERR_PTR(error);

}

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

[1]: https://lore.kernel.org/linux-next/[email protected]

The following changes since commit 6de23f81a5e08be8fbf5e8d7e9febc72a5b5f27f:

Linux 7.0-rc1 (2026-02-22 13:18:59 -0800)

are available in the Git repository at:

[email protected]:pub/scm/linux/kernel/git/vfs/vfs tags/vfs-7.1-rc1.directory

for you to fetch changes up to 9c62536a958ffef246b6f7c01125ebac962158f8:

Merge patch series "Further centralising of directory locking for name ops." (2026-03-09 09:43:04 +0100)

----------------------------------------------------------------
vfs-7.1-rc1.directory

Please consider pulling these changes from the signed vfs-7.1-rc1.directory tag.

Thanks!
Christian

----------------------------------------------------------------
Christian Brauner (1):
Merge patch series "Further centralising of directory locking for name ops."

NeilBrown (15):
VFS: note error returns in documentation for various lookup functions fs/proc: Don't lock root inode when creating "self" and "thread-self"
VFS: move the start_dirop() kerndoc comment to before start_dirop()
libfs: change simple_done_creating() to use end_creating()
Apparmor: Use simple_start_creating() / simple_done_creating()
selinux: Use simple_start_creating() / simple_done_creating()
nfsd: switch purge_old() to use start_removing_noperm()
VFS: make lookup_one_qstr_excl() static.
ovl: Simplify ovl_lookup_real_one()
cachefiles: change cachefiles_bury_object to use start_renaming_dentry()
ovl: pass name buffer to ovl_start_creating_temp()
ovl: change ovl_create_real() to get a new lock when re-opening created file.
ovl: use is_subdir() for testing if one thing is a subdir of another
ovl: remove ovl_lock_rename_workdir()
VFS: unexport lock_rename(), lock_rename_child(), unlock_rename()

 Documentation/filesystems/porting.rst | 14 ++++++
 fs/cachefiles/namei.c                 | 93 ++++++++++++-----------------------
 fs/libfs.c                            |  3 +-
 fs/namei.c                            | 70 +++++++++++++++++---------
 fs/nfsd/nfs4recover.c                 |  6 +--
 fs/overlayfs/dir.c                    | 51 ++++++++++++-------
 fs/overlayfs/export.c                 | 71 +++++++++++++-------------
 fs/overlayfs/overlayfs.h              | 10 +---
 fs/overlayfs/super.c                  | 16 +++---
 fs/overlayfs/util.c                   | 25 ----------
 fs/proc/self.c                        |  3 --
 fs/proc/thread_self.c                 |  3 --
 include/linux/namei.h                 |  6 ---
 security/apparmor/apparmorfs.c        | 35 +++----------
 security/selinux/selinuxfs.c          | 17 +++----
 15 files changed, 184 insertions(+), 239 deletions(-)
merge bot Merged
#6 lore raw

Re: [GIT PULL 03/12 for v7.1] vfs directory

The pull request you sent on Fri, 10 Apr 2026 17:16:51 +0200:

The pull request you sent on Fri, 10 Apr 2026 17:16:51 +0200:

Quoted 1 line

[email protected]:pub/scm/linux/kernel/git/vfs/vfs tags/vfs-7.1-rc1.directory

has been merged into torvalds/linux.git:
https://git.kernel.org/torvalds/c/3383589700ea1c196f05b164d2b6c15269b6e9e4

Thank you!

Signature · 2 lines
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/prtracker.html
author maintainer
#7 lore raw

[GIT PULL 04/12 for v7.1] vfs integrity

In reply to Christian Brauner

Hey Linus,

/* Summary */

This adds support to generate and verify integrity information (aka T10 PI) in the file system, instead of the automatic below the covers support that is currently used.

The implementation is based on refactoring the existing block layer PI code to be reusable for this use case, and then adding relatively small wrappers for the file system use case. These are then used in iomap to implement the semantics, and wired up in XFS with a small amount of glue code.

Compared to the baseline this does not change performance for writes, but increases read performance up to 15% for 4k I/O, with the benefit decreasing with larger I/O sizes as even the baseline maxes out the device quickly on my older enterprise SSD.

/* 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
=============================

fs/iomap/bio.c +0 -0
diff --cc fs/iomap/bio.c
index edd908183058,f989ffcaac96..000000000000
@@@ -8,66 -9,33 +9,77 @@@
  #include "internal.h"
  #include "trace.h"

+static DEFINE_SPINLOCK(failed_read_lock); +static struct bio_list failed_read_list = BIO_EMPTY_LIST; +
- static void __iomap_read_end_io(struct bio *bio)
+ static u32 __iomap_read_end_io(struct bio *bio, int error) {

-       int error = blk_status_to_errno(bio->bi_status);
        struct folio_iter fi;

+ u32 folio_count = 0;

- bio_for_each_folio_all(fi, bio)

+       bio_for_each_folio_all(fi, bio) {
                iomap_finish_folio_read(fi.folio, fi.offset, fi.length, error);
+               folio_count++;
+       }
+       if (bio_integrity(bio))
+               fs_bio_integrity_free(bio);
        bio_put(bio);

+ return folio_count;
}

+static void
+iomap_fail_reads(
+ struct work_struct *work)
+{

 +      struct bio              *bio;
 +      struct bio_list         tmp = BIO_EMPTY_LIST;
 +      unsigned long           flags;
 +
 +      spin_lock_irqsave(&failed_read_lock, flags);
 +      bio_list_merge_init(&tmp, &failed_read_list);
 +      spin_unlock_irqrestore(&failed_read_lock, flags);
 +
 +      while ((bio = bio_list_pop(&tmp)) != NULL) {
-               __iomap_read_end_io(bio);
++              __iomap_read_end_io(bio, blk_status_to_errno(bio->bi_status));
 +              cond_resched();
 +      }
 +}
 +
 +static DECLARE_WORK(failed_read_work, iomap_fail_reads);
 +
 +static void iomap_fail_buffered_read(struct bio *bio)
 +{
 +      unsigned long flags;
 +
 +      /*
 +       * Bounce I/O errors to a workqueue to avoid nested i_lock acquisitions
 +       * in the fserror code.  The caller no longer owns the bio reference
 +       * after the spinlock drops.
 +       */

+ spin_lock_irqsave(&failed_read_lock, flags);
+ if (bio_list_empty(&failed_read_list))
+ WARN_ON_ONCE(!schedule_work(&failed_read_work));
+ bio_list_add(&failed_read_list, bio);
+ spin_unlock_irqrestore(&failed_read_lock, flags);
+}
+
static void iomap_read_end_io(struct bio *bio)
{
- __iomap_read_end_io(bio, blk_status_to_errno(bio->bi_status));
+ if (bio->bi_status) {
+ iomap_fail_buffered_read(bio);
+ return;
+ }
+
- __iomap_read_end_io(bio);
++ __iomap_read_end_io(bio, 0);
+ }
+
+ u32 iomap_finish_ioend_buffered_read(struct iomap_ioend *ioend)
+ {
+ return __iomap_read_end_io(&ioend->io_bio, ioend->io_error);
}

- static void iomap_bio_submit_read(struct iomap_read_folio_ctx *ctx)
+ static void iomap_bio_submit_read(const struct iomap_iter *iter,
+ struct iomap_read_folio_ctx *ctx)

  {
        struct bio *bio = ctx->read_ctx;

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

The following changes since commit 1f318b96cc84d7c2ab792fcc0bfd42a7ca890681:

Linux 7.0-rc3 (2026-03-08 16:56:54 -0700)

are available in the Git repository at:

[email protected]:pub/scm/linux/kernel/git/vfs/vfs tags/vfs-7.1-rc1.integrity

for you to fetch changes up to 1b63f91d1c9013629fb2005ace48b7aeead32330:

Merge patch series "support file system generated / verified integrity information v4" (2026-03-10 10:29:18 +0100)

----------------------------------------------------------------
vfs-7.1-rc1.integrity

Please consider pulling these changes from the signed vfs-7.1-rc1.integrity tag.

Thanks!
Christian

----------------------------------------------------------------
Christian Brauner (2):
Merge branch 'for-7.1/block-integrity'
Merge patch series "support file system generated / verified integrity information v4"

Christoph Hellwig (16):
block: factor out a bio_integrity_action helper
block: factor out a bio_integrity_setup_default helper
block: add a bdev_has_integrity_csum helper
block: prepare generation / verification helpers for fs usage
block: make max_integrity_io_size public
block: add fs_bio_integrity helpers
block: pass a maxlen argument to bio_iov_iter_bounce
iomap: refactor iomap_bio_read_folio_range
iomap: pass the iomap_iter to ->submit_read
iomap: only call into ->submit_read when there is a read_ctx
iomap: allow file systems to hook into buffered read bio submission
ntfs3: remove copy and pasted iomap code
iomap: add a bioset pointer to iomap_read_folio_ops
iomap: support ioends for buffered reads
iomap: support T10 protection information
xfs: support T10 protection information

 block/Makefile                |   2 +-
 block/bio-integrity-auto.c    |  80 ++++---------------------
 block/bio-integrity-fs.c      |  81 +++++++++++++++++++++++++
 block/bio-integrity.c         |  64 ++++++++++++++++++++
 block/bio.c                   |  17 +++---
 block/blk-mq.c                |   6 +-
 block/blk-settings.c          |  13 ----
 block/blk.h                   |   6 +-
 block/t10-pi.c                |  12 ++--
 drivers/nvdimm/btt.c          |   6 +-
 fs/fuse/file.c                |   5 +-
 fs/iomap/bio.c                | 135 ++++++++++++++++++++++++++++--------------
 fs/iomap/buffered-io.c        |   8 +--
 fs/iomap/direct-io.c          |  15 ++++-
 fs/iomap/internal.h           |  14 +++++
 fs/iomap/ioend.c              |  30 ++++++++--
 fs/ntfs3/inode.c              |  57 ++----------------
 fs/xfs/xfs_aops.c             |  47 +++++++++++++--
 fs/xfs/xfs_iomap.c            |   9 ++-
 include/linux/bio-integrity.h |  12 +++-
 include/linux/bio.h           |   2 +-
 include/linux/blk-integrity.h |  28 +++++++--
 include/linux/blkdev.h        |  34 +++++++++--
 include/linux/iomap.h         |  20 ++++++-
 24 files changed, 470 insertions(+), 233 deletions(-)
 create mode 100644 block/bio-integrity-fs.c
merge bot Merged
#8 lore raw

Re: [GIT PULL 04/12 for v7.1] vfs integrity

The pull request you sent on Fri, 10 Apr 2026 17:17:13 +0200:

The pull request you sent on Fri, 10 Apr 2026 17:17:13 +0200:

Quoted 1 line

[email protected]:pub/scm/linux/kernel/git/vfs/vfs tags/vfs-7.1-rc1.integrity

has been merged into torvalds/linux.git:
https://git.kernel.org/torvalds/c/0f00132132937ca01a99feaf8985109a9087c9ff

Thank you!

Signature · 2 lines
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/prtracker.html
author maintainer
#9 lore raw

[GIT PULL 05/12 for v7.1] vfs fs_struct

In reply to Christian Brauner

Hey Linus,

/* Summary */

Avoid excessive dput/dget in audit_context setup and reset paths When the audit subsystem is enabled, it can do a lot of get_fs_pwd() calls to get references to fs->pwd and then releasing those references back with path_put() later. That may cause a lot of spinlock contention on a single pwd's dentry lock because of the constant changes to the reference count when there are many processes on the same working directory actively doing open/close system calls. This can cause noticeable performance regresssion when compared with the case where the audit subsystem is turned off especially on systems with a lot of CPUs which is becoming more common these days.

Avoid this type of performance regression caused by audit by adding a new set of fs_struct helpers to reduce unncessary path_get() and path_put() calls and the audit code is modified to use these new 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
================================

The following changes since commit 1f318b96cc84d7c2ab792fcc0bfd42a7ca890681:

Linux 7.0-rc3 (2026-03-08 16:56:54 -0700)

are available in the Git repository at:

[email protected]:pub/scm/linux/kernel/git/vfs/vfs tags/vfs-7.1-rc1.fs_struct

for you to fetch changes up to 9eecc28ec595bfc0a8af3306b57f566027b3560c:

fs: factor out get_fs_pwd_pool_locked() for lock-held callers (2026-03-12 13:41:45 +0100)

----------------------------------------------------------------
vfs-7.1-rc1.fs_struct

Please consider pulling these changes from the signed vfs-7.1-rc1.fs_struct tag.

Thanks!
Christian

----------------------------------------------------------------
Christian Brauner (5):
Merge patch series "fs, audit: Avoid excessive dput/dget in audit_context setup and reset paths"
fs: use path_equal() in fs_struct helpers
fs: document seqlock usage in pwd pool APIs
fs: add drain_fs_pwd_pool() helper
fs: factor out get_fs_pwd_pool_locked() for lock-held callers

Waiman Long (2):
fs: Add a pool of extra fs->pwd references to fs_struct
audit: Use the new {get,put}_fs_pwd_pool() APIs to get/put pwd references

 fs/fs_struct.c            | 34 ++++++++++++++++++++++++++++------
 fs/namespace.c            | 10 ++++++++++
 include/linux/fs_struct.h | 43 ++++++++++++++++++++++++++++++++++++++++++-
 kernel/auditsc.c          |  7 +++++--
 4 files changed, 85 insertions(+), 9 deletions(-)
#10 lore raw

Re: [GIT PULL 05/12 for v7.1] vfs fs_struct

Quoted 2 lines · Christian Brauner

Avoid excessive dput/dget in audit_context setup and reset paths

I really don't like this one, and I'm going to at least delay pulling it.

Because this really feels wrong to me. It feels like a hack. Just looking at some of the paths that get modified, we have that copy_fs_struct, which does

        path_get(&fs->root);

to increment the root, and then the very next line ends up being

        get_fs_pwd_pool_locked(old, &fs->pwd);

that copies the pwd very differently.

And the only reason 'pwd' is different is because the audit code treats pwd and root differently.

And that, in turn, is because the audit code is just historical and broken, and can't deal with chroot environments.

The pwd and root paths are two sides of the same coin, and any code that treats them this differently is *wrong*.

So this basically takes a audit mistake, and makes that mistake visible to non-audit users.

I absolutely hate it.

I'm going to think about this more, and maybe I'll end up saying "it's still ugly, but whatever, I'll pull it anyway".

But right now I'm going "there HAS to be a better way".

And maybe you can convince me this hackery is the right thing, but it really is rubbing me the wrong way entirely.

The hackery is evident everywhere. Like that

        /* Release the extra pwd references of new_fs, if present. */
        while (new_fs && new_fs->pwd_refs) {
                path_put(&new_fs->pwd);
                new_fs->pwd_refs--;
        }

because it's obviously too painful to switch everything over to having a "decrement by more than one", and this codepath is simply not *worth* the pain, because it's just for a stupid audit special case that is largely historical.

So I see why this all is done, but at the same time it realy strikes me as being very very ugly.

No, I don't have a solution.

My gut feel is that

(a) audit is wrong to begin with to think that only 'pwd' is special
and that root is always printed as NULL

(b) audit should not be taking a ref 'struct path' in the first
place, but to 'struct fs_struct'.

Again, treating 'pwd' differently from root is a fundamental mistake. Always was. The only difference between the two is whether you had '/' at the beginning of a path or not (and the trivial 'different system calls to set them').

But as long as it was a mistake just inside the audit path, who cares?

But with this pull it's just broken garbage escaping outside those confines.

So for example, I'd be a *lot* happier with some kind of "borrow the whole 'struct fs_struct'" model, where audit gets a new "borrow reference" to the whole struct, and then the places that actually change 'struct fs_struct' would create a copy of it and replace any pending audit users with that copy.

There are exactly three such places that change it, all right next to each other: set_fs_root(), set_fs_pwd() and chroot_fs_refs().

And we already have the lock that protects all this (fs->seq), and we could add a new 'struct audit_borrow_struct" that audit uses, which has a pointer to the 'struct fs_struct',

And then audit would borrow the whole thing, we'd keep a list of current borrowers and unborrow it at the end, and absolutely *NOTHING* would change in the core path handling.

The couple of places that change 'struct fs_struct' could then just look at the list of borrowers synchronize them (create a new fake 'struct fs_struct' just for them, and maybe increment refs at *that* point).

And it would actually *improve* on the audit code, because now audit would at least *have* the 'root' path too, even though it obviously doesn't use it and always thinks root is a global root thing.

And no, nobody would ever bother to fix audit, but at least _conceptually_ it would set the infrastructure for the audit paths getting this right.

Yes, yes, the above is very very handwavy and I didn't write the code, and possibly the rantings of an insane person.

I didn't think a *lot* about this. I just looked at this patch series and threw up in my mouth a little, and tried to think of "maybe we could do it differently" and the above is a rough draft of something that might work.

Please? Humor me and think about it, at least.

Linus

author maintainer
#11 lore raw

Re: [GIT PULL 05/12 for v7.1] vfs fs_struct

Quoted 5 lines · Linus Torvalds
Quoted 2 lines · Christian Brauner

Avoid excessive dput/dget in audit_context setup and reset paths

I really don't like this one, and I'm going to at least delay pulling it.

I don't like it either.

Quoted 1 line

Because this really feels wrong to me. It feels like a hack. Just

It is. I commented on that explicitly when the series was proposed.

Quoted 23 lines

looking at some of the paths that get modified, we have that copy_fs_struct, which does

        path_get(&fs->root);

to increment the root, and then the very next line ends up being

        get_fs_pwd_pool_locked(old, &fs->pwd);

that copies the pwd very differently.

And the only reason 'pwd' is different is because the audit code treats pwd and root differently.

And that, in turn, is because the audit code is just historical and broken, and can't deal with chroot environments.

The pwd and root paths are two sides of the same coin, and any code that treats them this differently is *wrong*.

So this basically takes a audit mistake, and makes that mistake visible to non-audit users.

Quoted 8 lines

I absolutely hate it.

I'm going to think about this more, and maybe I'll end up saying "it's still ugly, but whatever, I'll pull it anyway".

But right now I'm going "there HAS to be a better way".

And maybe you can convince me this hackery is the right thing, but it

It isn't and I'm not going to try.

Quoted 1 line

really is rubbing me the wrong way entirely.

I'm sorry I can't offer more than agreement with you right now. The only reason I considered it was that my appetetite for audit internals is very very low but tbh that shouldn't have led me to accept the hackishness. So again, no long-winded argument from me here... I droped this from the other pr. The CI is still running then I'll resend.

author maintainer
#12 lore raw

[GIT PULL 06/12 for v7.1] vfs kino

In reply to Christian Brauner

Hey Linus,

/* Summary */

For historical reasons, the inode->i_ino field is an unsigned long, which means that it's 32 bits on 32 bit architectures. This has caused a number of filesystems to implement hacks to hash a 64-bit identifier into a 32-bit field, and deprives us of a universal identifier field for an inode.

The work in this pr changes the inode->i_ino field from an unsigned long to a u64. This shouldn't make any material difference on 64-bit hosts, but 32-bit hosts will see struct inode grow by at least 4 bytes. This could have effects on slabcache sizes and field alignment.

The bulk of the changes are to format strings and tracepoints, since the kernel itself doesn't care that much about the i_ino field. The first patch changes some vfs function arguments, so check that one out carefully.

With this change, we may be able to shrink some inode structures. For instance, struct nfs_inode has a fileid field that holds the 64-bit inode number. With this set of changes, that field could be eliminated. I'd rather leave that sort of cleanups for later just to keep this simple.

/* 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/CAHC9VhRndi9kMUNQFA9J1exr2G0uQ-A-wKDqJLhUntMYdnUrsQ@mail.gmail.com

The following changes since commit 6de23f81a5e08be8fbf5e8d7e9febc72a5b5f27f:

Linux 7.0-rc1 (2026-02-22 13:18:59 -0800)

are available in the Git repository at:

[email protected]:pub/scm/linux/kernel/git/vfs/vfs tags/vfs-7.1-rc1.kino

for you to fetch changes up to 2e43ca1a4f949e4beb763f8196695da02b17bd77:

Merge patch series "vfs: follow-on fixes for i_ino widening" (2026-03-17 15:38:54 +0100)

----------------------------------------------------------------
vfs-7.1-rc1.kino

Please consider pulling these changes from the signed vfs-7.1-rc1.kino tag.

Thanks!
Christian

----------------------------------------------------------------
Christian Brauner (4):
Merge patch series "vfs: change inode->i_ino from unsigned long to u64"
ext4: fix signed format specifier in ext4_load_inode trace event
treewide: fix missed i_ino format specifier conversions Merge patch series "vfs: follow-on fixes for i_ino widening"

Jeff Layton (15):
vfs: widen inode hash/lookup functions to u64
audit: widen ino fields to u64
net: change sock.sk_ino and sock_i_ino() to u64
vfs: widen trace event i_ino fields to u64
cachefiles: widen trace event i_ino fields to u64
ext2: widen trace event i_ino fields to u64
hugetlbfs: widen trace event i_ino fields to u64
zonefs: widen trace event i_ino fields to u64
ext4: widen trace event i_ino fields to u64
f2fs: widen trace event i_ino fields to u64
nilfs2: widen trace event i_ino fields to u64
treewide: change inode->i_ino from unsigned long to u64
vfs: remove externs from fs.h on functions modified by i_ino widening
EVM: add comment describing why ino field is still unsigned long
nilfs2: fix 64-bit division operations in nilfs_bmap_find_target_in_group()

 drivers/dma-buf/dma-buf.c                  |   2 +-
 drivers/gpu/drm/amd/amdgpu/amdgpu_object.c |   4 +-
 fs/9p/vfs_addr.c                           |   4 +-
 fs/9p/vfs_inode.c                          |   6 +-
 fs/9p/vfs_inode_dotl.c                     |   6 +-
 fs/affs/amigaffs.c                         |  10 +-
 fs/affs/bitmap.c                           |   2 +-
 fs/affs/dir.c                              |   2 +-
 fs/affs/file.c                             |  20 +-
 fs/affs/inode.c                            |  12 +-
 fs/affs/namei.c                            |  14 +-
 fs/affs/symlink.c                          |   2 +-
 fs/afs/dir.c                               |  10 +-
 fs/afs/dir_search.c                        |   2 +-
 fs/afs/dynroot.c                           |   2 +-
 fs/afs/inode.c                             |   2 +-
 fs/autofs/inode.c                          |   2 +-
 fs/befs/linuxvfs.c                         |  28 +-
 fs/bfs/dir.c                               |   4 +-
 fs/binfmt_elf_fdpic.c                      |   2 +-
 fs/cachefiles/io.c                         |   6 +-
 fs/cachefiles/namei.c                      |  12 +-
 fs/cachefiles/xattr.c                      |   2 +-
 fs/ceph/crypto.c                           |   4 +-
 fs/coda/dir.c                              |   2 +-
 fs/coda/inode.c                            |   2 +-
 fs/cramfs/inode.c                          |   2 +-
 fs/crypto/crypto.c                         |   2 +-
 fs/crypto/hooks.c                          |   2 +-
 fs/crypto/keyring.c                        |   4 +-
 fs/crypto/keysetup.c                       |   2 +-
 fs/dcache.c                                |   4 +-
 fs/ecryptfs/crypto.c                       |   6 +-
 fs/ecryptfs/file.c                         |   2 +-
 fs/efs/inode.c                             |   6 +-
 fs/eventpoll.c                             |   2 +-
 fs/exportfs/expfs.c                        |   4 +-
 fs/ext2/dir.c                              |  10 +-
 fs/ext2/ialloc.c                           |   9 +-
 fs/ext2/inode.c                            |   2 +-
 fs/ext2/trace.h                            |   8 +-
 fs/ext2/xattr.c                            |  16 +-
 fs/ext4/dir.c                              |   2 +-
 fs/ext4/ext4.h                             |   4 +-
 fs/ext4/extents.c                          |   8 +-
 fs/ext4/extents_status.c                   |  28 +-
 fs/ext4/fast_commit.c                      |   8 +-
 fs/ext4/ialloc.c                           |  10 +-
 fs/ext4/indirect.c                         |   2 +-
 fs/ext4/inline.c                           |  14 +-
 fs/ext4/inode.c                            |  22 +-
 fs/ext4/ioctl.c                            |   4 +-
 fs/ext4/mballoc.c                          |   6 +-
 fs/ext4/migrate.c                          |   2 +-
 fs/ext4/move_extent.c                      |  20 +-
 fs/ext4/namei.c                            |  10 +-
 fs/ext4/orphan.c                           |  16 +-
 fs/ext4/page-io.c                          |  10 +-
 fs/ext4/super.c                            |  22 +-
 fs/ext4/xattr.c                            |  10 +-
 fs/f2fs/compress.c                         |   4 +-
 fs/f2fs/dir.c                              |   2 +-
 fs/f2fs/extent_cache.c                     |   8 +-
 fs/f2fs/f2fs.h                             |   6 +-
 fs/f2fs/file.c                             |  12 +-
 fs/f2fs/gc.c                               |   2 +-
 fs/f2fs/inline.c                           |   4 +-
 fs/f2fs/inode.c                            |  48 +--
 fs/f2fs/namei.c                            |   8 +-
 fs/f2fs/node.c                             |  12 +-
 fs/f2fs/recovery.c                         |  10 +-
 fs/f2fs/xattr.c                            |  10 +-
 fs/freevxfs/vxfs_bmap.c                    |   4 +-
 fs/fserror.c                               |   2 +-
 fs/hfs/catalog.c                           |   2 +-
 fs/hfs/extent.c                            |   4 +-
 fs/hfs/inode.c                             |   4 +-
 fs/hfsplus/attributes.c                    |  10 +-
 fs/hfsplus/catalog.c                       |   2 +-
 fs/hfsplus/dir.c                           |   6 +-
 fs/hfsplus/extents.c                       |   6 +-
 fs/hfsplus/inode.c                         |   8 +-
 fs/hfsplus/super.c                         |   6 +-
 fs/hfsplus/xattr.c                         |  10 +-
 fs/hpfs/dir.c                              |   4 +-
 fs/hpfs/dnode.c                            |   4 +-
 fs/hpfs/ea.c                               |   4 +-
 fs/hpfs/inode.c                            |   4 +-
 fs/inode.c                                 |  49 ++-
 fs/iomap/ioend.c                           |   2 +-
 fs/iomap/trace.h                           |   8 +-
 fs/isofs/compress.c                        |   2 +-
 fs/isofs/dir.c                             |   2 +-
 fs/isofs/inode.c                           |   8 +-
 fs/isofs/namei.c                           |   2 +-
 fs/jbd2/journal.c                          |   4 +-
 fs/jbd2/transaction.c                      |   2 +-
 fs/jffs2/dir.c                             |   4 +-
 fs/jffs2/file.c                            |   4 +-
 fs/jffs2/fs.c                              |  18 +-
 fs/jfs/inode.c                             |   2 +-
 fs/jfs/jfs_imap.c                          |   2 +-
 fs/jfs/jfs_metapage.c                      |   2 +-
 fs/lockd/svclock.c                         |   8 +-
 fs/lockd/svcsubs.c                         |   2 +-
 fs/locks.c                                 |   6 +-
 fs/minix/inode.c                           |  10 +-
 fs/nfs/dir.c                               |  20 +-
 fs/nfs/file.c                              |   8 +-
 fs/nfs/filelayout/filelayout.c             |   8 +-
 fs/nfs/flexfilelayout/flexfilelayout.c     |   8 +-
 fs/nfs/inode.c                             |   6 +-
 fs/nfs/nfs4proc.c                          |   4 +-
 fs/nfs/pnfs.c                              |  12 +-
 fs/nfsd/export.c                           |   2 +-
 fs/nfsd/nfs4state.c                        |   4 +-
 fs/nfsd/nfsfh.c                            |   4 +-
 fs/nfsd/vfs.c                              |   2 +-
 fs/nilfs2/alloc.c                          |  10 +-
 fs/nilfs2/bmap.c                           |  17 +-
 fs/nilfs2/btnode.c                         |   2 +-
 fs/nilfs2/btree.c                          |  12 +-
 fs/nilfs2/dir.c                            |  12 +-
 fs/nilfs2/direct.c                         |   4 +-
 fs/nilfs2/gcinode.c                        |   2 +-
 fs/nilfs2/inode.c                          |   8 +-
 fs/nilfs2/mdt.c                            |   2 +-
 fs/nilfs2/namei.c                          |   2 +-
 fs/nilfs2/segment.c                        |   2 +-
 fs/notify/fdinfo.c                         |   4 +-
 fs/nsfs.c                                  |   4 +-
 fs/ntfs3/super.c                           |   2 +-
 fs/ocfs2/alloc.c                           |   2 +-
 fs/ocfs2/aops.c                            |   4 +-
 fs/ocfs2/dir.c                             |   8 +-
 fs/ocfs2/dlmfs/dlmfs.c                     |  10 +-
 fs/ocfs2/extent_map.c                      |  12 +-
 fs/ocfs2/inode.c                           |   2 +-
 fs/ocfs2/quota_local.c                     |   2 +-
 fs/ocfs2/refcounttree.c                    |  10 +-
 fs/ocfs2/xattr.c                           |   4 +-
 fs/orangefs/inode.c                        |   2 +-
 fs/overlayfs/export.c                      |   2 +-
 fs/overlayfs/namei.c                       |   4 +-
 fs/overlayfs/util.c                        |   2 +-
 fs/pipe.c                                  |   2 +-
 fs/proc/fd.c                               |   2 +-
 fs/proc/task_mmu.c                         |   4 +-
 fs/qnx4/inode.c                            |   4 +-
 fs/qnx6/inode.c                            |   2 +-
 fs/ubifs/debug.c                           |   8 +-
 fs/ubifs/dir.c                             |  28 +-
 fs/ubifs/file.c                            |  28 +-
 fs/ubifs/journal.c                         |   6 +-
 fs/ubifs/super.c                           |  16 +-
 fs/ubifs/tnc.c                             |   4 +-
 fs/ubifs/xattr.c                           |  14 +-
 fs/udf/directory.c                         |  18 +-
 fs/udf/file.c                              |   2 +-
 fs/udf/inode.c                             |  12 +-
 fs/udf/namei.c                             |   8 +-
 fs/udf/super.c                             |   2 +-
 fs/ufs/balloc.c                            |   6 +-
 fs/ufs/dir.c                               |  10 +-
 fs/ufs/ialloc.c                            |   6 +-
 fs/ufs/inode.c                             |  18 +-
 fs/ufs/ufs_fs.h                            |   6 +-
 fs/ufs/util.c                              |   2 +-
 fs/verity/init.c                           |   2 +-
 fs/zonefs/super.c                          |   8 +-
 fs/zonefs/trace.h                          |  18 +-
 include/linux/audit.h                      |   2 +-
 include/linux/fs.h                         |  88 +++--
 include/net/sock.h                         |   4 +-
 include/trace/events/cachefiles.h          |  18 +-
 include/trace/events/ext4.h                | 544 ++++++++++++++---------------
 include/trace/events/f2fs.h                | 242 ++++++-------
 include/trace/events/filelock.h            |  34 +-
 include/trace/events/filemap.h             |  20 +-
 include/trace/events/fs_dax.h              |  20 +-
 include/trace/events/fsverity.h            |  30 +-
 include/trace/events/hugetlbfs.h           |  42 +--
 include/trace/events/netfs.h               |   8 +-
 include/trace/events/nilfs2.h              |  12 +-
 include/trace/events/readahead.h           |  18 +-
 include/trace/events/timestamp.h           |  16 +-
 include/trace/events/writeback.h           | 162 ++++-----
 kernel/audit.h                             |  13 +-
 kernel/audit_fsnotify.c                    |   4 +-
 kernel/audit_watch.c                       |  12 +-
 kernel/auditsc.c                           |   4 +-
 kernel/events/uprobes.c                    |   4 +-
 net/ax25/af_ax25.c                         |   2 +-
 net/bluetooth/af_bluetooth.c               |   4 +-
 net/can/bcm.c                              |   2 +-
 net/ipv4/ping.c                            |   2 +-
 net/ipv4/raw.c                             |   2 +-
 net/ipv4/tcp_ipv4.c                        |   2 +-
 net/ipv4/udp.c                             |   2 +-
 net/ipv6/datagram.c                        |   2 +-
 net/ipv6/tcp_ipv6.c                        |   2 +-
 net/key/af_key.c                           |   2 +-
 net/netlink/af_netlink.c                   |   2 +-
 net/netlink/diag.c                         |   2 +-
 net/netrom/af_netrom.c                     |   4 +-
 net/packet/af_packet.c                     |   2 +-
 net/packet/diag.c                          |   2 +-
 net/phonet/socket.c                        |   4 +-
 net/rose/af_rose.c                         |   4 +-
 net/sctp/proc.c                            |   4 +-
 net/socket.c                               |   2 +-
 net/unix/af_unix.c                         |   2 +-
 net/unix/diag.c                            |   6 +-
 net/x25/x25_proc.c                         |   4 +-
 net/xdp/xsk_diag.c                         |   2 +-
 security/apparmor/apparmorfs.c             |   4 +-
 security/integrity/evm/evm_crypto.c        |   6 +
 security/integrity/integrity_audit.c       |   2 +-
 security/ipe/audit.c                       |   2 +-
 security/lsm_audit.c                       |  10 +-
 security/selinux/hooks.c                   |  10 +-
 security/smack/smack_lsm.c                 |  12 +-
 222 files changed, 1331 insertions(+), 1321 deletions(-)
merge bot Merged
#13 lore raw

Re: [GIT PULL 06/12 for v7.1] vfs kino

The pull request you sent on Fri, 10 Apr 2026 17:18:42 +0200:

The pull request you sent on Fri, 10 Apr 2026 17:18:42 +0200:

Quoted 1 line

[email protected]:pub/scm/linux/kernel/git/vfs/vfs tags/vfs-7.1-rc1.kino

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

Thank you!

Signature · 2 lines
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/prtracker.html
author maintainer
#14 lore raw

[GIT PULL 07/12 for v7.1] vfs fat

In reply to Christian Brauner

Hey Linus,

/* Summary */

This contains minor fixes for the fat filesystem.

/* 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
================================

The following changes since commit 1f318b96cc84d7c2ab792fcc0bfd42a7ca890681:

Linux 7.0-rc3 (2026-03-08 16:56:54 -0700)

are available in the Git repository at:

[email protected]:pub/scm/linux/kernel/git/vfs/vfs tags/vfs-7.1-rc1.fat

for you to fetch changes up to 94505767bd32f8a240cf3590776b16a12d75d98e:

fat: fix stack frame size warnings in KUnit tests (2026-03-26 14:36:03 +0100)

----------------------------------------------------------------
vfs-7.1-rc1.fat

Please consider pulling these changes from the signed vfs-7.1-rc1.fat tag.

Thanks!
Christian

----------------------------------------------------------------
Christian Brauner (1):
fat: fix stack frame size warnings in KUnit tests

avivdaum (1):
fat: add KUnit tests for timestamp conversion helpers

 fs/fat/fat_test.c | 181 +++++++++++++++++++++++++++++++++++++++++++++++++++---
 fs/fat/misc.c     |   2 +
 2 files changed, 175 insertions(+), 8 deletions(-)
merge bot Merged
#15 lore raw

Re: [GIT PULL 07/12 for v7.1] vfs fat

The pull request you sent on Fri, 10 Apr 2026 17:19:02 +0200:

The pull request you sent on Fri, 10 Apr 2026 17:19:02 +0200:

Quoted 1 line

[email protected]:pub/scm/linux/kernel/git/vfs/vfs tags/vfs-7.1-rc1.fat

has been merged into torvalds/linux.git:
https://git.kernel.org/torvalds/c/2802f9407299c8e17bb8e1311e2ea7816f550649

Thank you!

Signature · 2 lines
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/prtracker.html
author maintainer
#16 lore raw

[GIT PULL 08/12 for v7.1] vfs bh metadata

In reply to Christian Brauner

Hey Linus,

/* Summary */

The work in this pr cleans up the mess that has accumulated over the years in metadata buffer_head tracking for inodes, moves the tracking into dedicated structure in filesystem-private part of the inode (so that we don't use private_list, private_data, and private_lock in struct address_space), and also moves couple other users of private_data and private_list so these are removed from struct address_space saving 3 longs in struct inode for 99% of inodes.

/* 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
=============================

fs/ext4/fsync.c +0 -0
diff --cc fs/ext4/fsync.c
index bd8f230fa507,aa80af2b4eea..000000000000
@@@ -83,23 -83,12 +83,23 @@@ static int ext4_fsync_nojournal(struct
                                int datasync, bool *needs_barrier)
  {
        struct inode *inode = file->f_inode;
 +      struct writeback_control wbc = {
 +              .sync_mode = WB_SYNC_ALL,
 +              .nr_to_write = 0,
 +      };
        int ret;

- ret = generic_buffers_fsync_noflush(file, start, end, datasync);
+ ret = mmb_fsync_noflush(file, &EXT4_I(inode)->i_metadata_bhs,
+ start, end, datasync);
- if (!ret)
- ret = ext4_sync_parent(inode);
+ if (ret)
+ return ret;
+

 +      /* Force writeout of inode table buffer to disk */
 +      ret = ext4_write_inode(inode, &wbc);
 +      if (ret)

+ return ret;
+
+ ret = ext4_sync_parent(inode);
-

        if (test_opt(inode->i_sb, BARRIER))
                *needs_barrier = true;

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

[1]: https://lore.kernel.org/linux-next/[email protected]
[2]: https://lore.kernel.org/linux-next/[email protected]

The following changes since commit 1f318b96cc84d7c2ab792fcc0bfd42a7ca890681:

Linux 7.0-rc3 (2026-03-08 16:56:54 -0700)

are available in the Git repository at:

[email protected]:pub/scm/linux/kernel/git/vfs/vfs tags/vfs-7.1-rc1.bh.metadata

for you to fetch changes up to 6e22726900ea54d72cbc6f053c0fa581de023de6:

Merge patch series "fs: Move metadata bh tracking from address_space" (2026-03-26 15:03:38 +0100)

----------------------------------------------------------------
vfs-7.1-rc1.bh.metadata

Please consider pulling these changes from the signed vfs-7.1-rc1.bh.metadata tag.

Thanks!
Christian

----------------------------------------------------------------
Christian Brauner (1):
Merge patch series "fs: Move metadata bh tracking from address_space"

Jan Kara (42):
ext4: Use inode_has_buffers()
gfs2: Don't zero i_private_data
ntfs3: Drop pointless sync_mapping_buffers() and invalidate_inode_buffers() calls
ocfs2: Drop pointless sync_mapping_buffers() calls
bdev: Drop pointless invalidate_inode_buffers() call
ufs: Drop pointless invalidate_mapping_buffers() call
exfat: Drop pointless invalidate_inode_buffers() call
fs: Remove inode lock from __generic_file_fsync()
udf: Switch to generic_buffers_fsync()
minix: Switch to generic_buffers_fsync()
bfs: Switch to generic_buffers_fsync()
fat: Switch to generic_buffers_fsync_noflush()
fs: Drop sync_mapping_buffers() from __generic_file_fsync()
fs: Rename generic_file_fsync() to simple_fsync()
fat: Sync and invalidate metadata buffers from fat_evict_inode()
udf: Sync and invalidate metadata buffers from udf_evict_inode()
minix: Sync and invalidate metadata buffers from minix_evict_inode()
ext2: Sync and invalidate metadata buffers from ext2_evict_inode()
ext4: Sync and invalidate metadata buffers from ext4_evict_inode()
bfs: Sync and invalidate metadata buffers from bfs_evict_inode()
affs: Sync and invalidate metadata buffers from affs_evict_inode()
fs: Ignore inode metadata buffers in inode_lru_isolate()
fs: Stop using i_private_data for metadata bh tracking
hugetlbfs: Stop using i_private_data
aio: Stop using i_private_data and i_private_lock
fs: Remove i_private_data
kvm: Use private inode list instead of i_private_list
fs: Drop osync_buffers_list()
fs: Fold fsync_buffers_list() into sync_mapping_buffers()
fs: Move metadata bhs tracking to a separate struct
fs: Make bhs point to mapping_metadata_bhs
fs: Switch inode_has_buffers() to take mapping_metadata_bhs
fs: Provide functions for handling mapping_metadata_bhs directly
ext2: Track metadata bhs in fs-private inode part
affs: Track metadata bhs in fs-private inode part
bfs: Track metadata bhs in fs-private inode part
fat: Track metadata bhs in fs-private inode part
udf: Track metadata bhs in fs-private inode part
minix: Track metadata bhs in fs-private inode part
ext4: Track metadata bhs in fs-private inode part
fs: Drop mapping_metadata_bhs from address space
fs: Drop i_private_list from address_space

 block/bdev.c                |   8 -
 fs/adfs/dir.c               |   2 +-
 fs/adfs/file.c              |   2 +-
 fs/affs/affs.h              |   2 +
 fs/affs/amigaffs.c          |  12 +-
 fs/affs/file.c              |  25 +--
 fs/affs/inode.c             |  14 +-
 fs/affs/namei.c             |   9 +-
 fs/affs/super.c             |   1 +
 fs/aio.c                    |  78 ++++++--
 fs/bfs/bfs.h                |   1 +
 fs/bfs/dir.c                |  16 +-
 fs/bfs/inode.c              |   6 +-
 fs/buffer.c                 | 454 +++++++++++++++++---------------------------
 fs/exfat/file.c             |   2 +-
 fs/exfat/inode.c            |   1 -
 fs/ext2/ext2.h              |   1 +
 fs/ext2/file.c              |   6 +-
 fs/ext2/inode.c             |  17 +-
 fs/ext2/super.c             |   1 +
 fs/ext4/ext4.h              |   1 +
 fs/ext4/ext4_jbd2.c         |   3 +-
 fs/ext4/fsync.c             |   5 +-
 fs/ext4/inode.c             |   9 +-
 fs/ext4/super.c             |   4 +-
 fs/fat/dir.c                |  17 +-
 fs/fat/fat.h                |   1 +
 fs/fat/fatent.c             |  15 +-
 fs/fat/file.c               |   8 +-
 fs/fat/inode.c              |   7 +-
 fs/fat/namei_msdos.c        |   6 +-
 fs/fat/namei_vfat.c         |   2 +-
 fs/gfs2/glock.c             |   1 -
 fs/hugetlbfs/inode.c        |  11 +-
 fs/inode.c                  |  24 +--
 fs/libfs.c                  |  37 ++--
 fs/minix/dir.c              |   2 +-
 fs/minix/file.c             |  10 +-
 fs/minix/inode.c            |   6 +-
 fs/minix/itree_common.c     |  11 +-
 fs/minix/minix.h            |   3 +
 fs/ntfs3/file.c             |   3 -
 fs/ntfs3/inode.c            |   1 -
 fs/ocfs2/dlmglue.c          |   1 -
 fs/ocfs2/namei.c            |   3 -
 fs/omfs/file.c              |   2 +-
 fs/qnx4/dir.c               |   2 +-
 fs/qnx6/dir.c               |   2 +-
 fs/udf/dir.c                |   2 +-
 fs/udf/directory.c          |   5 +-
 fs/udf/file.c               |   9 +-
 fs/udf/inode.c              |  16 +-
 fs/udf/namei.c              |   2 +-
 fs/udf/super.c              |   1 +
 fs/udf/truncate.c           |   2 +-
 fs/udf/udf_i.h              |   1 +
 fs/udf/udfdecl.h            |   1 +
 fs/ufs/dir.c                |   2 +-
 fs/ufs/file.c               |   2 +-
 fs/ufs/inode.c              |   1 -
 include/linux/buffer_head.h |  29 ++-
 include/linux/fs.h          |  15 +-
 include/linux/hugetlb.h     |   1 +
 mm/hugetlb.c                |  10 +-
 virt/kvm/guest_memfd.c      |  12 +-
 65 files changed, 474 insertions(+), 492 deletions(-)
merge bot Merged
#17 lore raw

Re: [GIT PULL 08/12 for v7.1] vfs bh metadata

The pull request you sent on Fri, 10 Apr 2026 17:19:24 +0200:

The pull request you sent on Fri, 10 Apr 2026 17:19:24 +0200:

Quoted 1 line

[email protected]:pub/scm/linux/kernel/git/vfs/vfs tags/vfs-7.1-rc1.bh.metadata

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

Thank you!

Signature · 2 lines
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/prtracker.html
author maintainer
#18 lore raw

[GIT PULL 09/12 for v7.1] namespaces misc

In reply to Christian Brauner

Hey Linus,

/* Summary */

Add two simple helper macros for the namespace infrastructure.

/* 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
================================

The following changes since commit 1f318b96cc84d7c2ab792fcc0bfd42a7ca890681:

Linux 7.0-rc3 (2026-03-08 16:56:54 -0700)

are available in the Git repository at:

[email protected]:pub/scm/linux/kernel/git/vfs/vfs tags/namespaces-7.1-rc1.misc

for you to fetch changes up to 935a04923ad293cd89bf6ec23fc4efc9cf1a0142:

nsproxy: Add FOR_EACH_NS_TYPE() X-macro and CLONE_NS_ALL (2026-03-26 15:22:41 +0100)

----------------------------------------------------------------
namespaces-7.1-rc1.misc

Please consider pulling these changes from the signed namespaces-7.1-rc1.misc tag.

Thanks!
Christian

----------------------------------------------------------------
Mickaël Salaün (1):
nsproxy: Add FOR_EACH_NS_TYPE() X-macro and CLONE_NS_ALL

 include/linux/ns/ns_common_types.h | 44 +++++++++++++++++++++++++++++---------
 kernel/fork.c                      |  7 +++---
 kernel/nsproxy.c                   | 13 ++++-------
 3 files changed, 41 insertions(+), 23 deletions(-)
merge bot Merged
#19 lore raw

Re: [GIT PULL 09/12 for v7.1] namespaces misc

The pull request you sent on Fri, 10 Apr 2026 17:19:43 +0200:

The pull request you sent on Fri, 10 Apr 2026 17:19:43 +0200:

Quoted 1 line

[email protected]:pub/scm/linux/kernel/git/vfs/vfs tags/namespaces-7.1-rc1.misc

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

Thank you!

Signature · 2 lines
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/prtracker.html
author maintainer
#20 lore raw

[GIT PULL 10/12 for v7.1] vfs pidfs

In reply to Christian Brauner

Hey Linus,

/* Summary */

Add three new clone3() flags for pidfd-based process lifecycle management.

=== CLONE_AUTOREAP ===

CLONE_AUTOREAP makes a child process auto-reap on exit without ever becoming a zombie. This is a per-process property in contrast to the existing auto-reap mechanism via SA_NOCLDWAIT or SIG_IGN for SIGCHLD which applies to all children of a given parent.

Currently the only way to automatically reap children is to set SA_NOCLDWAIT or SIG_IGN on SIGCHLD. This is a parent-scoped property affecting all children which makes it unsuitable for libraries or applications that need selective auto-reaping of specific children while still being able to wait() on others.

CLONE_AUTOREAP stores an autoreap flag in the child's signal_struct. When the child exits do_notify_parent() checks this flag and causes exit_notify() to transition the task directly to EXIT_DEAD. Since the flag lives on the child it survives reparenting: if the original parent exits and the child is reparented to a subreaper or init the child still auto-reaps when it eventually exits. This is cleaner than forcing the subreaper to get SIGCHLD and then reaping it. If the parent doesn't care the subreaper won't care. If there's a subreaper that would care it would be easy enough to add a prctl() that either just turns back on SIGCHLD and turns off auto-reaping or a prctl() that just notifies the subreaper whenever a child is reparented to it.

CLONE_AUTOREAP can be combined with CLONE_PIDFD to allow the parent to monitor the child's exit via poll() and retrieve exit status via PIDFD_GET_INFO. Without CLONE_PIDFD it provides a fire-and-forget pattern. No exit signal is delivered so exit_signal must be zero. CLONE_THREAD and CLONE_PARENT are rejected: CLONE_THREAD because autoreap is a process-level property, and CLONE_PARENT because an autoreap child reparented via CLONE_PARENT could become an invisible zombie under a parent that never calls wait().

The flag is not inherited by the autoreap process's own children. Each child that should be autoreaped must be explicitly created with CLONE_AUTOREAP.

=== CLONE_NNP ===

CLONE_NNP sets no_new_privs on the child at clone time. Unlike prctl(PR_SET_NO_NEW_PRIVS) which a process sets on itself, CLONE_NNP allows the parent to impose no_new_privs on the child at creation without affecting the parent's own privileges. CLONE_THREAD is rejected because threads share credentials. CLONE_NNP is useful on its own for any spawn-and-sandbox pattern but was specifically introduced to enable unprivileged usage of CLONE_PIDFD_AUTOKILL.

=== CLONE_PIDFD_AUTOKILL ===

This flag ties a child's lifetime to the pidfd returned from clone3(). When the last reference to the struct file created by clone3() is closed the kernel sends SIGKILL to the child. A pidfd obtained via pidfd_open() for the same process does not keep the child alive and does not trigger autokill - only the specific struct file from clone3() has this property. This is useful for container runtimes, service managers, and sandboxed subprocess execution - any scenario where the child must die if the parent crashes or abandons the pidfd or just wants a throwaway helper process.

CLONE_PIDFD_AUTOKILL requires both CLONE_PIDFD and CLONE_AUTOREAP. It requires CLONE_PIDFD because the whole point is tying the child's lifetime to the pidfd. It requires CLONE_AUTOREAP because a killed child with no one to reap it would become a zombie - the primary use case is the parent crashing or abandoning the pidfd so no one is around to call waitpid(). CLONE_THREAD is rejected because autokill targets a process not a thread.

If CLONE_NNP is specified together with CLONE_PIDFD_AUTOKILL an unprivileged user may spawn a process that is autokilled. The child cannot escalate privileges via setuid/setgid exec after being spawned. If CLONE_PIDFD_AUTOKILL is specified without CLONE_NNP the caller must have have CAP_SYS_ADMIN in its user namespace.

/* 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
================================

The following changes since commit 6de23f81a5e08be8fbf5e8d7e9febc72a5b5f27f:

Linux 7.0-rc1 (2026-02-22 13:18:59 -0800)

are available in the Git repository at:

[email protected]:pub/scm/linux/kernel/git/vfs/vfs tags/vfs-7.1-rc1.pidfs

for you to fetch changes up to d29eb5f0ce674cfe71b93f8ff67dc0f66e6a9371:

Merge patch series "pidfds: add coredump_code field to pidfd_info" (2026-03-23 16:29:22 +0100)

----------------------------------------------------------------
vfs-7.1-rc1.pidfs

Please consider pulling these changes from the signed vfs-7.1-rc1.pidfs tag.

Thanks!
Christian

----------------------------------------------------------------
Christian Brauner (8):
clone: add CLONE_AUTOREAP
clone: add CLONE_NNP
pidfd: add CLONE_PIDFD_AUTOKILL
selftests/pidfd: add CLONE_AUTOREAP tests
selftests/pidfd: add CLONE_NNP tests
selftests/pidfd: add CLONE_PIDFD_AUTOKILL tests
Merge patch series "pidfd: add CLONE_AUTOREAP, CLONE_NNP, and CLONE_PIDFD_AUTOKILL" Merge patch series "pidfds: add coredump_code field to pidfd_info"

Emanuele Rocca (3):
kselftest/coredump: reintroduce null pointer dereference
pidfds: add coredump_code field to pidfd_info
selftests: check pidfd_info->coredump_code correctness

 fs/pidfs.c                                         |  50 +-
 include/linux/sched/signal.h                       |   1 +
 include/uapi/linux/pidfd.h                         |   5 +
 include/uapi/linux/sched.h                         |   7 +-
 kernel/fork.c                                      |  52 +-
 kernel/ptrace.c                                    |   3 +-
 kernel/signal.c                                    |   4 +
 .../coredump/coredump_socket_protocol_test.c       |  26 +
 .../selftests/coredump/coredump_socket_test.c      |  32 +
 .../selftests/coredump/coredump_test_helpers.c     |   6 +-
 tools/testing/selftests/pidfd/.gitignore           |   1 +
 tools/testing/selftests/pidfd/Makefile             |   2 +-
 tools/testing/selftests/pidfd/pidfd.h              |   5 +
 .../testing/selftests/pidfd/pidfd_autoreap_test.c  | 900 +++++++++++++++++++++
 tools/testing/selftests/pidfd/pidfd_info_test.c    |   1 +
 15 files changed, 1075 insertions(+), 20 deletions(-)
 create mode 100644 tools/testing/selftests/pidfd/pidfd_autoreap_test.c
merge bot Merged
#21 lore raw

Re: [GIT PULL 10/12 for v7.1] vfs pidfs

The pull request you sent on Fri, 10 Apr 2026 17:21:05 +0200:

The pull request you sent on Fri, 10 Apr 2026 17:21:05 +0200:

Quoted 1 line

[email protected]:pub/scm/linux/kernel/git/vfs/vfs tags/vfs-7.1-rc1.pidfs

has been merged into torvalds/linux.git:
https://git.kernel.org/torvalds/c/07c3ef58223e2c75ea209d8c416b976ec30d9413

Thank you!

Signature · 2 lines
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/prtracker.html
author maintainer
#22 lore raw

[GIT PULL 11/12 for v7.1] vfs mount

In reply to Christian Brauner

Hey Linus,

/* Summary */

* Add FSMOUNT_NAMESPACE flag to fsmount() that creates a new mount namespace with the newly created filesystem attached to a copy of the real rootfs. This returns a namespace file descriptor instead of an O_PATH mount fd, similar to how OPEN_TREE_NAMESPACE works for open_tree().

This allows creating a new filesystem and immediately placing it in a new mount namespace in a single operation, which is useful for container runtimes and other namespace-based isolation mechanisms.

This accompanies OPEN_TREE_NAMESPACE and avoids a needless detour via OPEN_TREE_NAMESPACE to get the same effect. Will be especially useful when you mount an actual filesystem to be used as the container rootfs.

* Currently, creating a new mount namespace always copies the entire mount tree from the caller's namespace. For containers and sandboxes that intend to build their mount table from scratch this is wasteful:
they inherit a potentially large mount tree only to immediately tear it down.

This series adds support for creating a mount namespace that contains only a clone of the root mount, with none of the child mounts. Two new flags are introduced:

- CLONE_EMPTY_MNTNS (0x400000000) for clone3(), using the 64-bit flag space.
- UNSHARE_EMPTY_MNTNS (0x00100000) for unshare()

Both flags imply CLONE_NEWNS. The resulting namespace contains a single nullfs root mount with an immutable empty directory. The intended workflow is to then mount a real filesystem (e.g., tmpfs) over the root and build the mount table from there.

* Allow MOVE_MOUNT_BENEATH to target the caller's rootfs, allowing to switch out the rootfs without pivot_root(2).

The traditional approach to switching the rootfs involves pivot_root(2) or a chroot_fs_refs()-based mechanism that atomically updates fs->root for all tasks sharing the same fs_struct. This has consequences for fork(), unshare(CLONE_FS), and setns().

This series instead decomposes root-switching into individually atomic, locally-scoped steps:

  fd_tree = open_tree(-EBADF, "/newroot", OPEN_TREE_CLONE |
  OPEN_TREE_CLOEXEC); fchdir(fd_tree); move_mount(fd_tree, "", AT_FDCWD,
  "/", MOVE_MOUNT_BENEATH | MOVE_MOUNT_F_EMPTY_PATH); chroot(".");
  umount2(".", MNT_DETACH);

Since each step only modifies the caller's own state, the fork/unshare/setns races are eliminated by design.

A key step to making this possible is to remove the locked mount restriction. Originally MOVE_MOUNT_BENEATH doesn't support mounting beneath a mount that is locked. The locked mount protects the underlying mount from being revealed. This is a core mechanism of unshare(CLONE_NEWUSER | CLONE_NEWNS). The mounts in the new mount namespace become locked. That effectively makes the new mount table useless as the caller cannot ever get rid of any of the mounts no matter how useless they are.

We can lift this restriction though. We simply transfer the locked property from the top mount to the mount beneath. This works because what we care about is to protect the underlying mount aka the parent. The mount mounted between the parent and the top mount takes over the job of protecting the parent mount from the top mount mount. This leaves us free to remove the locked property from the top mount which can consequently be unmounted:

unshare(CLONE_NEWUSER | CLONE_NEWNS)

and we inherit a clone of procfs on /proc then currently we cannot unmount it as:

umount -l /proc

will fail with EINVAL because the procfs mount is locked.

After this series we can now do:

  mount --beneath -t tmpfs tmpfs /proc umount -l /proc

after which a tmpfs mount has been placed beneath the procfs mount. The tmpfs mount has become locked and the procfs mount has become unlocked.

This means you can safely modify an inherited mount table after unprivileged namespace creation.

Afterwards we simply make it possible to move a mount beneath the rootfs allowing to upgrade the rootfs.

Removing the locked restriction makes this very useful for containers created with unshare(CLONE_NEWUSER | CLONE_NEWNS) to reshuffle an inherited mount table safely and MOVE_MOUNT_BENEATH makes it possible to switch out the rootfs instead of using the costly pivot_root(2).

/* 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 will have a merge conflict with:
[1]: https://lore.kernel.org/20260410-namespaces-misc-v71-000ced4f8b7a@brauner
[2]: https://lore.kernel.org/20260410-vfs-pidfs-v71-b736f79a20b9@brauner

It can be resolved as follows:

include/uapi/linux/sched.h +0 -0
diff --cc include/uapi/linux/sched.h
index 149dbc64923b,4e76fce9f777..000000000000
@@@ -34,11 -34,9 +34,12 @@@
  #define CLONE_IO              0x80000000      /* Clone io context */

/* Flags for the clone3() syscall. */
-#define CLONE_CLEAR_SIGHAND 0x100000000ULL /* Clear any signal handler and reset to SIG_DFL. */ -#define CLONE_INTO_CGROUP 0x200000000ULL /* Clone into a specific cgroup given the right permissions. */
+#define CLONE_CLEAR_SIGHAND (1ULL << 32) /* Clear any signal handler and reset to SIG_DFL. */
+#define CLONE_INTO_CGROUP (1ULL << 33) /* Clone into a specific cgroup given the right permissions. */
+#define CLONE_AUTOREAP (1ULL << 34) /* Auto-reap child on exit. */

 +#define CLONE_NNP             (1ULL << 35) /* Set no_new_privs on child. */
 +#define CLONE_PIDFD_AUTOKILL  (1ULL << 36) /* Kill child when clone pidfd closes. */
+ #define CLONE_EMPTY_MNTNS     (1ULL << 37) /* Create an empty mount namespace. */

/*
* cloning flags intersect with CSIGNAL so can be used with unshare and clone3

kernel/fork.c +0 -0
diff --cc kernel/fork.c
index 55a6906d3014,dea6b3454447..000000000000
@@@ -2941,9 -2906,9 +2951,9 @@@ static inline bool clone3_stack_valid(s
  static bool clone3_args_valid(struct kernel_clone_args *kargs)
  {
        /* Verify that no unknown flags are passed along. */
--      if (kargs->flags &
-           ~(CLONE_LEGACY_FLAGS | CLONE_CLEAR_SIGHAND | CLONE_INTO_CGROUP |
-             CLONE_AUTOREAP | CLONE_NNP | CLONE_PIDFD_AUTOKILL))
 -          ~(CLONE_LEGACY_FLAGS | CLONE_CLEAR_SIGHAND |
 -            CLONE_INTO_CGROUP | CLONE_EMPTY_MNTNS))
++      if (kargs->flags & ~(CLONE_LEGACY_FLAGS | CLONE_CLEAR_SIGHAND |
++                           CLONE_INTO_CGROUP | CLONE_AUTOREAP | CLONE_NNP |
++                           CLONE_PIDFD_AUTOKILL | CLONE_EMPTY_MNTNS))
                return false;
        /*

@@@ -3092,9 -3057,11 +3102,9 @@@ void __init proc_caches_init(void
*/
static int check_unshare_flags(unsigned long unshare_flags) {

 -      if (unshare_flags & ~(CLONE_THREAD|CLONE_FS|CLONE_NEWNS|CLONE_SIGHAND|
 +      if (unshare_flags & ~(CLONE_THREAD|CLONE_FS|CLONE_SIGHAND|
                                CLONE_VM|CLONE_FILES|CLONE_SYSVSEM|
-                               CLONE_NS_ALL))
 -                              CLONE_NEWUTS|CLONE_NEWIPC|CLONE_NEWNET|
 -                              CLONE_NEWUSER|CLONE_NEWPID|CLONE_NEWCGROUP|
 -                              CLONE_NEWTIME | UNSHARE_EMPTY_MNTNS))
++                              CLONE_NS_ALL|UNSHARE_EMPTY_MNTNS))
                return -EINVAL;
        /*
         * Not implemented, but pretend it works if there is nothing
kernel/nsproxy.c +0 -0
diff --cc kernel/nsproxy.c
index 63b44ee79847,1bdc5be2dd20..000000000000
@@@ -211,9 -213,12 +212,10 @@@ int unshare_nsproxy_namespaces(unsigne
        struct nsproxy **new_nsp, struct cred *new_cred, struct fs_struct *new_fs)
  {
        struct user_namespace *user_ns;
+       u64 flags = unshare_flags;
        int err = 0;

- if (!(unshare_flags & (CLONE_NS_ALL & ~CLONE_NEWUSER)))
- if (!(flags & (CLONE_NEWNS | CLONE_NEWUTS | CLONE_NEWIPC |
- CLONE_NEWNET | CLONE_NEWPID | CLONE_NEWCGROUP |
- CLONE_NEWTIME)))
++ if (!(flags & (CLONE_NS_ALL & ~CLONE_NEWUSER)))

                return 0;

        user_ns = new_cred ? new_cred->user_ns : current_user_ns();

The following changes since commit 1f318b96cc84d7c2ab792fcc0bfd42a7ca890681:

Linux 7.0-rc3 (2026-03-08 16:56:54 -0700)

are available in the Git repository at:

[email protected]:pub/scm/linux/kernel/git/vfs/vfs tags/vfs-7.1-rc1.mount

for you to fetch changes up to ef6960362e5b33402b9977972ab2a9fabc4c8cb9:

selftests/namespaces: remove unused utils.h include from listns_efault_test (2026-03-31 10:58:58 +0200)

----------------------------------------------------------------
vfs-7.1-rc1.mount

Please consider pulling these changes from the signed vfs-7.1-rc1.mount tag.

Thanks!
Christian

----------------------------------------------------------------
Christian Brauner (27):
mount: start iterating from start of rbtree
mount: simplify __do_loopback()
mount: add FSMOUNT_NAMESPACE
tools: update mount.h header
selftests/statmount: add statmount_alloc() helper
selftests: add FSMOUNT_NAMESPACE tests
Merge patch series "fsmount: add FSMOUNT_NAMESPACE"
namespace: allow creating empty mount namespaces
selftests/filesystems: add tests for empty mount namespaces selftests/filesystems: add clone3 tests for empty mount namespaces
Merge patch series "namespace: allow creating empty mount namespaces"
move_mount: transfer MNT_LOCKED
move_mount: allow MOVE_MOUNT_BENEATH on the rootfs
selftests/filesystems: add MOVE_MOUNT_BENEATH rootfs tests
Merge patch series "move_mount: expand MOVE_MOUNT_BENEATH"
Merge patch series "fs, audit: Avoid excessive dput/dget in audit_context setup and reset paths"
fs: use path_equal() in fs_struct helpers
fs: document seqlock usage in pwd pool APIs
fs: add drain_fs_pwd_pool() helper
fs: factor out get_fs_pwd_pool_locked() for lock-held callers
Merge branch 'vfs-7.1.fs_struct'
mount: always duplicate mount
selftests/statmount: remove duplicate wait_for_pid()
selftests/empty_mntns: fix statmount_alloc() signature mismatch selftests/empty_mntns: fix wrong CLONE_EMPTY_MNTNS hex value in comment selftests/fsmount_ns: add missing TARGETS and fix cap test selftests/namespaces: remove unused utils.h include from listns_efault_test

Waiman Long (2):
fs: Add a pool of extra fs->pwd references to fs_struct
audit: Use the new {get,put}_fs_pwd_pool() APIs to get/put pwd references

 fs/fs_struct.c                                     |   34 +-
 fs/namespace.c                                     |  206 ++--
 include/linux/fs_struct.h                          |   43 +-
 include/uapi/linux/mount.h                         |    1 +
 include/uapi/linux/sched.h                         |    7 +
 kernel/auditsc.c                                   |    7 +-
 kernel/fork.c                                      |   17 +-
 kernel/nsproxy.c                                   |   21 +-
 tools/include/uapi/linux/mount.h                   |   14 +-
 tools/testing/selftests/Makefile                   |    3 +
 .../selftests/filesystems/empty_mntns/.gitignore   |    4 +
 .../selftests/filesystems/empty_mntns/Makefile     |   12 +
 .../empty_mntns/clone3_empty_mntns_test.c          |  938 ++++++++++++++++
 .../filesystems/empty_mntns/empty_mntns.h          |   25 +
 .../filesystems/empty_mntns/empty_mntns_test.c     |  725 +++++++++++++
 .../empty_mntns/overmount_chroot_test.c            |  225 ++++
 .../selftests/filesystems/fsmount_ns/.gitignore    |    1 +
 .../selftests/filesystems/fsmount_ns/Makefile      |   10 +
 .../filesystems/fsmount_ns/fsmount_ns_test.c       | 1135 ++++++++++++++++++++
 .../selftests/filesystems/move_mount/.gitignore    |    2 +
 .../selftests/filesystems/move_mount/Makefile      |   10 +
 .../filesystems/move_mount/move_mount_test.c       |  492 +++++++++
 .../selftests/filesystems/open_tree_ns/Makefile    |    2 +-
 .../filesystems/open_tree_ns/open_tree_ns_test.c   |   43 +-
 .../selftests/filesystems/statmount/statmount.h    |   51 +
 .../filesystems/statmount/statmount_test.c         |   45 +-
 .../filesystems/statmount/statmount_test_ns.c      |   25 -
 tools/testing/selftests/filesystems/utils.c        |    4 +-
 tools/testing/selftests/filesystems/utils.h        |    2 +
 .../selftests/namespaces/listns_efault_test.c      |    1 -
 30 files changed, 3903 insertions(+), 202 deletions(-)
 create mode 100644 tools/testing/selftests/filesystems/empty_mntns/.gitignore
 create mode 100644 tools/testing/selftests/filesystems/empty_mntns/Makefile
 create mode 100644 tools/testing/selftests/filesystems/empty_mntns/clone3_empty_mntns_test.c
 create mode 100644 tools/testing/selftests/filesystems/empty_mntns/empty_mntns.h
 create mode 100644 tools/testing/selftests/filesystems/empty_mntns/empty_mntns_test.c
 create mode 100644 tools/testing/selftests/filesystems/empty_mntns/overmount_chroot_test.c
 create mode 100644 tools/testing/selftests/filesystems/fsmount_ns/.gitignore
 create mode 100644 tools/testing/selftests/filesystems/fsmount_ns/Makefile
 create mode 100644 tools/testing/selftests/filesystems/fsmount_ns/fsmount_ns_test.c
 create mode 100644 tools/testing/selftests/filesystems/move_mount/.gitignore
 create mode 100644 tools/testing/selftests/filesystems/move_mount/Makefile
 create mode 100644 tools/testing/selftests/filesystems/move_mount/move_mount_test.c
#23 lore raw

Re: [GIT PULL 11/12 for v7.1] vfs mount

Quoted 2 lines · Christian Brauner

[email protected]:pub/scm/linux/kernel/git/vfs/vfs tags/vfs-7.1-rc1.mount

I pulled this, did all the merge conflicts, and then at the end noticed that you had merged the broken audit garbage into this branch.

End result: I unpulled it all and I can't pull this branch either because it has that broken stuff in it.

This is why different branches should be independent things. When they contain each other, there's no point. One bad branch poisons the others.

Linus

author maintainer
#24 lore raw

Re: [GIT PULL 11/12 for v7.1] vfs mount

Quoted 3 lines

This is why different branches should be independent things. When they contain each other, there's no point. One bad branch poisons the others.

Usually all branches I sent are completely independent of another unless the merge conflict is just needlessly nasty or it is shared with another tree. Here this clearly worked to our detriment. Sorry about that, I failed to mention the dependency explicitly as I usually do.

I dropped the merge of the audit branch that you disagreed with from this branch. The only commits that had to be reapplied on top are selftest fixes and one syzbot bugfix. I hope this is ok now.

Hey Linus,

/* Summary */

* Add FSMOUNT_NAMESPACE flag to fsmount() that creates a new mount namespace with the newly created filesystem attached to a copy of the real rootfs. This returns a namespace file descriptor instead of an O_PATH mount fd, similar to how OPEN_TREE_NAMESPACE works for open_tree().

This allows creating a new filesystem and immediately placing it in a new mount namespace in a single operation, which is useful for container runtimes and other namespace-based isolation mechanisms.

This accompanies OPEN_TREE_NAMESPACE and avoids a needless detour via OPEN_TREE_NAMESPACE to get the same effect. Will be especially useful when you mount an actual filesystem to be used as the container rootfs.

* Currently, creating a new mount namespace always copies the entire mount tree from the caller's namespace. For containers and sandboxes that intend to build their mount table from scratch this is wasteful:
they inherit a potentially large mount tree only to immediately tear it down.

This series adds support for creating a mount namespace that contains only a clone of the root mount, with none of the child mounts. Two new flags are introduced:

- CLONE_EMPTY_MNTNS (0x400000000) for clone3(), using the 64-bit flag space.
- UNSHARE_EMPTY_MNTNS (0x00100000) for unshare()

Both flags imply CLONE_NEWNS. The resulting namespace contains a single nullfs root mount with an immutable empty directory. The intended workflow is to then mount a real filesystem (e.g., tmpfs) over the root and build the mount table from there.

* Allow MOVE_MOUNT_BENEATH to target the caller's rootfs, allowing to switch out the rootfs without pivot_root(2).

The traditional approach to switching the rootfs involves pivot_root(2) or a chroot_fs_refs()-based mechanism that atomically updates fs->root for all tasks sharing the same fs_struct. This has consequences for fork(), unshare(CLONE_FS), and setns().

This series instead decomposes root-switching into individually atomic, locally-scoped steps:

  fd_tree = open_tree(-EBADF, "/newroot", OPEN_TREE_CLONE | OPEN_TREE_CLOEXEC);
  fchdir(fd_tree); move_mount(fd_tree, "", AT_FDCWD, "/", MOVE_MOUNT_BENEATH | MOVE_MOUNT_F_EMPTY_PATH);
  chroot(".");
  umount2(".", MNT_DETACH);

Since each step only modifies the caller's own state, the fork/unshare/setns races are eliminated by design.

A key step to making this possible is to remove the locked mount restriction. Originally MOVE_MOUNT_BENEATH doesn't support mounting beneath a mount that is locked. The locked mount protects the underlying mount from being revealed. This is a core mechanism of unshare(CLONE_NEWUSER | CLONE_NEWNS). The mounts in the new mount namespace become locked. That effectively makes the new mount table useless as the caller cannot ever get rid of any of the mounts no matter how useless they are.

We can lift this restriction though. We simply transfer the locked property from the top mount to the mount beneath. This works because what we care about is to protect the underlying mount aka the parent. The mount mounted between the parent and the top mount takes over the job of protecting the parent mount from the top mount mount. This leaves us free to remove the locked property from the top mount which can consequently be unmounted:

unshare(CLONE_NEWUSER | CLONE_NEWNS)

and we inherit a clone of procfs on /proc then currently we cannot unmount it as:

umount -l /proc

will fail with EINVAL because the procfs mount is locked.

After this series we can now do:

  mount --beneath -t tmpfs tmpfs /proc umount -l /proc

after which a tmpfs mount has been placed beneath the procfs mount. The tmpfs mount has become locked and the procfs mount has become unlocked.

This means you can safely modify an inherited mount table after unprivileged namespace creation.

Afterwards we simply make it possible to move a mount beneath the rootfs allowing to upgrade the rootfs.

Removing the locked restriction makes this very useful for containers created with unshare(CLONE_NEWUSER | CLONE_NEWNS) to reshuffle an inherited mount table safely and MOVE_MOUNT_BENEATH makes it possible to switch out the rootfs instead of using the costly pivot_root(2).

/* 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 will have a merge conflict with:
[1]: https://lore.kernel.org/20260410-namespaces-misc-v71-000ced4f8b7a@brauner
[2]: https://lore.kernel.org/20260410-vfs-pidfs-v71-b736f79a20b9@brauner

It can be resolved as follows:

include/uapi/linux/sched.h +0 -0
diff --cc include/uapi/linux/sched.h
index 149dbc64923b,4e76fce9f777..000000000000
@@@ -34,11 -34,9 +34,12 @@@
  #define CLONE_IO              0x80000000      /* Clone io context */

/* Flags for the clone3() syscall. */
-#define CLONE_CLEAR_SIGHAND 0x100000000ULL /* Clear any signal handler and reset to SIG_DFL. */ -#define CLONE_INTO_CGROUP 0x200000000ULL /* Clone into a specific cgroup given the right permissions. */
+#define CLONE_CLEAR_SIGHAND (1ULL << 32) /* Clear any signal handler and reset to SIG_DFL. */
+#define CLONE_INTO_CGROUP (1ULL << 33) /* Clone into a specific cgroup given the right permissions. */
+#define CLONE_AUTOREAP (1ULL << 34) /* Auto-reap child on exit. */

 +#define CLONE_NNP             (1ULL << 35) /* Set no_new_privs on child. */
 +#define CLONE_PIDFD_AUTOKILL  (1ULL << 36) /* Kill child when clone pidfd closes. */
+ #define CLONE_EMPTY_MNTNS     (1ULL << 37) /* Create an empty mount namespace. */

/*
* cloning flags intersect with CSIGNAL so can be used with unshare and clone3

kernel/fork.c +0 -0
diff --cc kernel/fork.c
index 55a6906d3014,dea6b3454447..000000000000
@@@ -2941,9 -2906,9 +2951,9 @@@ static inline bool clone3_stack_valid(s
  static bool clone3_args_valid(struct kernel_clone_args *kargs)
  {
        /* Verify that no unknown flags are passed along. */
--      if (kargs->flags &
-           ~(CLONE_LEGACY_FLAGS | CLONE_CLEAR_SIGHAND | CLONE_INTO_CGROUP |
-             CLONE_AUTOREAP | CLONE_NNP | CLONE_PIDFD_AUTOKILL))
 -          ~(CLONE_LEGACY_FLAGS | CLONE_CLEAR_SIGHAND |
 -            CLONE_INTO_CGROUP | CLONE_EMPTY_MNTNS))
++      if (kargs->flags & ~(CLONE_LEGACY_FLAGS | CLONE_CLEAR_SIGHAND |
++                           CLONE_INTO_CGROUP | CLONE_AUTOREAP | CLONE_NNP |
++                           CLONE_PIDFD_AUTOKILL | CLONE_EMPTY_MNTNS))
                return false;
        /*

@@@ -3092,9 -3057,11 +3102,9 @@@ void __init proc_caches_init(void
*/
static int check_unshare_flags(unsigned long unshare_flags) {

 -      if (unshare_flags & ~(CLONE_THREAD|CLONE_FS|CLONE_NEWNS|CLONE_SIGHAND|
 +      if (unshare_flags & ~(CLONE_THREAD|CLONE_FS|CLONE_SIGHAND|
                                CLONE_VM|CLONE_FILES|CLONE_SYSVSEM|
-                               CLONE_NS_ALL))
 -                              CLONE_NEWUTS|CLONE_NEWIPC|CLONE_NEWNET|
 -                              CLONE_NEWUSER|CLONE_NEWPID|CLONE_NEWCGROUP|
 -                              CLONE_NEWTIME | UNSHARE_EMPTY_MNTNS))
++                              CLONE_NS_ALL|UNSHARE_EMPTY_MNTNS))
                return -EINVAL;
        /*
         * Not implemented, but pretend it works if there is nothing
kernel/nsproxy.c +0 -0
diff --cc kernel/nsproxy.c
index 63b44ee79847,1bdc5be2dd20..000000000000
@@@ -211,9 -213,12 +212,10 @@@ int unshare_nsproxy_namespaces(unsigne
        struct nsproxy **new_nsp, struct cred *new_cred, struct fs_struct *new_fs)
  {
        struct user_namespace *user_ns;
+       u64 flags = unshare_flags;
        int err = 0;

- if (!(unshare_flags & (CLONE_NS_ALL & ~CLONE_NEWUSER)))
- if (!(flags & (CLONE_NEWNS | CLONE_NEWUTS | CLONE_NEWIPC |
- CLONE_NEWNET | CLONE_NEWPID | CLONE_NEWCGROUP |
- CLONE_NEWTIME)))
++ if (!(flags & (CLONE_NS_ALL & ~CLONE_NEWUSER)))

                return 0;

        user_ns = new_cred ? new_cred->user_ns : current_user_ns();

The following changes since commit 1f318b96cc84d7c2ab792fcc0bfd42a7ca890681:

Linux 7.0-rc3 (2026-03-08 16:56:54 -0700)

are available in the Git repository at:

[email protected]:pub/scm/linux/kernel/git/vfs/vfs tags/vfs-7.1-rc1.mount.v2

for you to fetch changes up to cad3bf1c330274d11f25f1b7afae9b9dba13fbd3:

selftests/namespaces: remove unused utils.h include from listns_efault_test (2026-04-14 09:31:18 +0200)

----------------------------------------------------------------
vfs-7.1-rc1.mount.v2

Please consider pulling these changes from the signed vfs-7.1-rc1.mount.v2 tag.

Thanks!
Christian

----------------------------------------------------------------
Christian Brauner (21):
mount: start iterating from start of rbtree
mount: simplify __do_loopback()
mount: add FSMOUNT_NAMESPACE
tools: update mount.h header
selftests/statmount: add statmount_alloc() helper
selftests: add FSMOUNT_NAMESPACE tests
Merge patch series "fsmount: add FSMOUNT_NAMESPACE"
namespace: allow creating empty mount namespaces selftests/filesystems: add tests for empty mount namespaces selftests/filesystems: add clone3 tests for empty mount namespaces Merge patch series "namespace: allow creating empty mount namespaces"
move_mount: transfer MNT_LOCKED
move_mount: allow MOVE_MOUNT_BENEATH on the rootfs selftests/filesystems: add MOVE_MOUNT_BENEATH rootfs tests Merge patch series "move_mount: expand MOVE_MOUNT_BENEATH"
mount: always duplicate mount
selftests/statmount: remove duplicate wait_for_pid() selftests/empty_mntns: fix statmount_alloc() signature mismatch selftests/empty_mntns: fix wrong CLONE_EMPTY_MNTNS hex value in comment selftests/fsmount_ns: add missing TARGETS and fix cap test selftests/namespaces: remove unused utils.h include from listns_efault_test

 fs/namespace.c                                     |  194 ++--
 include/uapi/linux/mount.h                         |    1 +
 include/uapi/linux/sched.h                         |    7 +
 kernel/fork.c                                      |   17 +-
 kernel/nsproxy.c                                   |   21 +-
 tools/include/uapi/linux/mount.h                   |   14 +-
 tools/testing/selftests/Makefile                   |    3 +
 .../selftests/filesystems/empty_mntns/.gitignore   |    4 +
 .../selftests/filesystems/empty_mntns/Makefile     |   12 +
 .../empty_mntns/clone3_empty_mntns_test.c          |  938 ++++++++++++++++
 .../filesystems/empty_mntns/empty_mntns.h          |   25 +
 .../filesystems/empty_mntns/empty_mntns_test.c     |  725 +++++++++++++
 .../empty_mntns/overmount_chroot_test.c            |  225 ++++
 .../selftests/filesystems/fsmount_ns/.gitignore    |    1 +
 .../selftests/filesystems/fsmount_ns/Makefile      |   10 +
 .../filesystems/fsmount_ns/fsmount_ns_test.c       | 1135 ++++++++++++++++++++
 .../selftests/filesystems/move_mount/.gitignore    |    2 +
 .../selftests/filesystems/move_mount/Makefile      |   10 +
 .../filesystems/move_mount/move_mount_test.c       |  492 +++++++++
 .../selftests/filesystems/open_tree_ns/Makefile    |    2 +-
 .../filesystems/open_tree_ns/open_tree_ns_test.c   |   43 +-
 .../selftests/filesystems/statmount/statmount.h    |   51 +
 .../filesystems/statmount/statmount_test.c         |   45 +-
 .../filesystems/statmount/statmount_test_ns.c      |   25 -
 tools/testing/selftests/filesystems/utils.c        |    4 +-
 tools/testing/selftests/filesystems/utils.h        |    2 +
 .../selftests/namespaces/listns_efault_test.c      |    1 -
 27 files changed, 3814 insertions(+), 195 deletions(-)
 create mode 100644 tools/testing/selftests/filesystems/empty_mntns/.gitignore
 create mode 100644 tools/testing/selftests/filesystems/empty_mntns/Makefile
 create mode 100644 tools/testing/selftests/filesystems/empty_mntns/clone3_empty_mntns_test.c
 create mode 100644 tools/testing/selftests/filesystems/empty_mntns/empty_mntns.h
 create mode 100644 tools/testing/selftests/filesystems/empty_mntns/empty_mntns_test.c
 create mode 100644 tools/testing/selftests/filesystems/empty_mntns/overmount_chroot_test.c
 create mode 100644 tools/testing/selftests/filesystems/fsmount_ns/.gitignore
 create mode 100644 tools/testing/selftests/filesystems/fsmount_ns/Makefile
 create mode 100644 tools/testing/selftests/filesystems/fsmount_ns/fsmount_ns_test.c
 create mode 100644 tools/testing/selftests/filesystems/move_mount/.gitignore
 create mode 100644 tools/testing/selftests/filesystems/move_mount/Makefile
 create mode 100644 tools/testing/selftests/filesystems/move_mount/move_mount_test.c
merge bot Merged
#25 lore raw

Re: Re: [GIT PULL 11/12 for v7.1] vfs mount

The pull request you sent on Tue, 14 Apr 2026 12:58:37 +0200:

The pull request you sent on Tue, 14 Apr 2026 12:58:37 +0200:

Quoted 1 line

[email protected]:pub/scm/linux/kernel/git/vfs/vfs tags/vfs-7.1-rc1.mount.v2

has been merged into torvalds/linux.git:
https://git.kernel.org/torvalds/c/7c8a4671dc3247a26a702e5f5996e9f453d7070d

Thank you!

Signature · 2 lines
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/prtracker.html
author maintainer
#26 lore raw

[GIT PULL 12/12 for v7.1] vfs misc

In reply to Christian Brauner

Hey Linus,

/* Summary */

Features

- coredump: add tracepoint for coredump events
- fs: hide file and bfile caches behind runtime const machinery

Fixes

- fix architecture-specific compat_ftruncate64 implementations
- dcache: Limit the minimal number of bucket to two
- fs/omfs: reject s_sys_blocksize smaller than OMFS_DIR_START
- fs/mbcache: cancel shrink work before destroying the cache
- dcache: permit dynamic_dname()s up to NAME_MAX

Cleanups

- remove or unexport unused fs_context infrastructure
- trivial ->setattr cleanups
- selftests/filesystems: Assume that TIOCGPTPEER is defined
- writeback: fix kernel-doc function name mismatch for wb_put_many()
- autofs: replace manual symlink buffer allocation in autofs_dir_symlink
- init/initramfs.c: trivial fix: FSM -> Finite-state machine
- fs: remove stale and duplicate forward declarations
- readdir: Introduce dirent_size()
- fs: Replace user_access_{begin/end} by scoped user access
- kernel: acct: fix duplicate word in comment
- fs: write a better comment in step_into() concerning .mnt assignment
- fs: attr: fix comment formatting and spelling issues

/* 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/[email protected]

This has a merge conflict with:
[1]: https://lore.kernel.org/20260410-vfs-kino-v71-672d31bc705c@brauner

fs/affs/inode.c +0 -0
diff --cc fs/affs/inode.c
index e03e9f109ff9,f660e76584b3..000000000000
@@@ -219,7 -218,7 +218,7 @@@ affs_setattr(struct mnt_idmap *idmap, s
        struct inode *inode = d_inode(dentry);
        int error;
-       pr_debug("notify_change(%llu,0x%x)\n", inode->i_ino, attr->ia_valid);
 -      pr_debug("setattr(%lu,0x%x)\n", inode->i_ino, attr->ia_valid);
++      pr_debug("setattr(%llu,0x%x)\n", inode->i_ino, attr->ia_valid);
        error = setattr_prepare(&nop_mnt_idmap, dentry, attr);
        if (error)

The following changes since commit 9702969978695d9a699a1f34771580cdbb153b33:

Merge tag 'slab-for-7.0-part2' of git://git.kernel.org/pub/scm/linux/kernel/git/vbabka/slab (2026-02-16 13:41:38 -0800)

are available in the Git repository at:

[email protected]:pub/scm/linux/kernel/git/vfs/vfs tags/vfs-7.1-rc1.misc

for you to fetch changes up to 97b67e64affb0e709eeecc50f6a9222fc20bd14b:

dcache: permit dynamic_dname()s up to NAME_MAX (2026-04-07 12:32:22 +0200)

----------------------------------------------------------------
vfs-7.1-rc1.misc

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

Thanks!
Christian

----------------------------------------------------------------
Aleksa Sarai (1):
dcache: permit dynamic_dname()s up to NAME_MAX

Askar Safin (1):

      init/initramfs.c: trivial fix: FSM -> Finite-state machine

Breno Leitao (1):
coredump: add tracepoint for coredump events

Chelsy Ratnawat (1):
fs: attr: fix comment formatting and spelling issues

Christian Brauner (3):
Merge patch series "remove or unexport unused fs_conext infrastructure" Merge patch series "fix architecture-specific compat_ftruncate64 implementations" Merge patch series "trivial ->setattr cleanups"

Christoph Hellwig (12):
fs: mark bool_names static
fs: remove fsparam_blob / fs_param_is_blob
fs: remove fsparam_path / fs_param_is_path
fs: unexport fs_context_for_reconfigure
fs: fix archiecture-specific compat_ftruncate64
fs: pass on FTRUNCATE_* flags to do_truncate
fs: remove do_sys_truncate
hfs: update comments on hfs_inode_setattr
adfs: rename adfs_notify_change to adfs_setattr
affs: rename affs_notify_change to affs_setattr
proc: rename proc_setattr to proc_nochmod_setattr
proc: rename proc_notify_change to proc_setattr

Christophe Leroy (CS GROUP) (2):
readdir: Introduce dirent_size()
fs: Replace user_access_{begin/end} by scoped user access

HyungJung Joo (2):
fs/omfs: reject s_sys_blocksize smaller than OMFS_DIR_START fs/mbcache: cancel shrink work before destroying the cache

Kit Dallege (1):
writeback: fix kernel-doc function name mismatch for wb_put_many()

Mark Brown (1):
selftests/filesystems: Assume that TIOCGPTPEER is defined

Mateusz Guzik (2):
fs: write a better comment in step_into() concerning .mnt assignment
fs: hide file and bfile caches behind runtime const machinery

Thorsten Blum (1):
autofs: replace manual symlink buffer allocation in autofs_dir_symlink

Yuto Ohnuki (1):
fs: remove stale and duplicate forward declarations

Zhihao Cheng (1):
dcache: Limit the minimal number of bucket to two

haoyu.lu (1):
kernel: acct: fix duplicate word in comment

 Documentation/filesystems/mount_api.rst          |   4 -
 arch/arm64/kernel/sys32.c                        |   2 +-
 arch/mips/kernel/linux32.c                       |   2 +-
 arch/parisc/kernel/sys_parisc.c                  |   4 +-
 arch/powerpc/kernel/sys_ppc32.c                  |   2 +-
 arch/sparc/kernel/sys_sparc32.c                  |   2 +-
 arch/x86/kernel/sys_ia32.c                       |   3 +-
 fs/adfs/adfs.h                                   |   4 +-
 fs/adfs/dir.c                                    |   2 +-
 fs/adfs/file.c                                   |   2 +-
 fs/adfs/inode.c                                  |   6 +-
 fs/affs/affs.h                                   |   2 +-
 fs/affs/dir.c                                    |   2 +-
 fs/affs/file.c                                   |   2 +-
 fs/affs/inode.c                                  |   5 +-
 fs/affs/symlink.c                                |   2 +-
 fs/attr.c                                        |   6 +-
 fs/autofs/root.c                                 |   8 +-
 fs/coredump.c                                    |   5 ++
 fs/d_path.c                                      |  11 +--
 fs/dcache.c                                      |   4 +-
 fs/file.c                                        |   2 +-
 fs/file_table.c                                  |  31 ++++---
 fs/fs_context.c                                  |   1 -
 fs/fs_parser.c                                   |  19 +----
 fs/hfs/inode.c                                   |  21 +----
 fs/internal.h                                    |   3 +-
 fs/mbcache.c                                     |   1 +
 fs/namei.c                                       |   2 +-
 fs/omfs/inode.c                                  |   6 ++
 fs/open.c                                        |  40 +++++----
 fs/proc/base.c                                   |  22 ++---
 fs/proc/fd.c                                     |   6 +-
 fs/proc/generic.c                                |   8 +-
 fs/proc/internal.h                               |   4 +-
 fs/proc/namespaces.c                             |   4 +-
 fs/proc/proc_net.c                               |   2 +-
 fs/readdir.c                                     | 103 +++++++++--------------
 fs/select.c                                      |  35 +++-----
 include/asm-generic/vmlinux.lds.h                |   4 +-
 include/linux/backing-dev-defs.h                 |   2 +-
 include/linux/blkdev.h                           |   1 +
 include/linux/fs.h                               |   3 -
 include/linux/fs_parser.h                        |   8 +-
 include/linux/syscalls.h                         |  16 +---
 include/trace/events/coredump.h                  |  45 ++++++++++
 init/initramfs.c                                 |   2 +-
 io_uring/truncate.c                              |   2 +-
 kernel/acct.c                                    |   2 +-
 tools/testing/selftests/filesystems/devpts_pts.c |   2 -
 50 files changed, 225 insertions(+), 252 deletions(-)
 create mode 100644 include/trace/events/coredump.h
merge bot Merged
#27 lore raw

Re: [GIT PULL 12/12 for v7.1] vfs misc

The pull request you sent on Fri, 10 Apr 2026 17:23:30 +0200:

The pull request you sent on Fri, 10 Apr 2026 17:23:30 +0200:

Quoted 1 line

[email protected]:pub/scm/linux/kernel/git/vfs/vfs tags/vfs-7.1-rc1.misc

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

Thank you!

Signature · 2 lines
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/prtracker.html
author maintainer
#28 lore raw

[GIT PULL for v7.1] kernel misc

In reply to Christian Brauner

Hey Linus,

/* Summary */

Features

- pid_namespace: make init creation more flexible

Annotate ->child_reaper accesses with {READ,WRITE}_ONCE() to protect the unlocked readers from cpu/compiler reordering, and enforce that pid 1 in a pid namespace is always the first allocated pid (the set_tid path already required this).

On top of that, allow opening pid_for_children before the pid namespace init has been created. This lets one process create the pid namespace and a different process create the init via setns(), which makes clone3(set_tid) usable in all cases evenly and is particularly useful to CRIU when restoring nested containers.

A new selftest covers both the basic create-pidns-then-init flow and the cross-process variant, and a MAINTAINERS entry for the pid namespace code is added.

Cleanups

- signal: update outdated comment for the removed freezable_schedule()

/* 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 1f318b96cc84d7c2ab792fcc0bfd42a7ca890681:

Linux 7.0-rc3 (2026-03-08 16:56:54 -0700)

are available in the Git repository at:

[email protected]:pub/scm/linux/kernel/git/vfs/vfs tags/kernel-7.1-rc1.misc

for you to fetch changes up to 4c68d150246d7e1d826a807a82e6eb6b4669f42c:

signal: update outdated comment for removed freezable_schedule() (2026-03-23 16:38:31 +0100)

----------------------------------------------------------------
kernel-7.1-rc1.misc

Please consider pulling these changes from the signed kernel-7.1-rc1.misc tag.

Thanks!
Christian

----------------------------------------------------------------
Christian Brauner (1):
Merge patch series "pid_namespace: make init creation more flexible"

Kexin Sun (1):
signal: update outdated comment for removed freezable_schedule()

Pavel Tikhomirov (5):
pid_namespace: avoid optimization of accesses to ->child_reaper
pid: check init is created first after idr alloc
pid_namespace: allow opening pid_for_children before init was created
selftests: Add tests for creating pidns init via setns
MAINTAINERS: add a pid namespace entry

 MAINTAINERS                                        |  11 +-
 kernel/exit.c                                      |   3 +-
 kernel/fork.c                                      |   5 +-
 kernel/pid.c                                       |  19 +-
 kernel/pid_namespace.c                             |   9 -
 kernel/signal.c                                    |   5 +-
 tools/testing/selftests/pid_namespace/.gitignore   |   1 +
 tools/testing/selftests/pid_namespace/Makefile     |   2 +-
 .../selftests/pid_namespace/pidns_init_via_setns.c | 238 +++++++++++++++++++++
 9 files changed, 269 insertions(+), 24 deletions(-)
 create mode 100644 tools/testing/selftests/pid_namespace/pidns_init_via_setns.c
merge bot Merged
#29 lore raw

Re: [GIT PULL for v7.1] kernel misc

The pull request you sent on Tue, 14 Apr 2026 14:46:36 +0200:

The pull request you sent on Tue, 14 Apr 2026 14:46:36 +0200:

Quoted 1 line

[email protected]:pub/scm/linux/kernel/git/vfs/vfs tags/kernel-7.1-rc1.misc

has been merged into torvalds/linux.git:
https://git.kernel.org/torvalds/c/5c0f43e8535d619ff32400e2e916075109fc7a56

Thank you!

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