[GIT PULL 05/18 for v7.3] vfs failfs
Christian Brauner <[email protected]>
| Newsgroups | org.kernel.vger.linux-fsdevel,org.kernel.vger.linux-kernel |
|---|---|
| Message-ID | <20260814-vfs-7.3-rc1.failfs-903759d156dd@brauner> |
Hey Linus, /* Summary */ Add failfs and expose a FD_FAILFS_ROOT sentinenel. This allows userspace to shed their filesystem state completely. A process with its root or working directory in failfs must anchor every path lookup at an explicit file descriptor. Absolute paths, absolute symlinks and AT_FDCWD-relative lookups simply fail. Failfs is the counterpart to nullfs. nullfs says adds a permanently empty, immutable directory whose lookups fail with ENOENT but which can be opened, read, stat'd and mounted upon. Failfs on the other hand fails every operation. The root cannot be opened at all. A single instance is mounted during early boot via kern_mount(), which makes it logically distinct from every mount namespace. This is accompanied by a new fchroot() system call which makes chrooting via a file descriptor a first class concept. It's possible to chroot into failfs as an unprivileged user provided the task has no new privileges set. /* Testing */ 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 1590cf0329716306e948a8fc29f1d3ee87d3989f: Linux 7.2-rc4 (2026-07-19 13:54:41 -0700) are available in the Git repository at: [email protected]:pub/scm/linux/kernel/git/vfs/vfs tags/vfs-7.3-rc1.failfs for you to fetch changes up to 1d38e750a389e919c1608dbc61cd5c93cd4915dc: Merge patch series "fs: add failfs" (2026-07-27 17:18:00 +0200) ---------------------------------------------------------------- vfs-7.3-rc1.failfs Please consider pulling these changes from the signed vfs-7.3-rc1.failfs tag. Thanks! Christian ---------------------------------------------------------------- Christian Brauner (8): fs: add failfs fs: support FD_FAILFS_ROOT in fchdir() fs: add fchroot() fs: support FD_FAILFS_ROOT in fchroot() arch: hookup fchroot() system call selftests/filesystems: add failfs selftests Documentation: add failfs documentation Merge patch series "fs: add failfs" Documentation/filesystems/failfs.rst | 73 +++ Documentation/filesystems/index.rst | 1 + arch/alpha/kernel/syscalls/syscall.tbl | 1 + arch/arm/tools/syscall.tbl | 1 + arch/arm64/tools/syscall_32.tbl | 1 + arch/m68k/kernel/syscalls/syscall.tbl | 1 + arch/microblaze/kernel/syscalls/syscall.tbl | 1 + arch/mips/kernel/syscalls/syscall_n32.tbl | 1 + arch/mips/kernel/syscalls/syscall_n64.tbl | 1 + arch/mips/kernel/syscalls/syscall_o32.tbl | 1 + arch/parisc/kernel/syscalls/syscall.tbl | 1 + arch/powerpc/kernel/syscalls/syscall.tbl | 1 + arch/s390/kernel/syscalls/syscall.tbl | 1 + arch/sh/kernel/syscalls/syscall.tbl | 1 + arch/sparc/kernel/syscalls/syscall.tbl | 1 + arch/x86/entry/syscalls/syscall_32.tbl | 1 + arch/x86/entry/syscalls/syscall_64.tbl | 1 + arch/xtensa/kernel/syscalls/syscall.tbl | 1 + fs/Makefile | 2 +- fs/d_path.c | 3 +- fs/failfs.c | 166 ++++++ fs/internal.h | 4 + fs/namespace.c | 1 + fs/open.c | 51 +- include/linux/syscalls.h | 1 + include/uapi/asm-generic/unistd.h | 6 +- include/uapi/linux/fcntl.h | 1 + include/uapi/linux/magic.h | 1 + scripts/syscall.tbl | 1 + tools/include/uapi/asm-generic/unistd.h | 6 +- tools/perf/arch/arm/entry/syscalls/syscall.tbl | 1 + .../perf/arch/mips/entry/syscalls/syscall_n64.tbl | 1 + tools/perf/arch/powerpc/entry/syscalls/syscall.tbl | 1 + tools/perf/arch/s390/entry/syscalls/syscall.tbl | 1 + tools/perf/arch/sh/entry/syscalls/syscall.tbl | 1 + tools/perf/arch/sparc/entry/syscalls/syscall.tbl | 1 + tools/perf/arch/x86/entry/syscalls/syscall_32.tbl | 1 + tools/perf/arch/x86/entry/syscalls/syscall_64.tbl | 1 + tools/perf/arch/xtensa/entry/syscalls/syscall.tbl | 1 + tools/scripts/syscall.tbl | 1 + tools/testing/selftests/Makefile | 1 + .../selftests/filesystems/failfs/.gitignore | 2 + .../testing/selftests/filesystems/failfs/Makefile | 5 + .../selftests/filesystems/failfs/failfs_test.c | 585 +++++++++++++++++++++ 44 files changed, 931 insertions(+), 5 deletions(-) create mode 100644 Documentation/filesystems/failfs.rst create mode 100644 fs/failfs.c create mode 100644 tools/testing/selftests/filesystems/failfs/.gitignore create mode 100644 tools/testing/selftests/filesystems/failfs/Makefile create mode 100644 tools/testing/selftests/filesystems/failfs/failfs_test.c