linux/drivers/char
Linus Torvalds fff0150b02 vfs-7.3-rc1.kthread
Please consider pulling these changes from the signed vfs-7.3-rc1.kthread tag.
 
 Thanks!
 Christian
 -----BEGIN PGP SIGNATURE-----
 
 iHUEABYKAB0WIQRAhzRXHqcMeLMyaSiRxhvAZXjcogUCan7RJQAKCRCRxhvAZXjc
 ohHuAQCFeGhxqsb44KhuJaWXewiXbefr6eg31lXmxgSfg0DILAD/Tw/WmpiUbX5M
 H+/jh6NmLKnQ/ADjlWFRy3R1K1Il3w4=
 =jwPP
 -----END PGP SIGNATURE-----

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

Pull kthread vfs updates from Christian Brauner:
 "This stops kernel threads from sharing filesystem state with
  userspace. This work is about 3 cycles old and has been in -next
  for about that time.

  When the kernel boots init_task creates PID 1 and then kthreadd. From
  that point every kthread and PID 1 share the same fs_struct. That is
  why pivot_root() has to rewrite the fs_struct of all kthreads. The
  rewriting exists so that kthreads can use init's filesystem state when
  they want to. It also means userspace can move the ground out from
  under the kernel.

  PID 1 now gets a completely separate fs_struct. All kthreads are
  anchored in a private SB_KERNMOUNT instance of nullfs that cannot be
  mounted on and cannot be used to follow other mounts. Userspace init
  can no longer affect kthread filesystem state and kthreads can no
  longer affect userspace fs state without explicit opting in to that.

  Path lookup from a kthread now fails by default. It makes it
  deliberately hard to offload security sensitive operations into init's
  filesystem state from a kthread.

  Places that legitimately need to look something up there opt in
  through the new scoped_with_init_fs() which temporarily overrides the
  caller's fs_struct with init's. usermodehelpers remain the only kernel
  tasks that genuinely share init's filesystem state, since they execute
  random binaries in the root filesystem (excellent...).

  The visible result is that /proc/2/root is a nullfs with an empty
  mountinfo while /proc/1/root is the real root"

* tag 'vfs-7.3-rc1.kthread' of git://git.kernel.org/pub/scm/linux/kernel/git/vfs/vfs: (26 commits)
  initramfs_test: use test init/exit hooks to override init fs
  fs: stop rewriting paths for PF_EXITING | PF_DUMPCORE
  fs: stop rewriting kthread fs structs
  fs: start all kthreads in nullfs
  nullfs: make nullfs multi-instance
  devtmpfs: create private mount namespace
  fs: add umh argument to struct kernel_clone_args
  fs: stop sharing fs_struct between init_task and pid 1
  af_unix: use scoped_with_init_fs() for coredump socket lookup
  initramfs: use scoped_with_init_fs() for rootfs unpacking
  pnfs/blocklayout: use scoped_with_init_fs() for SCSI device lookup
  ksmbd: use scoped_with_init_fs() for VFS path operations
  ksmbd: use scoped_with_init_fs() for filesystem info path lookup
  ksmbd: use scoped_with_init_fs() for share path resolution
  fs: use scoped_with_init_fs() for kernel_read_file_from_path_initns()
  coredump: use scoped_with_init_fs() for coredump path resolution
  btrfs: use scoped_with_init_fs() for update_dev_time()
  scsi: target: use scoped_with_init_fs() for APTPL metadata
  scsi: target: use scoped_with_init_fs() for ALUA metadata
  crypto: ccp: use scoped_with_init_fs() for SEV file access
  ...
2026-08-17 11:35:12 -07:00
..
agp drm-next for 7.2-rc1 2026-06-17 10:21:00 +01:00
hw_random Replace <linux/mod_devicetable.h> by more specific <linux/device-id/*.h> (c files) 2026-07-03 07:38:17 +02:00
ipmi ipmi: Drop unused assignment of platform_device_id driver data 2026-06-16 14:26:36 -05:00
tpm tpm: Make the TPM character devices non-seekable 2026-07-12 12:52:34 -07:00
xilinx_hwicap xilinx_hwicap: fifo_icap.c: fix all kernel-doc warnings 2026-01-16 16:36:04 +01:00
xillybus Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
adi.c char/adi: Use min_t(size_t,,) in adi_read() + adi_write() 2025-10-22 07:53:49 +02:00
apm-emulation.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
bsr.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
ds1620.c [tree-wide] finally take no_llseek out 2024-09-27 08:18:43 -07:00
dsp56k.c dsp56k: add missing MODULE_DESCRIPTION() macro 2024-07-03 16:40:26 +02:00
hangcheck-timer.c hangcheck-timer: fix coding style spacing 2025-11-26 15:11:15 +01:00
hpet.c hpet: Check ACPI_COMPANION() against NULL at probe time 2026-05-23 13:47:34 +02:00
Kconfig char: applicom: remove low-quality, unused driver 2026-05-23 13:47:34 +02:00
lp.c parport: Remove parport_driver.devmodel 2024-07-03 16:44:22 +02:00
Makefile char: applicom: remove low-quality, unused driver 2026-05-23 13:47:34 +02:00
mem.c mm/vma: eliminate mmap_action->error_hook, introduce error_override 2026-06-04 14:45:00 -07:00
misc_minor_kunit.c initramfs_test: use test init/exit hooks to override init fs 2026-07-31 12:56:51 +02:00
misc.c char: Use list_del_init() in misc_deregister() to reinitialize list pointer 2025-09-06 19:43:18 +02:00
nsc_gpio.c char: remove unnecessary module_init/exit functions 2026-04-02 17:05:53 +02:00
nvram.c char/nvram: Remove redundant nvram_mutex 2026-05-23 13:47:34 +02:00
nwbutton.c char: add missing NetWinder MODULE_DESCRIPTION() macros 2024-07-31 13:47:45 +02:00
nwbutton.h
nwflash.c char: add missing NetWinder MODULE_DESCRIPTION() macros 2024-07-31 13:47:45 +02:00
pc8736x_gpio.c [tree-wide] finally take no_llseek out 2024-09-27 08:18:43 -07:00
powernv-op-panel.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
ppdev.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
ps3flash.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
random.c random: vDSO: Remove ifdeffery 2026-03-11 15:22:49 +01:00
scx200_gpio.c [tree-wide] finally take no_llseek out 2024-09-27 08:18:43 -07:00
sonypi.c platform-drivers-x86 for v7.2-1 2026-06-23 08:31:33 -07:00
tlclk.c char: tlclk: fix use-after-free in tlclk_cleanup() 2026-05-23 13:47:33 +02:00
toshiba.c module: remove never implemented MODULE_SUPPORTED_DEVICE 2021-03-17 13:16:18 -07:00
ttyprintk.c char: add missing MODULE_DESCRIPTION() macros 2024-06-04 17:40:17 +02:00
uv_mmtimer.c
virtio_console.c virtio_console: read size from config space during device init 2026-06-10 02:14:02 -04:00