From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-qk1-f170.google.com (mail-qk1-f170.google.com [209.85.222.170]) (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 B32604A483B for ; Wed, 2 Sep 2026 19:34:58 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.222.170 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1788377714; cv=none; b=WJC0mrYEUa8/K5+jR5onGUFac05sMIutvajTD4EVYW3alJojAHYu18Ooeqpr8SMr6sjf7g1dug2N+c5vTsbVaXucPu9/3AAfONTuMpiNChuxLGjAZCljLT3Rc5aTF+Z4ejBjm0EK1uqBsUUlsbHeLaCd8zoXp+O2TZlRUnTU2Ek= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1788377714; c=relaxed/simple; bh=9YDoT9jwp8RfcqmUzmkrtAhWc+TIQ8qBkmrmT7QKAu0=; h=Date:Message-ID:MIME-Version:Content-Type:From:To:Cc:Subject: References:In-Reply-To; b=Iq2p7WfSkGmeKCdv4R1vvZZp3jdz6Kb0mneVp9XeUrVLuQxa3p92LX5Qa7csLrCZ8qMChG7aYx7mBKateLa8iIwWjK4ys+H878gN5tsclfIhbKDxFIPKjzHFrxwU6JBPaVd940w7JdEmtbdWL2pChkxHcyjA48cqijWxInb1tRs= 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=dnAgmBub; arc=none smtp.client-ip=209.85.222.170 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="dnAgmBub" Received: by mail-qk1-f170.google.com with SMTP id af79cd13be357-92e57a753f9so176013885a.2 for ; Wed, 02 Sep 2026 12:34:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=paul-moore.com; s=google; t=1788377694; x=1788982494; 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=GmC/3FuDYcsm/y4BEp+cIEvZVzU1YcpC+9hZf0Nce20=; b=dnAgmBubzItCWoW33zQ/cr6kWmF4Rk2Mzkb8dOowwzfxGpXFGMBwxM65QfZSd821Ap 7ttC25x9+D/mO6vn5MkIV24PbKTo9Vt6kIPas1lPB1pEzgdWSlwBAd3+bdxaApR/U71l rtZ6t1XtkEXjp95KW9kdMSF2hgvloIQ2NalxBCIQesnwQOuIPnLnmtlMiKyodYHWYLV6 b+L33zYO1RuwM6ia6I1kEDT88db9HPsVKBEezsg2uLw/hyT0mU7Okca6f/iovh/Ra1Nt qBq5iOngSjEQhLoApD/73uQwexipUWiOf1fXu/zQVcMCkpXGymML66jn94RfN/dR2xV6 K1mQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1788377694; x=1788982494; 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=GmC/3FuDYcsm/y4BEp+cIEvZVzU1YcpC+9hZf0Nce20=; b=Ncog5LQlAABvFEB6pbz8B/ZsXVz7Nt7tw1Thpy2vSZyUc7hiWYo3XzGkoo8QJTAoLj VBQ9DN0WY3ycW6JIQx2uTS5CkZSlhWEe/LQD+2XvBKWzEG6P285um1jqepNyQ/R/2IPV 5iJSPAGd0hQh/LftLPtbXxv+1oxB9/qYR6T4zA8iY9xRtqz6VqMuIa51tM+sMVIvLFMp ZmvKCXkSjXFSEu95g2rGmD3N88Hpp2/f3sCOndkb22ih1UypDhEKVYO+ecKyByjOSFGf CuO/qrHJooCYvK1agYbOl1jw7/3t3+k8iYAZX1fBb7VHug7XOELXPfQ4Ss2PpjjwFnt4 zasg== X-Forwarded-Encrypted: i=1; AKwUvBzUp0gpZPwN3gH8j4yo838MOMgCEcp+whGXjAfOLolX4ryHEPbORojwI3g3PuqnPeA+wae7G1kTDTf1Q0dT@vger.kernel.org X-Gm-Message-State: AFuF++niVu/DJMlRkVhqE0w/9CgXmu8iuTASNlcAFNG1n8qdUgey/D7D U6F1b/rGtaq0KTphgvJR9kLcGhcHLB4xlFkiIqddTeZk34/2gqKgdu7B+YbYORhdoQ== X-Gm-Gg: AYBFou2x+bg68obG9jBNfdQKicSJ3kPSj6VFC++xEKDdq73b8jzOcV/VnRcWGo5jiWY Axqz0hX/6dIW6EIjAT1s+4Uzu7ZcHSYOD91UWX1NmlursI8meW1o/Rx2QN7dMipOKQUweITVgxe phRqnr7/lPFzvJ1N8rjohn8F8zCe0gqMpe3E5WWVL9xxDxJn6r9ZdMRs8/kUk0qfL7xzIZ0B6dw +lj4IBovgC7Swg2I4rOkeW65s+g4x137a5U1UP9qpPfUyWsWjBoV2sWRv6rjOXHg/5nVonQxdWp rCD+I8t+6HmiuwU5/93aw3kst9doL+apdvJcl2yA49Wn8ZiumuuFa5uyrGC0HXFGSoLExPq+LM2 vaWRAphYpboNX8hYHfU7nDmDSz5rJWpsoLtqJpAjZG3j/OZpB2uPiXRiuqb5iBehg7fEp+lcrzf UVaUv1OPrf2PQIQIJpTL0AUFkdGMPRtXdBuEykPaFB3nSUvIh9+J8H3wbmq+VUsG8I2xcN3Q+D6 ezRbWZqfSaYn/n4N7FUW+BttFN38i+W3g== X-Received: by 2002:a05:620a:172a:b0:936:dbd7:fcb3 with SMTP id af79cd13be357-93960f15d45mr864484285a.21.1788377693773; Wed, 02 Sep 2026 12:34:53 -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 af79cd13be357-9395f3b3c2dsm291721585a.41.2026.09.02.12.34.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 02 Sep 2026 12:34:52 -0700 (PDT) Date: Wed, 02 Sep 2026 15:34:52 -0400 Message-ID: <0e3057eefea20157b73a9e454a501961@paul-moore.com> Precedence: bulk X-Mailing-List: linux-unionfs@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 18/27] fs: port ->mknod() to pass const mnt_idmap References: <20260901-work-idmap-const-v1-18-54ccd48e100b@kernel.org> In-Reply-To: <20260901-work-idmap-const-v1-18-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 +- > fs/9p/vfs_inode.c | 2 +- > fs/9p/vfs_inode_dotl.c | 4 ++-- > fs/bad_inode.c | 2 +- > fs/btrfs/inode.c | 2 +- > fs/ceph/dir.c | 2 +- > fs/ecryptfs/inode.c | 2 +- > fs/ext2/namei.c | 2 +- > fs/ext4/namei.c | 2 +- > fs/f2fs/namei.c | 2 +- > fs/fuse/dir.c | 4 ++-- > fs/gfs2/inode.c | 2 +- > fs/hfsplus/dir.c | 2 +- > fs/hostfs/hostfs_kern.c | 2 +- > fs/hpfs/namei.c | 2 +- > fs/hugetlbfs/inode.c | 2 +- > fs/jffs2/dir.c | 4 ++-- > fs/jfs/namei.c | 2 +- > fs/minix/namei.c | 2 +- > fs/nfs/dir.c | 2 +- > fs/nfs/internal.h | 2 +- > fs/nilfs2/namei.c | 2 +- > fs/ntfs/namei.c | 2 +- > fs/ntfs3/namei.c | 2 +- > fs/ocfs2/namei.c | 2 +- > fs/overlayfs/dir.c | 2 +- > fs/ramfs/inode.c | 2 +- > fs/smb/client/cifsfs.h | 2 +- > fs/smb/client/dir.c | 2 +- > fs/ubifs/dir.c | 2 +- > fs/udf/namei.c | 2 +- > fs/ufs/namei.c | 2 +- > fs/xfs/xfs_iops.c | 2 +- > include/linux/fs.h | 2 +- > include/linux/lsm_hook_defs.h | 2 +- > include/linux/security.h | 4 ++-- > mm/shmem.c | 4 ++-- > security/integrity/evm/evm_main.c | 2 +- > security/integrity/ima/ima_main.c | 2 +- > security/security.c | 2 +- > 41 files changed, 46 insertions(+), 46 deletions(-) Acked-by: Paul Moore (LSM) -- paul-moore.com