From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-qk1-f175.google.com (mail-qk1-f175.google.com [209.85.222.175]) (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 0FE8A39524E for ; Wed, 2 Sep 2026 19:34:56 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.222.175 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1788377717; cv=none; b=An0atj74UapZ/4GY5OMrSrk/SFjclxwG+9u85PPlYWzZfC4ZpSCD8Cz7GkjvtettzCiFZsr8cYiApvYK2kVkaheWBqLpeMsOsfj7wCVJFhjGbi0N0gyoe14aJNDLhFM+X0OkqPe8zo9ME2D8qVszj3xRN8ROfhYXEA+VixQ0SRM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1788377717; c=relaxed/simple; bh=9YDoT9jwp8RfcqmUzmkrtAhWc+TIQ8qBkmrmT7QKAu0=; h=Date:Message-ID:MIME-Version:Content-Type:From:To:Cc:Subject: References:In-Reply-To; b=JXG8BDPnZ63FP+edY+6oiMvK7KyI0ham/hYw5tK6LXHyBu/Pk5vQBFRCnNycWwDj1SMO1dTLRKi2OFrz7osbHz3tf7F2hyBngSFt/yY3FQbueipOvncezta4K5fb3sNHLIeFjxhJmiTVgXmIxmh6Uhq4nNeGuRBvQXcbwSOaHWI= 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.175 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-f175.google.com with SMTP id af79cd13be357-92ea24a2dbfso189674385a.0 for ; Wed, 02 Sep 2026 12:34:55 -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=IeST49ig+RhkqRCSMMyooUhQDDg1Td57l5q8C38y24jEzybQI3Sm8AHgc0Kx3a5AHf AKi7np/H/euXhHtJ4Zrcgoa30t/9gn5n2qLGH6keUtFBhhmxMPxy5Y/dDVKAIVHtAKMU V/Wm1SJ60hgdIoRMUBiPPt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TP 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: ceph-devel@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