Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=100.103.45.18 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796064541; b=M1438cugY0qjUSNHZGhhu+AWHbUSedalZhT/puiyySlgevnRJOU4L9P9p7y1tcUk1YLE lHjFJaFGgLCP0H/QaCzNAAOeCfU6Ns7hCalYKghmbUUOHAKIkjyYICH+pvf/HjYNOLPgV 1sOeRuD7X/ipSmYrgzbHH+Ty61DJvhspVJoAOfMjbIgV5weaKVjlx+ETTR6T+0DcV7FvP Cvn6js4x8uo8VQ8cUZasZrvM3fz9yUnh+8/gX2NPk4jlhcaqs2sJZ5ukQ2pzGMMit3EnE qh4Bzr/bGUddoAc5+XIodt0nMpeMGz0fJ3YMLrYNB1HOtqQMOv0AwUqsBvVDjV0BG+A== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796064541; h=Received:DKIM-Signature:Received:Received:X-ME-Sender: X-ME-Proxy-Cause:X-ME-Proxy:Feedback-ID:Received:X-Mailer: MIME-Version:X-ThreadId:Date:From:To:Cc:Message-Id:In-Reply-To: References:Subject:Content-Type:Content-Transfer-Encoding; bh=rmnWiNEBaavO94qY/CkLhgMDQSQfQgz2k1HmGOmrXV8=; b=QPywGb9p3cAEZFS139fcJvGyBjqVGQGX5+l66nusTWhyLNKv+yethNji9NYY8HEp9u/z 3ZyP2ZMobpaxHtTxXskHlh5jNqcDvfT2o3BlQh5yj1XkIbZuUeA20rIYE0xvT2OEHsfif Gm7gx3YMx8bYfqMJWIjgJ+mWrH/VKcpvXN4QQt/LQIxFJ3GlOh/3UJ9184BvLnA8lpKhO c3ZY9fetvjH4Yh37EzQ/TA9x8kE6HTo35irnfjkccuUUhIdhAVCWxNs4dZYQkCNrCVpkP oT73pH2XFLKZhVROmj0qUfr6P24K8xgLptNrs0lO32QPKyP1mDOha1sK7KTe5m4eqFA== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=d62L7yF8; arc=none smtp.remote-ip=100.103.45.18 Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 18C3D606A31C for ; Mon, 30 Nov 2026 18:49:00 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=d62L7yF8 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 2FAAD1F00898; Mon, 30 Nov 2026 18:48:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1796064540; bh=rmnWiNEBaavO94qY/CkLhgMDQSQfQgz2k1HmGOmrXV8=; h=Date:From:To:Cc:In-Reply-To:References:Subject; b=d62L7yF8gCg2DBVtGiABuw2XG08GEYufcMhB4eGMgDFaSGFZDhCbUYvSrs4F6Z8wZ HrLn/EeJdcy4Z8ET77oR8+YrTFXeCm5p70EdNDmxkbbzp19UoPW/j9MuJ1g1ta5rpS hcWNuBvdAs0/iiNHnD1qFSpGpenT73MnrwLdwSjeKA0NgJohPVUiDS2i+TCbCUXeTW KYvczwOTm10gwVvZT1haCCygz2JzTR4YyNge1Ro3t0rgw31LZdDQ7LLGaZyU9bmqM1 ur4bwCsdyHqbEkJrtj+LZ5LOsAWHaq/Oxc8gyKK3ems1pirXnAIrNHgg9kiW7blCXC ZpZ51QZp1Sp7Q== Received: from phl-compute-10.internal (phl-compute-10.internal [10.202.2.50]) by mailfauth.phl.internal (Postfix) with ESMTP id E0503F40067; Mon, 30 Nov 2026 13:48:58 -0500 (EST) Received: from phl-imap-15 ([10.202.2.104]) by phl-compute-10.internal (MEProxy); Mon, 30 Nov 2026 13:48:58 -0500 X-ME-Sender: X-ME-Proxy-Cause: dmFkZTGm4TBi/LwYKQHzBMQ2d0pq2qzNaxxtNDVQ39FL3BwSAUDsJkY9wObemG/Gyv5xLL b80nhKDXYC2o9sIAhfpVpryAAARUwF0cwaNwigpuwzQT5DMD745TOangk3yiHxuPtJ5MNL Lk9TUs+aIMMygZjBSfgdclsmi/5UnZs3mjehXA9Ni7ic6Xx30FhARuGZx8rGoiVERHDqhY REv1QnmMpYIfRVn/EvYM51/oIib5+/heMr1MrNt2rSq9L0fgfTpuSPRGTlRiUYOBE6JnvL NvuL60RXLpX/BJC/xIgHGHz0pgY1FQ7jaaRjZ03lhHd0ha9wNGbXZUYwyNykMHGW/DbMWW /1fzs7HKw84Du9ywUR0nhV+Cx9dgxz0U4rtBodk6NHpGP6vrl4AW1k9k/gxKgFCgf6xOgm MqRytV5jFaUr3HlpWsBWd7hLywLygixWvHdXUIBECd0s99PpAbHzSRcE3b5sSQipvz1KUy 2a9oxxbWmsKanB2cwqiZC/7RioGiDr1CJFFEH8tZv36khmSir6doQwRtzEA+evTAx5shER I29hXd/eXft7fhBJf2VG/MgHrKFBl6opUxkMKggVKneLhdi0IYJsOGZDPCc8nf51s5zqmQ pIeCgRokt2wHQfDs70Ia1cvsHdSTBUFsAd6XW5ksr7EeCQ607HM9BaB4NuMQ X-ME-Proxy: Feedback-ID: ifa6e4810:Fastmail Received: by mailuser.phl.internal (Postfix, from userid 501) id CB9C5780070; Mon, 30 Nov 2026 13:48:58 -0500 (EST) X-Mailer: MessagingEngine.com Webmail Interface X-Mailing-List: linux-nfs@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 X-ThreadId: AqUuLfOz5ztB Date: Mon, 30 Nov 2026 13:48:06 -0500 From: "Chuck Lever" To: "Dominik Maier" , "Jeff Layton" Cc: NeilBrown , "Olga Kornievskaia" , "Dai Ngo" , "Tom Talpey" , linux-nfs@vger.kernel.org, dmnk+artist@google.com Message-Id: <8b90fd3d-de71-4da0-951a-a571ee49317a@app.fastmail.com> In-Reply-To: <20261130160419.2644777-3-dmnk@google.com> References: <20261130160419.2644777-1-dmnk@google.com> <20261130160419.2644777-3-dmnk@google.com> Subject: Re: [PATCH v3 2/2] nfsd: require NFSD_MAY_EXEC when acquiring directory delegations Content-Type: text/plain Content-Transfer-Encoding: 7bit On Mon, Nov 30, 2026, at 11:04 AM, Dominik Maier wrote: > Clients can obtain a directory delegation without search permission and > receive child filehandles in change notifications even when LOOKUP is > denied. > > Opening a directory for delegation currently checks only read access and > applies the file-owner permission override to directories as well, > allowing delegations on mode 0744 directories for non-owners and mode > 0400 directories for the owner. > > Require search permission when acquiring a directory for delegation and > restrict the owner permission override to regular files, matching normal > file opens. > > Fixes: 544a0ee152f0 ("nfsd: allow filecache to hold S_IFDIR files") > Cc: stable@vger.kernel.org > Reviewed-by: Jeff Layton > Signed-off-by: Dominik Maier This patch appears to make the kernel-doc for nfsd_file_acquire_dir() stale. The comment still describes a generic helper that opens a directory read- only. The function now also requires search permission, a rule specific to directory delegations: READDIR opens with NFSD_MAY_READ only. I suggest adding one sentence, for example: "The caller must have read and search permission on the directory, because a directory delegation exposes the names and filehandles of its entries." -- Chuck Lever