diff options
| author | Christian Brauner <brauner@kernel.org> | 2026-06-15 15:19:51 +0200 |
|---|---|---|
| committer | Christian Brauner <brauner@kernel.org> | 2026-06-29 10:32:31 +0200 |
| commit | 21b9aa3b8025445a71d5715458ea88457ca9e43f (patch) | |
| tree | 07f913e9803c55625cf35d963b74ab7744683639 /tools/tracing/rtla/tests/scripts/lib/git@git.tavy.me:linux.git | |
| parent | aed5860e1b5e4726deb968d1da7e8274af962f53 (diff) | |
ovl: handle idmapped mounts in ovl_permission()
When the overlay mount is idmapped, the permission check on the overlay
inode must account for the mount's idmapping. Use the struct mnt_idmap
passed in by the VFS instead of the hardcoded &nop_mnt_idmap when
checking the overlay inode against the caller's credentials.
The second check, which verifies that the mounter may access the
underlying real inode, continues to use the real layer's idmap
mnt_idmap(realpath.mnt) under the mounter's credentials and is
deliberately left unchanged. The overlay mount idmap only affects how
the caller views the overlay inode, not the mounter's access to the
layers, so it cannot widen access to the real files.
No functional change until FS_ALLOW_IDMAP is set on ovl_fs_type; until
then the overlay mount idmap is always &nop_mnt_idmap.
Link: https://patch.msgid.link/20260615-work-idmapped-overlayfs-v1-2-7381632aa402@kernel.org
Reviewed-by: Amir Goldstein <amir73il@gmail.com>
Signed-off-by: Christian Brauner (Amutable) <brauner@kernel.org>
Diffstat (limited to 'tools/tracing/rtla/tests/scripts/lib/git@git.tavy.me:linux.git')
0 files changed, 0 insertions, 0 deletions
