[PATCH 00/27] fs: port to const struct mnt_idmap
Seth Forshee
sforshee at kernel.org
Tue Sep 8 15:25:57 UTC 2026
On Tue, Sep 01, 2026 at 02:14:25PM +0200, Christian Brauner wrote:
> A mount's idmapping is immutable. The only thing that is allowed to be
> modified afterwards is the reference count and that is hidden behind
> mnt_idmap_get() and mnt_idmap_put(). Everything else only ever reads
> from the idmapping. This is the same model that struct cred uses and the
> idmapping is also rather sensitive.
>
> So make the idmap argument const wherever we can. The conversion is done
> from the bottom up so callers can continue to pass a non-const pointer
> to a const parameter until the conversion is finished.
>
> Signed-off-by: Christian Brauner (Amutable) <brauner at kernel.org>
Looks good!
Reviewed-by: Seth Forshee <sforshee at kernel.org>
More information about the Linux-security-module-archive
mailing list