linux/fs/proc
Alexey Gladkov 05dab768fc proc: handle subset=pid separately in userns visibility checks
When procfs is mounted with subset=pid, only the dynamic process-related
part of the filesystem remains visible. That part cannot be hidden by
overmounts, so checking whether an existing procfs mount is fully
visible does not make sense for this mode.

At the same time, a subset=pid procfs mount must not be used as evidence
that a later procfs mount would not reveal additional information. It
provides a restricted view of procfs, not the full filesystem view.

Mark subset=pid procfs instances as restricted variants. Ignore
restricted variants when looking for an already-visible mount, and allow
new restricted variants without consulting mnt_already_visible().

Signed-off-by: Alexey Gladkov <legion@kernel.org>
Link: https://patch.msgid.link/4d5e760c3d534dd2e05578d119cc408450053a98.1777278334.git.legion@kernel.org
Reviewed-by: Aleksa Sarai <aleksa@amutable.com>
Signed-off-by: Christian Brauner <brauner@kernel.org>
2026-05-11 23:13:02 +02:00
..
array.c proc: array: drop stale FIXME about RCU in task_sig() 2026-03-27 21:19:32 -07:00
base.c vfs-7.1-rc1.misc 2026-04-13 14:20:11 -07:00
bootconfig.c fs/proc: Skip bootloader comment if no embedded kernel parameters 2024-04-09 23:36:18 +09:00
cmdline.c
consoles.c proc: Add nbcon support for /proc/consoles 2024-09-04 15:56:33 +02:00
cpuinfo.c
devices.c
fd.c vfs-7.1-rc1.misc 2026-04-13 14:20:11 -07:00
fd.h
generic.c proc: allow to mark /proc files permanent outside of fs/proc/ 2026-05-11 23:13:01 +02:00
inode.c fs/proc: replace "__auto_type" with "const auto" 2025-12-08 15:32:15 -08:00
internal.h proc: allow to mark /proc files permanent outside of fs/proc/ 2026-05-11 23:13:01 +02:00
interrupts.c fs/procfs: Switch to irq_get_nr_irqs() 2024-10-16 21:56:59 +02:00
Kconfig virtio-mem: support CONFIG_PROC_VMCORE_DEVICE_RAM 2025-01-27 09:39:25 -05:00
kcore.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
kmsg.c
loadavg.c
Makefile kbuild: make -Woverride-init warnings more consistent 2024-03-31 11:32:26 +09:00
meminfo.c mm.git review status for linus..mm-stable 2026-04-15 12:59:16 -07:00
namespaces.c proc: rename proc_setattr to proc_nochmod_setattr 2026-03-26 15:16:54 +01:00
nommu.c
page.c fs/proc/page: remove unused KPMBITS 2025-11-20 14:03:42 -08:00
proc_net.c proc: subset=pid: Show /proc/self/net only for CAP_NET_ADMIN 2026-05-11 23:13:01 +02:00
proc_sysctl.c Current exclusion rules for ->d_flags stores are rather unpleasant. 2025-07-28 09:17:57 -07:00
proc_tty.c
root.c proc: handle subset=pid separately in userns visibility checks 2026-05-11 23:13:02 +02:00
self.c fs/proc: Don't lock root inode when creating "self" and "thread-self" 2026-03-06 10:24:11 +01:00
softirqs.c proc/softirqs: replace seq_printf with seq_put_decimal_ull_width 2024-11-07 07:40:14 -10:00
stat.c fs/procfs: Switch to irq_get_nr_irqs() 2024-10-16 21:56:59 +02:00
task_mmu.c treewide: change inode->i_ino from unsigned long to u64 2026-03-06 14:31:28 +01:00
task_nommu.c fs/proc/task_mmu: factor out proc_maps_private fields used by PROCMAP_QUERY 2025-09-13 16:54:48 -07:00
thread_self.c fs/proc: Don't lock root inode when creating "self" and "thread-self" 2026-03-06 10:24:11 +01:00
uptime.c
util.c
version.c
vmcore.c mm: rename my_zero_pfn() to zero_pfn() 2026-04-05 13:53:01 -07:00