From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=103.168.172.149 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796196455; b=NTTLOs42+Df24pIJek2GI2EyhxrK7+ReG0DjGRbKpTAxcr4XawDWRHLVOU6+9MDgI7Zc GFEDdzrR4hF+bJsLUa6IDCERsV2fKh4r0sXqimyUKj3o70pJSQY+fd8Su6nWxFA6YYOc1 Xvg+h7by0HEwqBFkH3k/0zVDiFdAi+18N8YFOP45D592ffoooieetsCZaOVjAMuHp2kBo JKDp1QIcaID/YqOhtBvl6/IWgNV7qDj5WFyYzaDm98yjmyWwLdkau++oDIspYvLIS4KLS pQJwz9Wphqx3QqKfpCXcV4PDGtpt8JB0oKimkDSmZvTiuF4dNBSn0wrB5mNTkC+Gosg== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796196455; h=DMARC-Filter:Received:Received:DKIM-Signature:DKIM-Signature: X-DKIM2-Info:DKIM2-Signature:X-DKIM2-Info:Message-Instance: X-ME-Sender:X-ME-Received:X-ME-Proxy-Cause:X-ME-Proxy:Feedback-ID: Received:Received:Date:From:To:Cc:Subject:Message-ID:References: MIME-Version:Content-Type:Content-Disposition:In-Reply-To; bh=Kv1lDToMvoO8SOG5rZwC+NwhYnkrG6E4zMFReAoRSHA=; b=Yrbf5IOw20A6yF2n7M2dUN76hZ7maiGhZp/qYon+nLAIu4q/XWHE/z690cK4gZApV87S fDK4bZ0nLFJVnMG6V9nQJKK/4f+I8GekgdwWA8BvIo8iki7sg8ZkFS3E3/UA8C5rFrF7N VeOlS+EdxXSPBsjZVotOBY8jErZAoJUdHqbSaSKDjiUcmDAwJeUtSRUcCKJY/OwIMSwNJ SauVdkhxKqd2Qcanp5tohFl6dBZ+YCEb1TdrLr/pOWxQ7wnEb+EKZCNSZ33DWhxCDGdbn BA6RR18J10OLhmNRa3gFB7hl8kAq53+P1pNJzaHPp5D5TXlSDhMaWbRTaBoPp4pCJJA== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=pks.im; spf=pass smtp.mailfrom=pks.im; dkim=pass header.d=pks.im header.i=@pks.im header.a=rsa-sha256 header.s=fm3 header.b=kWcx5jaj; dkim=pass header.d=messagingengine.com header.i=@messagingengine.com header.a=rsa-sha256 header.s=fm3 header.b=QyJ68k5S; arc=none smtp.remote-ip=103.168.172.149 Received: from fout-a6-smtp.messagingengine.com (fout-a6-smtp.messagingengine.com [103.168.172.149]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 2D42B606A31A for ; Wed, 2 Dec 2026 07:27:34 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 2D42B606A31A Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=pks.im Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=pks.im Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key, unprotected) header.d=pks.im header.i=@pks.im header.a=rsa-sha256 header.s=fm3 header.b=kWcx5jaj; dkim=pass (2048-bit key, unprotected) header.d=messagingengine.com header.i=@messagingengine.com header.a=rsa-sha256 header.s=fm3 header.b=QyJ68k5S Received: from phl-compute-04.internal (phl-compute-04.internal [10.202.2.44]) by mailfout.phl.internal (Postfix) with ESMTP id 49C1FEC0553 for ; Wed, 2 Dec 2026 02:27:34 -0500 (EST) Received: from phl-frontend-03 ([10.202.2.162]) by phl-compute-04.internal (MEProxy); Wed, 02 Dec 2026 02:27:34 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=pks.im; h=cc:cc :content-type:content-type:date:date:from:from:in-reply-to :in-reply-to:message-id:mime-version:references:reply-to:subject :subject:to:to; s=fm3; t=1796196454; x=1796282854; bh=Kv1lDToMvo O8SOG5rZwC+NwhYnkrG6E4zMFReAoRSHA=; b=kWcx5jaj1bSnwJyXVRvk6pyNa7 zRaZ9Ygv4Vg21bxOH7n0gxoJMiGfJLWjpMit0tMCtZWFvg8Q0V10lAEVA7v+MKfU K2PDjeJx+sAwYrj3Jnt3+MQFom+GyiBDgzVqcesfyu/1RFyW/bZlp6YAwMdM0Fwh ynT1xxPbqY/UFQJo0Pr8XJlicbKA6iqPAK92hr7VufzFBmRgoBpBseQIFam4eSFh +/KLoKCB+BXVrUORwvZPp5eGtDy78/FSzWiueYVpaNIZveFr05mlOrNOe9sQzE8y bIlzypASpbFxk+/upPU/gu+RpaeqhoeB+RjpdUjNC0fjd2rrbFgN5TRKErIg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-type:content-type:date:date :feedback-id:feedback-id:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:subject:subject:to :to:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm3; t= 1796196454; x=1796282854; bh=Kv1lDToMvoO8SOG5rZwC+NwhYnkrG6E4zMF ReAoRSHA=; b=QyJ68k5SjYybVkH85RhPE1NqQJFZEptU5PxLnHrX8FkFlWK7GKj KYUfUpuFQLRj8VggeY//i5MW4yX+IVmJVENCnPrZbOkL3QHW7OYmf7cF6UWEJgzT ln72OVdHing6qGfRk++t49pDPT9ewA56QM4bEuUK4CRAEpHB21w9e68jqpUAuVdb w8PKoC4SGwBrvJ47P6jJw08kc9VZILnWaTbTolCEIR4iSrlmojkJPTA/TclUSdZm QS4K2e9tcsxd37yvFFeC6/ABHjduaJdfIOCRZ3i0uyn4cla3uk+bYNIXsHACvE67 s5AlPMVI0SLx/tALh9//Tpc/KH3xbM2FWjw== X-DKIM2-Info: draft=ietf-dkim-dkim2-spec-09; repo=github.com/dkim2wg/interop; date=2026-11-03; sw=lmtpprox; action=sign d=pks.im a=rsa-sha256; DKIM2-Signature: i=1; m=1; t=1796196454; d=pks.im; mf=PHBzQHBrcy5pbT4=; rt=PGdpdEB2Z2VyLmtlcm5lbC5vcmc+; s=fm3:rsa-sha256:kuz91Uok7Tcuah3PcHdaPaJXU43cOrnZcHPPPMiOAn29ZmE TgdNkhJFzhNhkOyvF1ZRWBmOqkjHBoqgTP6v5IWSVzzwuxfRkl/InoUi32GPJGd9 aL9RNs4DWtwWjBTI3yeDsPHwlOaWEUAna0eIMLvKxajdwTxOp2Yz5x+LjgcGEZR4 lHZrPXjcwDYkrKEpEMSXzxYHRzRzyJhX8eboAA5ceyyAIMFJXsLf1X6ENVmZm01f GTB8E1B58kfd8Lkr1laCOpGQuL7MNp2NQ+bMY6+ASNr3kc0t9R569xWygrkCt8T7 UKOrgBeJcxXK2+K81G3iWSog/TAr3WfNjFB+n/Q==; X-DKIM2-Info: draft=ietf-dkim-dkim2-spec-09; repo=github.com/dkim2wg/interop; date=2026-11-03; sw=lmtpprox; action=mi-m=1; hc=12; hn=cc,content-disposition,content-type,date,feedback-id,from, in-reply-to,message-id,mime-version,references,subject,to; Message-Instance: m=1; h=sha256:uJnMAgYoFCkiri0vERUxvsPRiIeMyBeEpzmSojvV0fw=:IzALnBcQ0wSjN159efLuqZtJyH5vqfh8RtxVeD1KGgk=; X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: dmFkZTFiF0Qsd9Qj/Dcd/hVxS38iGpYQlxvguWq9EeQSknU177G0+oj9yP6EUXVCSpmPjG 5HTm6dp9NeolD9jbPRnMpAlCbUeZPr6YzjZs6Mu0z5vO/4Vaf9YtGas4zNypPHS/DiR+my fCQCaf0A+sILujMJypB6zMfLvscGjEzvxRXFl6sCtRS90Fa7J9WTZ15TzxrOdEN+V6g7Uu /B/+k6vZZ2fCv+KVByUPKruiprNKN/iZdkQRixBnfNkEuaWI/QDximrCWdEWU95eSc2p6z FKThFwBZtGmYAV0oizin7UsGZN6+8Ty8YVwzeiUlNhSfSkaTDG7Ixdl0Jn7EMYhMmHYHD2 Wm5weK/iO21U4naPaAEovu64IGHgIEcBtlWIKBCIQFT1UOYXXg7vXwr8tlOaDuKkRpFmqj UYhEqecrsuIXzHFrIZmHSIDSj7QwuNB0fLUddM8Jjt9NQnLUM0kznEM48Ho6gyb42Xcf5O PwEU37DSWVyeuIWL1ECOhvx92uxJqlT+W+ITA7hyRO1qoL4FU4a4ah9B09DOvZpz3y6qtR wupwNwMsrdoM1NGp0anfB5JCVIP9ldmcwACZcRWWGeY/oNLppulcnbtZZ4/Fce3A+bNuyg MaZo/KCuwQ7br38IPsCsWmsUfVcX/HEtABc37iHUQa26wBG0aEQvfbtRbFSA X-ME-Proxy: Feedback-ID: i197146af:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Wed, 2 Dec 2026 02:27:32 -0500 (EST) Received: by mail (OpenSMTPD) with ESMTPSA id 07a65d0c (TLSv1.3:TLS_AES_256_GCM_SHA384:256:NO); Wed, 2 Dec 2026 07:27:30 +0000 (UTC) Date: Wed, 2 Dec 2026 08:27:27 +0100 From: Patrick Steinhardt To: Kristofer Karlsson Cc: Kristofer Karlsson via GitGitGadget , git@vger.kernel.org, Elia Pinto , Elijah Newren , Johannes Schindelin , Harald Nordgren Subject: Re: [PATCH] tree-walk: reject tree entries whose name length overflows an int Message-ID: References: X-Mailing-List: git@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: On Tue, Dec 01, 2026 at 04:58:56PM +0100, Kristofer Karlsson wrote: > On Tue, 1 Dec 2026 at 16:11, Patrick Steinhardt wrote: > > On Mon, Nov 30, 2026 at 02:42:52PM +0000, Kristofer Karlsson via GitGitGadget wrote: > > > From: Kristofer Karlsson > > We can then still adapt `struct name_entry::len` at a later point in > > time. > > > > Ideally, we'd also have documentation around this somewhere to spell out > > that tree entries may at most be INT32_MAX. > > I am not sure it is worth it. The filesystem limits of paths > and/or names are much lower than 2^31 anyway so this limit > is unlikely to hit (or even impossible?) for any real users. True, but it's still possible to generate such tree entries regardless of that, for example via git-mktree(1) or git-hash-object(1). You wouldn't ever be able to check those out, but no matter which limit we pick there will always be some platforms that won't be able to do that. > I also could not really find any suitable document to put it > in, and I think the other limits that are documented are ones > that are more practically reachable. One exception may be > index.maxPathLen in config/index.adoc, which mentions the same > limit, but that is documented because it is a config option > and thus needs to say which values are accepted, so it is > not fully comparable. I think the best place to add that to would be gitdatamodel(7). We already document the object formats in there, so it might be a natural place to add this limitation. E.g.: diff --git a/Documentation/gitdatamodel.adoc b/Documentation/gitdatamodel.adoc index 056b866f254..53927622987 100644 --- a/Documentation/gitdatamodel.adoc +++ b/Documentation/gitdatamodel.adoc @@ -85,7 +85,7 @@ tree:: It can contain files or other trees (which are subdirectories). It lists, for each item in the tree: + -1. The *filename*, for example `hello.py` +1. The *filename*, for example `hello.py`, which may not be longer than XYZ bytes 2. The *file type*, which must be one of these five types: - *regular file* - *executable file* Thanks! Patrick