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 7D1A13A7F66 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=1788377703; cv=none; b=WvjMg3AgjvS1A+h6lxbXF5msTqtTTBcBvXRSdG1CJkMCuAfjtaAYassZiypQ7ACtzupwuYH0+ECpgs0WheXlVYq7hhMFNvuqAi422IuDjerl4X2nO/bwODFnIv+RibacdoL48XEYB1SDXr91jPUl/BRVAWS0I/bejlkYzxi8KlE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1788377703; c=relaxed/simple; bh=9YDoT9jwp8RfcqmUzmkrtAhWc+TIQ8qBkmrmT7QKAu0=; h=Date:Message-ID:MIME-Version:Content-Type:From:To:Cc:Subject: References:In-Reply-To; b=GBud6qN7+uFFWW5NfgxIyQhOB8XFEtuI9U3NkTk52ZF+n9roGj3geDS0Onq7bexW8LZhjuPjfoA2TCEUNoLePc/6i/TMknwKWzr1BSFpitMTIRVpQyDLcK+Cb+5m60jdOhZfAcSG34RkZMDg/5DExHDDb4TaVFf5txW7R4nytlA= 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-9309d4ea213so175448085a.1 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=Zl+wABXqGEZKWx0/kfE7P7fokzEdJk4uoBtlfJUmqatdM55/9z5J592dtW0LmnHcpQ D69ZkUhz8bfEJgY408tS6zraKj5QXhApXoqSaELsMq0T+v9txcquzG/wIgzzPgjgaDcT 8QRVgsTe/RfRrC3pkLu7twmqigeVsP1PrhNM2Jx4tlZDNr/2Cxkrda+pDA/ptswUdbTM Z8CXN+6KppOqAV2QMvuseOBasne9Omhv+PYvRVO0M/lU/uahmAuSQTz9zSL8zAA3sVSE Uo4hXgCjLH4Bw7xjLUHVXFJboqNHTZyevbZHkYqdE/XSrVwnvanVATSOzI6JwdbMb7Ch 5lLQ== X-Forwarded-Encrypted: i=1; AKwUvBw6NqVOOoXpuPuo7Vj+PjUSC7ABcug154EfAF0tS+FWIWvNyATONSuFPR3EZNHHTXb6fzyf8lo4BJ2T@vger.kernel.org X-Gm-Message-State: AFuF++kPtQF/zavHAYsKaon6uBYUhjRTsnA+huPdAWGxE+Tw8qXxzF+L LCKyxXShBAI5B0wvZs6uJ5+6IDpqu6ae+lXzXXB6gcUcJIY8ydXUECTHUCidSlZLsA== X-Gm-Gg: AYBFou3ThZbSGEcx/B8glcIcTM2fYEY+boMKNw7++TLznA6nw5Z6KErl55w6WYkX2rh JkZ3eUPjWYZPnbO4wiJtbmMs4ssPJVgDpAmyow8yHKsa9C3jlcVdejRhkRkFyXOGM9nEQ3xxE0B Hg9/uhQoFFgLfrj24GdkwLf7znG0WFOdEnAVZK8xQx0aoVzNDtAaSOCDCBdsyI+1eFHJ2t5AoY5 0f4yf7d5cIJkqI3Ry71BYVVOjVsgyldEgqQqcOPgFrMyIufZEqgx3PmVrn2t+AQ/FiT6NNnGKC7 f2FcAyFaRFeJnbTzn5pWWoknOgiDwD2GDQRUvjDYfdNPkuRkGbXDKE/UidEAe+2CXnbwa3GMz/b kvPo1ADqne9VtK2AWSkt0Z3hg6TziUoT8AP8HNsh2UB3lfL+cLBq7zGrQJyZtf12OUEppqoWq9o Ta+S45HyjI4EgLGk+PYR4Gheo2nI4TAYggmhKwSwkj7JbeGoAXHJiOl3zDRbLGKJCFBRNUEt+zo dpPFJDSHOxc8UQ6QnAfSU5ZqJjeXDvYoQ== 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-cifs@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