Skip to contentSkip to conversation

6.18.66-rc1 review

PATCH In review Greg Kroah-Hartman 11 participants 1,010 messages Nov 25 – Nov 30 Page 10 of 10

Subsystems (3)
lore
Share & tools
lore
#421 lore raw

Re: [PATCH 6.18 418/990] ovl: allow idmapping overlay mounts

In reply to Greg Kroah-Hartman
Quoted 54 lines · Greg Kroah-Hartman

6.18-stable review patch. If anyone has any objections, please let me know.

------------------

From: Christian Brauner <[email protected]>

[ Upstream commit adedb6a00a1e4c77b1de9ea1f63b5008ad0c21f5 ]

Now that every overlay inode operation honors the overlay mount idmap, allow the merged overlay mount itself to be idmapped by setting FS_ALLOW_IDMAP on ovl_fs_type. mount_setattr(MOUNT_ATTR_IDMAP) can then apply an idmapping to an overlay mount, exposing the merged tree under a different ownership view.

The composition is clean because overlayfs already normalizes every underlying id through the relevant layer idmap when it copies attributes into the overlay inode (ovl_copyattr()); the overlay inode's i_{u,g}id are thus "overlay-final" ids. The overlay mount idmap composes on top of that pivot: it is applied to (getattr) and removed from (setattr, create) those ids at the overlay-inode boundary - permission, getattr, setattr, ACL owner checks and inode_init_owner() - while the underlying layers keep being accessed with the mounter's credentials through their own, possibly idmapped, mounts. The mount idmap therefore only changes how the caller sees the overlay inode and never widens the mounter's access to the layers.

This is deliberately the final code patch of the series: only once every operation honors the mount idmap is it safe to make overlay mounts idmappable.

Stable-dep-of: cb6c084182d4 ("ovl: release the upperdir/workdir in-use locks before the umount sync")

---
 fs/overlayfs/super.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
fs/overlayfs/super.c +1 -2
index 52d6f32a5a7c3..71ce12e203ea0 100644
@@ -1611,7 +1611,7 @@ struct file_system_type ovl_fs_type = {
        .name                   = "overlay",
        .init_fs_context        = ovl_init_fs_context,
        .parameters             = ovl_parameter_spec,
-       .fs_flags               = FS_USERNS_MOUNT,
+       .fs_flags               = FS_USERNS_MOUNT | FS_ALLOW_IDMAP,
        .kill_sb                = kill_anon_super,
 };
 MODULE_ALIAS_FS("overlay");
--
Quoted 2 lines

2.53.0

Please drop this patch and teach the bot to never
backport an fs_flags change commit as Stable-dep

Thanks,
Amir.

maintainer
#422 lore raw

Re: [PATCH 6.18 418/990] ovl: allow idmapping overlay mounts

Quoted 2 lines

Please drop this patch and teach the bot to never
backport an fs_flags change commit as Stable-dep

Dropped from 6.18, 6.12 and 6.6, thanks. cb6c084182d4 ("ovl: release the upperdir/workdir in-use locks before the umount sync") stays, with its .fs_flags context line refreshed so it no longer needs it.

Signature · 2 lines
Thanks,
Sasha
#83 lore raw

Re: [PATCH 6.18 082/990] wifi: ath10k: Stop unanswered temperature reads

In reply to Greg Kroah-Hartman
Quoted 1 line · Greg Kroah-Hartman

6.18-stable review patch. If anyone has any objections, please let me know.

this was reverted in Linus' tree, please do not backport