[PATCH v6 05/39] namei: make permission helpers idmapped mount aware

James Morris jmorris at namei.org
Fri Jan 22 03:02:51 UTC 2021

On Thu, 21 Jan 2021, Christian Brauner wrote:

> 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/20210112220124.837960-12-christian.brauner@ubuntu.com
> Cc: Christoph Hellwig <hch at lst.de>
> Cc: David Howells <dhowells at redhat.com>
> Cc: Al Viro <viro at zeniv.linux.org.uk>
> Cc: linux-fsdevel at vger.kernel.org
> Reviewed-by: Christoph Hellwig <hch at lst.de>
> Acked-by: Serge Hallyn <serge at hallyn.com>
> Signed-off-by: Christian Brauner <christian.brauner at ubuntu.com>

Reviewed-by: James Morris <jamorris at linux.microsoft.com>

James Morris
<jmorris at namei.org>

More information about the Linux-security-module-archive mailing list