From: Paul Moore <paul@paul-moore.com>
To: Christian Brauner <brauner@kernel.org>, linux-fsdevel@vger.kernel.org
Cc: Alexander Viro <viro@zeniv.linux.org.uk>, Jan Kara <jack@suse.cz>,
Christoph Hellwig <hch@lst.de>,
Seth Forshee <sforshee@kernel.org>,
linux-security-module@vger.kernel.org,
Mimi Zohar <zohar@linux.ibm.com>,
linux-integrity@vger.kernel.org,
Ilya Dryomov <idryomov@gmail.com>,
ceph-devel@vger.kernel.org, Carlos Maiolino <cem@kernel.org>,
linux-xfs@vger.kernel.org, Miklos Szeredi <miklos@szeredi.hu>,
Amir Goldstein <amir73il@gmail.com>,
linux-unionfs@vger.kernel.org,
Namjae Jeon <linkinjeon@kernel.org>,
linux-cifs@vger.kernel.org, linux-kernel@vger.kernel.org,
"Christian Brauner (Amutable)" <brauner@kernel.org>
Subject: Re: [PATCH 13/27] fs: port xattr to const mnt_idmap
Date: Wed, 02 Sep 2026 15:34:49 -0400 [thread overview]
Message-ID: <f12155b3bc5ca8d846bf822b35f6b857@paul-moore.com> (raw)
In-Reply-To: <20260901-work-idmap-const-v1-13-54ccd48e100b@kernel.org>
On Sep 1, 2026 Christian Brauner <brauner@kernel.org> wrote:
>
> Convert to const struct mnt_idmap.
>
> 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.
>
> No functional changes.
>
> Signed-off-by: Christian Brauner (Amutable) <brauner@kernel.org>
> Reviewed-by: Jan Kara <jack@suse.cz>
> ---
> Documentation/filesystems/locking.rst | 2 +-
> fs/9p/xattr.c | 2 +-
> fs/afs/xattr.c | 4 ++--
> fs/attr.c | 2 +-
> fs/btrfs/xattr.c | 6 +++---
> fs/ceph/xattr.c | 2 +-
> fs/ecryptfs/inode.c | 2 +-
> fs/ext2/xattr_security.c | 2 +-
> fs/ext2/xattr_trusted.c | 2 +-
> fs/ext2/xattr_user.c | 2 +-
> fs/ext4/xattr_hurd.c | 2 +-
> fs/ext4/xattr_security.c | 2 +-
> fs/ext4/xattr_trusted.c | 2 +-
> fs/ext4/xattr_user.c | 2 +-
> fs/f2fs/xattr.c | 4 ++--
> fs/fuse/dir.c | 2 +-
> fs/fuse/fuse_i.h | 2 +-
> fs/fuse/xattr.c | 2 +-
> fs/gfs2/xattr.c | 2 +-
> fs/hfs/attr.c | 2 +-
> fs/hfsplus/xattr.c | 2 +-
> fs/hfsplus/xattr_security.c | 2 +-
> fs/hfsplus/xattr_trusted.c | 2 +-
> fs/hfsplus/xattr_user.c | 2 +-
> fs/jffs2/security.c | 2 +-
> fs/jffs2/xattr_trusted.c | 2 +-
> fs/jffs2/xattr_user.c | 2 +-
> fs/jfs/xattr.c | 4 ++--
> fs/kernfs/inode.c | 4 ++--
> fs/nfs/nfs4proc.c | 10 +++++-----
> fs/ntfs/ea.c | 2 +-
> fs/ntfs3/xattr.c | 2 +-
> fs/ocfs2/xattr.c | 6 +++---
> fs/orangefs/xattr.c | 2 +-
> fs/overlayfs/xattrs.c | 4 ++--
> fs/pidfs.c | 2 +-
> fs/smb/client/xattr.c | 2 +-
> fs/smb/server/vfs.c | 24 ++++++++++++------------
> fs/smb/server/vfs.h | 20 ++++++++++----------
> fs/ubifs/xattr.c | 2 +-
> fs/xattr.c | 22 +++++++++++-----------
> fs/xfs/xfs_iops.c | 2 +-
> fs/xfs/xfs_xattr.c | 2 +-
> include/linux/capability.h | 4 ++--
> include/linux/fs.h | 2 +-
> include/linux/lsm_hook_defs.h | 8 ++++----
> include/linux/security.h | 20 ++++++++++----------
> include/linux/xattr.h | 20 ++++++++++----------
> kernel/bpf/inode.c | 2 +-
> mm/shmem.c | 2 +-
> net/socket.c | 4 ++--
> security/commoncap.c | 8 ++++----
> security/integrity/evm/evm_main.c | 4 ++--
> security/integrity/ima/ima_appraise.c | 4 ++--
> security/security.c | 8 ++++----
> security/selinux/hooks.c | 6 +++---
> security/smack/smack_lsm.c | 6 +++---
> 57 files changed, 135 insertions(+), 135 deletions(-)
Acked-by: Paul Moore <paul@paul-moore.com> (LSM, SELinux)
--
paul-moore.com
next prev parent reply other threads:[~2026-09-02 19:34 UTC|newest]
Thread overview: 62+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-01 12:14 [PATCH 00/27] fs: port to const struct mnt_idmap Christian Brauner
2026-09-01 12:14 ` [PATCH 01/27] userns: pass const uid_gid_map in lookup helpers Christian Brauner
2026-09-02 14:06 ` Jan Kara
2026-09-01 12:14 ` [PATCH 02/27] fs: port mnt_idmap_{get,put}() to const mnt_idmap Christian Brauner
2026-09-02 14:08 ` Jan Kara
2026-09-01 12:14 ` [PATCH 03/27] fs: port vfs{g,u}id helpers " Christian Brauner
2026-09-02 14:11 ` Jan Kara
2026-09-01 12:14 ` [PATCH 04/27] fs: port fs{g,u}id " Christian Brauner
2026-09-02 14:13 ` Jan Kara
2026-09-01 12:14 ` [PATCH 05/27] fs: port i_{g,u}id_into_vfs{g,u}id() " Christian Brauner
2026-09-02 14:14 ` Jan Kara
2026-09-01 12:14 ` [PATCH 06/27] fs: port i_{g,u}id_{needs_}update() " Christian Brauner
2026-09-02 14:15 ` Jan Kara
2026-09-01 12:14 ` [PATCH 07/27] quota: port " Christian Brauner
2026-09-02 14:16 ` Jan Kara
2026-09-01 12:14 ` [PATCH 08/27] fs: port privilege checking helpers " Christian Brauner
2026-09-02 14:17 ` Jan Kara
2026-09-01 12:14 ` [PATCH 09/27] fs: port inode_owner_or_capable() " Christian Brauner
2026-09-02 14:18 ` Jan Kara
2026-09-01 12:14 ` [PATCH 10/27] fs: port inode_init_owner() " Christian Brauner
2026-09-02 14:20 ` Jan Kara
2026-09-01 12:14 ` [PATCH 11/27] fs: port acl " Christian Brauner
2026-09-02 14:22 ` Jan Kara
2026-09-02 19:34 ` Paul Moore
2026-09-01 12:14 ` [PATCH 12/27] fs: port ->permission() to pass " Christian Brauner
2026-09-02 15:38 ` Jan Kara
2026-09-02 19:34 ` Paul Moore
2026-09-01 12:14 ` [PATCH 13/27] fs: port xattr to " Christian Brauner
2026-09-02 15:42 ` Jan Kara
2026-09-02 19:34 ` Paul Moore [this message]
2026-09-01 12:14 ` [PATCH 14/27] fs: port ->fileattr_set() to pass " Christian Brauner
2026-09-02 15:43 ` Jan Kara
2026-09-01 12:14 ` [PATCH 15/27] fs: port ->set_acl() " Christian Brauner
2026-09-02 15:45 ` Jan Kara
2026-09-01 12:14 ` [PATCH 16/27] fs: port ->get_acl() " Christian Brauner
2026-09-02 15:45 ` Jan Kara
2026-09-01 12:14 ` [PATCH 17/27] fs: port ->tmpfile() " Christian Brauner
2026-09-02 15:47 ` Jan Kara
2026-09-02 19:34 ` Paul Moore
2026-09-01 12:14 ` [PATCH 18/27] fs: port ->mknod() " Christian Brauner
2026-09-02 15:49 ` Jan Kara
2026-09-02 19:34 ` Paul Moore
2026-09-01 12:14 ` [PATCH 19/27] fs: port ->rename() " Christian Brauner
2026-09-02 15:50 ` Jan Kara
2026-09-01 12:14 ` [PATCH 20/27] fs: port ->mkdir() " Christian Brauner
2026-09-02 15:52 ` Jan Kara
2026-09-01 12:14 ` [PATCH 21/27] fs: port ->symlink() " Christian Brauner
2026-09-02 15:53 ` Jan Kara
2026-09-01 12:14 ` [PATCH 22/27] fs: port ->create() " Christian Brauner
2026-09-02 15:55 ` Jan Kara
2026-09-01 12:14 ` [PATCH 23/27] fs: port ->getattr() " Christian Brauner
2026-09-02 15:58 ` Jan Kara
2026-09-01 12:14 ` [PATCH 24/27] fs: port ->setattr() " Christian Brauner
2026-09-01 15:53 ` Casey Schaufler
2026-09-02 16:01 ` Jan Kara
2026-09-02 19:34 ` Paul Moore
2026-09-01 12:14 ` [PATCH 25/27] fs: port vfs_*() helpers to " Christian Brauner
2026-09-02 16:02 ` Jan Kara
2026-09-01 12:14 ` [PATCH 26/27] fs: port mnt_idmap() and file_mnt_idmap() " Christian Brauner
2026-09-02 16:06 ` Jan Kara
2026-09-01 12:14 ` [PATCH 27/27] fs: make nop_mnt_idmap and invalid_mnt_idmap const Christian Brauner
2026-09-02 16:07 ` Jan Kara
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=f12155b3bc5ca8d846bf822b35f6b857@paul-moore.com \
--to=paul@paul-moore.com \
--cc=amir73il@gmail.com \
--cc=brauner@kernel.org \
--cc=cem@kernel.org \
--cc=ceph-devel@vger.kernel.org \
--cc=hch@lst.de \
--cc=idryomov@gmail.com \
--cc=jack@suse.cz \
--cc=linkinjeon@kernel.org \
--cc=linux-cifs@vger.kernel.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-integrity@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-security-module@vger.kernel.org \
--cc=linux-unionfs@vger.kernel.org \
--cc=linux-xfs@vger.kernel.org \
--cc=miklos@szeredi.hu \
--cc=sforshee@kernel.org \
--cc=viro@zeniv.linux.org.uk \
--cc=zohar@linux.ibm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox