Star64_linux/fs/proc
Christian Brauner 47291baa8d
namei: make permission helpers idmapped mount aware
The two helpers inode_permission() and generic_permission() are used by
the vfs to perform basic permission checking by verifying that the
caller is privileged over an inode. In order to handle idmapped mounts
we extend the two helpers with an additional user namespace argument.
On idmapped mounts the two helpers will make sure to map the inode
according to the mount's user namespace and then peform identical
permission checks to inode_permission() and generic_permission(). If the
initial user namespace is passed nothing changes so non-idmapped mounts
will see identical behavior as before.

Link: https://lore.kernel.org/r/20210121131959.646623-6-christian.brauner@ubuntu.com
Cc: Christoph Hellwig <hch@lst.de>
Cc: David Howells <dhowells@redhat.com>
Cc: Al Viro <viro@zeniv.linux.org.uk>
Cc: linux-fsdevel@vger.kernel.org
Reviewed-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: James Morris <jamorris@linux.microsoft.com>
Acked-by: Serge Hallyn <serge@hallyn.com>
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2021-01-24 14:27:16 +01:00
..
array.c proc: provide details on indirect branch speculation 2020-12-15 22:46:15 -08:00
base.c namei: make permission helpers idmapped mount aware 2021-01-24 14:27:16 +01:00
bootconfig.c
cmdline.c
consoles.c
cpuinfo.c proc/cpuinfo: switch to ->read_iter 2020-11-06 10:05:18 -08:00
devices.c
fd.c namei: make permission helpers idmapped mount aware 2021-01-24 14:27:16 +01:00
fd.h
generic.c proc: fix lookup in /proc/net subdirectories after setns(2) 2020-12-15 22:46:15 -08:00
inode.c proc: wire up generic_file_splice_read for iter ops 2020-11-06 10:05:18 -08:00
internal.h fs/proc: make pde_get() return nothing 2020-12-15 22:46:15 -08:00
interrupts.c
Kconfig
kcore.c arm: remove CONFIG_ARCH_HAS_HOLES_MEMORYMODEL 2020-12-15 12:13:42 -08:00
kmsg.c
loadavg.c
Makefile
meminfo.c mm: memcontrol: account pagetables per node 2020-12-15 12:13:40 -08:00
namespaces.c
nommu.c
page.c
proc_net.c proc: fix lookup in /proc/net subdirectories after setns(2) 2020-12-15 22:46:15 -08:00
proc_sysctl.c
proc_tty.c
root.c
self.c proc: don't allow async path resolution of /proc/self components 2020-11-13 16:47:52 -07:00
softirqs.c
stat.c time-namespace-v5.11 2020-12-14 16:35:39 -08:00
task_mmu.c mm: don't play games with pinned pages in clear_page_refs 2021-01-16 10:51:26 -08:00
task_nommu.c
thread_self.c
uptime.c
util.c
version.c
vmcore.c