linux/fs/proc
Christian Brauner 41839e7bd9
fs: port ->permission() to pass const mnt_idmap
Convert to const struct mnt_idmap.

A mount's idmapping is immutable. The only thing that is allowed to be
modified afterwards is the reference count and that is hidden behind
mnt_idmap_get() and mnt_idmap_put(). Everything else only ever reads
from the idmapping. This is the same model that struct cred uses and the
idmapping is also rather sensitive.

So make the idmap argument const wherever we can. The conversion is done
from the bottom up so callers can continue to pass a non-const pointer
to a const parameter until the conversion is finished.

No functional changes.

Link: https://patch.msgid.link/20260901-work-idmap-const-v1-12-54ccd48e100b@kernel.org
Acked-by: Paul Moore <paul@paul-moore.com>
Reviewed-by: Jan Kara <jack@suse.cz>
Reviewed-by: Seth Forshee <sforshee@kernel.org>
Signed-off-by: Christian Brauner (Amutable) <brauner@kernel.org>
2026-09-23 09:19:49 +02:00
..
array.c fs: add real_fs to track task's actual fs_struct 2026-06-29 10:43:45 +02:00
base.c fs: port ->permission() to pass const mnt_idmap 2026-09-23 09:19:49 +02: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 fs: port ->permission() to pass const mnt_idmap 2026-09-23 09:19:49 +02:00
fd.h fs: port ->permission() to pass const mnt_idmap 2026-09-23 09:19:49 +02:00
generic.c proc: only bump parent nlink when registering directories 2026-07-01 15:26:24 +02:00
inode.c fs/proc: replace "__auto_type" with "const auto" 2025-12-08 15:32:15 -08:00
internal.h sysctl: remove CONFIG_PROC_SYSCTL, it just mirrors CONFIG_SYSCTL 2026-08-05 15:28:23 +02:00
interrupts.c fs/procfs: Switch to irq_get_nr_irqs() 2024-10-16 21:56:59 +02:00
Kconfig sysctl: remove CONFIG_PROC_SYSCTL, it just mirrors CONFIG_SYSCTL 2026-08-05 15:28:23 +02: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 sysctl: remove CONFIG_PROC_SYSCTL, it just mirrors CONFIG_SYSCTL 2026-08-05 15:28:23 +02:00
meminfo.c mm.git review status for linus..mm-stable 2026-04-15 12:59:16 -07:00
namespaces.c proc: Fix broken error paths for namespace links 2026-07-22 15:37:24 +02:00
nommu.c fs: create helper file_user_path() for user displayed mapped file path 2023-10-19 11:03:15 +02:00
page.c fs: stable_page_flags(): simplify KPF_IDLE handling 2026-08-06 18:57:19 -07: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 fs: port ->permission() to pass const mnt_idmap 2026-09-23 09:19:49 +02: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 Updates for the NOHZ subsystem: 2026-06-15 13:48:52 +05:30
task_mmu.c mm: provide vma_[flags_]is_cow_mapping() and remove is_cow_mapping() 2026-08-24 18:42:50 -07: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 tick/sched: Consolidate idle time fetching APIs 2026-06-02 21:27:26 +02:00
util.c
version.c
vmcore.c mm: rename my_zero_pfn() to zero_pfn() 2026-04-05 13:53:01 -07:00