mirror of
https://github.com/torvalds/linux.git
synced 2026-11-20 13:03:48 +00:00
Overayfs mounted with index=on or nfs_export=on require file handle
support from backing filesystems.
Overlay file handles identify a backing filesystem, but not the lower
mount used to decode it. If lower layers share a superblock and use
different idmaps, a handle can decode through the wrong layer.
Record the first idmap on a private lower clone for each backing
filesystem. Fail if another clone has a different idmap. Comparing
the private clones prevents mount_setattr() from changing the checked
state. Distinct idmap objects are treated as ambiguous.
Fixes: bc70682a49 ("ovl: support idmapped layers")
Suggested-by: Christian Brauner <[email protected]>
Link: Link: https://lore.kernel.org/all/20260925-server-hager-riskieren-06116eded213@brauner/
Cc: [email protected]
Signed-off-by: Jérémy Jean <[email protected]>
Signed-off-by: Amir Goldstein <[email protected]>