From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-qk1-f169.google.com (mail-qk1-f169.google.com [209.85.222.169]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 8807A3A0E8B for ; Wed, 2 Sep 2026 19:35:01 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.222.169 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1788377730; cv=none; b=W6VAZRrZnV3ztjIP1rpUvEkYVpKFjfzNO/Ij6LeDzQoKp+Y7iny5+GyKAwkuDalhtNHM1BPtv6PHi0+alCiUbQCYQlPtsEomTQIW27CWjyTFImrCeqU/0j/U8ohIPFvMYktkufg6eR44sVV2w2UWN4wvRPWZC+1b1hI6UZCHQik= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1788377730; c=relaxed/simple; bh=hV2MW1omBZf24pDu1TyLQ7VokUTMjJdalm/WKcqe5oQ=; h=Date:Message-ID:MIME-Version:Content-Type:From:To:Cc:Subject: References:In-Reply-To; b=c73Y3OzC1a/F1NmbbsgjY+lRVydSJ1u55zSTGB+VLA/4KWczUli/QDX0QN4eEE63QLEH3B6v7TOXvpj9DEL8c0kl1uAflazykXUmdL1lwKwU1Co7XLYqhOFS5LzJy6k9lQMrmwPQajpe+BkxVwKEioTUQEKxl2XUqcfYVG3ZM34= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=paul-moore.com; spf=pass smtp.mailfrom=paul-moore.com; dkim=pass (2048-bit key) header.d=paul-moore.com header.i=@paul-moore.com header.b=GOKkdTYL; arc=none smtp.client-ip=209.85.222.169 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=paul-moore.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=paul-moore.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=paul-moore.com header.i=@paul-moore.com header.b="GOKkdTYL" Received: by mail-qk1-f169.google.com with SMTP id af79cd13be357-92ea24a2dbfso189681185a.0 for ; Wed, 02 Sep 2026 12:35:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=paul-moore.com; s=google; t=1788377695; x=1788982495; darn=vger.kernel.org; h=in-reply-to:references:subject:cc:to:from:content-transfer-encoding :content-type:mime-version:message-id:date:from:to:cc:subject:date :message-id:reply-to:content-type; bh=GC4FIfkk2kp9PFt1uwqlIhd5i3bfmRn6wjlpVpmfWwA=; b=GOKkdTYLHtwfO3ngYpVGTvFI8bS9jy2AxeRMxBguqtyz+mrrUORq9lf9kDCSAKxOoR I2u1MFMWwWZGUNwTNq/9I+IlnwmgCDArVPN+m+Iu/wTXYKIlMgFa93lR+Jynm0Mu4qEf 5PxuBOn4U3HwoWjMrUL94iXOSPSBHNeM4yrBPcctQBFB5MDB+AQSFM9k5owfyUGQEbiN HUGDO1RvIz7iOVnLN1KfotthYbhUcF+ZHQXILDGx1Sj+n9/Ike59tT+7EsIK6KEFRo2/ Badzc6YVVwyjOiepd7sGNucttV9+0d0PqG4UHoWs9HhvSznmEOYBaD96nPZTIopNTfjc ituw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1788377695; x=1788982495; h=in-reply-to:references:subject:cc:to:from:content-transfer-encoding :content-type:mime-version:message-id:date:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to :content-type; bh=GC4FIfkk2kp9PFt1uwqlIhd5i3bfmRn6wjlpVpmfWwA=; b=et9jz66NtRVUxi04gpEGx23wAzUn9uMq6vzCd7Ec0Tvd3K+8cdl6Z3wzFNIZPq3uMd TNnh1h7epbWYouuEe8OJtkwzF8SIb3YLt5zLreKkombaIv4lJHVghM4DWWShC0t8TIxx osRIhDI3L2XacWq8TrRiHRmh9qLj9IbprvLAWBzN4yp9lK4tQLuNG062r9dojJjRXyyf +N/+qkpW15peZ2rSTeXG9fLN0WFops5NieX2i0dKhK4aBiwBiPi0dXjQe/9QaCY4/cFt HYXCupdCJD1lAEG8PMwOgN6w6qn35Z5yeQd6q9c2CnEQShg5ewEkaZUFyk5Wjb51gnyb 1SCA== X-Forwarded-Encrypted: i=1; AKwUvByJJ1Duzal8SdMeO/5yKWXwqRbmxouWc9NaZrL8EiZwcF04xnKxMpupWp0ismwXGHIZWA6YDiEt2tOV/Bvf@vger.kernel.org X-Gm-Message-State: AFuF++k+nJR9y8vRDcm6F4hi14F8A9tBzKKwHXVN2Yj8NKjqw7T9ruCQ 0S9LECfghR6VNQwSuPY16e2PJw+wO2QYf/GWOi+SKVVlxi/TgdO5tKW63JGmOx+ssg== X-Gm-Gg: AYBFou2HlnJ/wCt3I/EiDG9eHvM8anMaPbsoIF0avcI2vWuiq/5PwwebTAGnuDhWV5X B4hCcP9WGuIf5SrS7lNQAa5zVYDUAqIk7bYlQEQHyyPhnAobolyFwKpo4qOamdpCNs47CcTNK1m mOghiImSkY1SUCXUzdBs7+zySTwx89A9XGoHvQt3M9/R8kacLDWXu4IsHBeZcY9DSZzyHlySNkO wmh8DYVesrD//zRWtGPRLhH8eCJakPHG2M2nU1U7W73d6rWU70H1+Asi6ZPBM6K1Lmo722Yf3Qy FFWKa74bY7u6g8YifIQ/IQxUM1DA8mWr+B1o1+aQx+ljbg6QQBkUq6sI9tfrk1nkhkkNhxrDBvj J/P/nCiC4Sz8i0fm6/5/Rjni6IW/7PFUWexVLlu/SUfklDmRoV52eK9VamH6UqVwOO5Kj4Zyt53 Ix6sNcHFRoxFXvGfo1vzPOIdz5gckrJ1bHNU45LXSJG2pSm+UUsne/y3k9SGBskAjq4jwJoI5WZ 0/cCtZj5tydbSZ54Tx/r8WbsfU/bVr3O10= X-Received: by 2002:a05:620a:d94:b0:939:6de9:4cfb with SMTP id af79cd13be357-9396de968a9mr206623085a.46.1788377695492; Wed, 02 Sep 2026 12:34:55 -0700 (PDT) Received: from localhost (pool-71-126-255-178.bstnma.fios.verizon.net. [71.126.255.178]) by smtp.gmail.com with ESMTPSA id 6a1803df08f44-90e9ef0e9b1sm25737496d6.43.2026.09.02.12.34.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 02 Sep 2026 12:34:54 -0700 (PDT) Date: Wed, 02 Sep 2026 15:34:53 -0400 Message-ID: <0a5d61e6a17442e42646e98ac73dd7df@paul-moore.com> Precedence: bulk X-Mailing-List: linux-fsdevel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Mailer: pstg-pwork:20260902_1319/pstg-lib:20260901_1604/pstg-pwork:20260902_1319 From: Paul Moore To: Christian Brauner , linux-fsdevel@vger.kernel.org Cc: Alexander Viro , Jan Kara , Christoph Hellwig , Seth Forshee , linux-security-module@vger.kernel.org, Mimi Zohar , linux-integrity@vger.kernel.org, Ilya Dryomov , ceph-devel@vger.kernel.org, Carlos Maiolino , linux-xfs@vger.kernel.org, Miklos Szeredi , Amir Goldstein , linux-unionfs@vger.kernel.org, Namjae Jeon , linux-cifs@vger.kernel.org, linux-kernel@vger.kernel.org, "Christian Brauner (Amutable)" Subject: Re: [PATCH 24/27] fs: port ->setattr() to pass const mnt_idmap References: <20260901-work-idmap-const-v1-24-54ccd48e100b@kernel.org> In-Reply-To: <20260901-work-idmap-const-v1-24-54ccd48e100b@kernel.org> On Sep 1, 2026 Christian Brauner 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) > Reviewed-by: Jan Kara > --- > Documentation/filesystems/locking.rst | 2 +- > Documentation/filesystems/vfs.rst | 2 +- > arch/powerpc/platforms/cell/spufs/inode.c | 2 +- > fs/9p/v9fs_vfs.h | 2 +- > fs/9p/vfs_inode.c | 2 +- > fs/9p/vfs_inode_dotl.c | 2 +- > fs/adfs/adfs.h | 2 +- > fs/adfs/inode.c | 2 +- > fs/affs/affs.h | 2 +- > fs/affs/inode.c | 2 +- > fs/afs/inode.c | 2 +- > fs/afs/internal.h | 2 +- > fs/anon_inodes.c | 2 +- > fs/attr.c | 2 +- > fs/bad_inode.c | 2 +- > fs/btrfs/inode.c | 2 +- > fs/ceph/inode.c | 2 +- > fs/ceph/super.h | 2 +- > fs/coda/coda_linux.h | 2 +- > fs/coda/inode.c | 2 +- > fs/configfs/configfs_internal.h | 2 +- > fs/configfs/inode.c | 2 +- > fs/debugfs/inode.c | 2 +- > fs/ecryptfs/inode.c | 2 +- > fs/efivarfs/inode.c | 2 +- > fs/exfat/exfat_fs.h | 2 +- > fs/exfat/file.c | 2 +- > fs/ext2/ext2.h | 2 +- > fs/ext2/inode.c | 2 +- > fs/ext4/ext4.h | 2 +- > fs/ext4/inode.c | 2 +- > fs/f2fs/f2fs.h | 2 +- > fs/f2fs/file.c | 2 +- > fs/fat/fat.h | 2 +- > fs/fat/file.c | 2 +- > fs/fuse/dir.c | 2 +- > fs/gfs2/inode.c | 2 +- > fs/hfs/hfs_fs.h | 2 +- > fs/hfs/inode.c | 2 +- > fs/hfsplus/inode.c | 2 +- > fs/hostfs/hostfs_kern.c | 2 +- > fs/hpfs/hpfs_fn.h | 2 +- > fs/hpfs/inode.c | 2 +- > fs/hugetlbfs/inode.c | 2 +- > fs/inode.c | 2 +- > fs/internal.h | 2 +- > fs/jffs2/fs.c | 2 +- > fs/jffs2/os-linux.h | 2 +- > fs/jfs/file.c | 2 +- > fs/jfs/jfs_inode.h | 2 +- > fs/kernfs/inode.c | 2 +- > fs/kernfs/kernfs-internal.h | 2 +- > fs/libfs.c | 4 ++-- > fs/minix/file.c | 2 +- > fs/nfs/inode.c | 2 +- > fs/nfs/namespace.c | 2 +- > fs/nilfs2/inode.c | 2 +- > fs/nilfs2/nilfs.h | 2 +- > fs/ntfs/file.c | 2 +- > fs/ntfs/inode.h | 2 +- > fs/ntfs3/file.c | 2 +- > fs/ntfs3/ntfs_fs.h | 2 +- > fs/ocfs2/dlmfs/dlmfs.c | 2 +- > fs/ocfs2/file.c | 2 +- > fs/ocfs2/file.h | 2 +- > fs/omfs/file.c | 2 +- > fs/orangefs/inode.c | 2 +- > fs/orangefs/orangefs-kernel.h | 2 +- > fs/overlayfs/inode.c | 2 +- > fs/overlayfs/overlayfs.h | 2 +- > fs/pidfs.c | 2 +- > fs/proc/base.c | 2 +- > fs/proc/generic.c | 2 +- > fs/proc/internal.h | 2 +- > fs/proc/proc_sysctl.c | 2 +- > fs/ramfs/file-nommu.c | 4 ++-- > fs/smb/client/cifsfs.h | 2 +- > fs/smb/client/inode.c | 2 +- > fs/tracefs/event_inode.c | 2 +- > fs/tracefs/inode.c | 2 +- > fs/ubifs/file.c | 2 +- > fs/ubifs/ubifs.h | 2 +- > fs/udf/file.c | 2 +- > fs/ufs/inode.c | 2 +- > fs/ufs/ufs.h | 2 +- > fs/vboxsf/utils.c | 2 +- > fs/vboxsf/vfsmod.h | 2 +- > fs/xfs/xfs_iops.c | 2 +- > fs/zonefs/super.c | 2 +- > include/linux/fs.h | 6 +++--- > include/linux/lsm_hook_defs.h | 4 ++-- > include/linux/nfs_fs.h | 2 +- > include/linux/security.h | 8 ++++---- > mm/secretmem.c | 2 +- > mm/shmem.c | 2 +- > net/socket.c | 2 +- > security/integrity/evm/evm_main.c | 4 ++-- > security/integrity/ima/ima_appraise.c | 2 +- > security/security.c | 4 ++-- > security/selinux/hooks.c | 2 +- > security/smack/smack_lsm.c | 2 +- > virt/kvm/guest_memfd.c | 2 +- > 102 files changed, 112 insertions(+), 112 deletions(-) Acked-by: Paul Moore (LSM, SELinux) -- paul-moore.com