🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: linux.kernel.git
Article #3282

Re: [PATCH v2 1/4] csum-file: use size_t for the count passed to hashwrite()

#3282
From: "brian m. carlson"
Date: Tue, 17 Nov 2026 23:50
34 lines
10634 bytes
--2Tj6xjUJ2qeRd4ED
Content-Type: text/plain; charset=utf-8
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On 2026-11-17 at 17:52:57, Junio C Hamano wrote:
> src/csum_file.rs still thinks that hashwrite() takes u32, though.
>=20
> If a caller of hashwrite() has a contiguous region of memory that
> exceeds 4GiB in length, shouldn't it be looping to call hashwrite()
> in 4GiB (or less) chunks, without changing the API contract, I would
> have to wonder.

Yes, I think that would be the right thing to do.  If we're not going to
do that, then we need to update the Rust code accordingly.
--=20
brian m. carlson (they/them)
Toronto, Ontario, CA
Speaking for myself only

--2Tj6xjUJ2qeRd4ED
Content-Type: application/pgp-signature; name=signature.asc

-----BEGIN PGP SIGNATURE-----

wr0EABYKAG8Fgmr86E4JEHwMSWKIh6KBRxQAAAAAAB4AIHNhbHRAbm90YXRpb25z
LnNlcXVvaWEtcGdwLm9yZxr31zpIXdr5N5k5s/thyDDIkppVFPX34zEXnfBMmdp3
FiEECCzmip28ZfuD0cORfAxJYoiHooEAAG4sAP4u44JGVpuaJfa0oKoayRT8GpLL
MQz+fBm0xgNetYjTFAD/UnwCsGZGr4gKhQ3IRuJYLnevYSs7U8t4u9K51k8x6Ag=
=Tnd8
-----END PGP SIGNATURE-----

--2Tj6xjUJ2qeRd4ED--
Technical Details
Message-ID: <avzoTWMQbklUTDQi@fruit.crustytoothpaste.net>
Path: mbox-mo1.pugleaf.net!news-lax.pugleaf.net!srl.newsdeef.eu!newsfeed.bofh.team!news.nntp4.net!nntp.xenet.de!news.neodome.net!usenet.network!.POSTED!vger.kernel.org!git+bounces-75656-linux-kernel-git=dewy.ru
References: <cover.1793546752.git.gitter.spiros@gmail.com> <cover.1794909894.git.gitter.spiros@gmail.com> <07baad46b153b255b6e70f2597f1bf41b9c48dfd.1794909894.git.gitter.spiros@gmail.com> <xmqqeccjfipy.fsf@gitster.g>

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!news-lax.pugleaf.net!srl.newsdeef.eu!newsfeed.bofh.team!news.nntp4.net!nntp.xenet.de!news.neodome.net!usenet.network!.POSTED!vger.kernel.org!git+bounces-75656-linux-kernel-git=dewy.ru
From: sandals@crustytoothpaste.net ("brian m. carlson")
Newsgroups: linux.kernel.git
Subject: Re: [PATCH v2 1/4] csum-file: use size_t for the count passed to
 hashwrite()
Date: Tue, 17 Nov 2026 23:50:38 +0000
Organization: Usenet Network
Message-ID: <avzoTWMQbklUTDQi@fruit.crustytoothpaste.net>
References: <cover.1793546752.git.gitter.spiros@gmail.com>
 <cover.1794909894.git.gitter.spiros@gmail.com>
 <07baad46b153b255b6e70f2597f1bf41b9c48dfd.1794909894.git.gitter.spiros@gmail.com>
 <xmqqeccjfipy.fsf@gitster.g>
MIME-Version: 1.0
Content-Type: multipart/signed; micalg=pgp-sha512;
	protocol="application/pgp-signature"; boundary="2Tj6xjUJ2qeRd4ED"
Injection-Info: usenet.network;
	logging-data="2457758"; mail-complaints-to="abuse@usenet.network"
Cancel-Lock: sha1:RQsO2jmA9VcrDJZ17yUPeMsGLKY= sha256:a850Uv+CDAy7gud2PJT74WkawvNJ1IDy1qwe3b0DJEM=
	sha1:ZC3fGesMKJILC1ZYHLxzRX9vsg0= sha256:UbkoynKRAyPGJzRpeikyPTBFfoMLfBIY6tjG4Lwsu64=
Content-Disposition: inline
List-ID: <git.vger.kernel.org>
X-Mailpost-Empty-Hdrs: X-Spam-Level
X-Received: from localhost (localhost [127.0.0.1])
	by mail.dewy.ru (Postfix) with ESMTP id AA373114DF7; Wed, 18 Nov 2026 02:51:04 +0300 (MSK)
X-Virus-Scanned: Debian amavisd-new at usenet.network
X-Spam-Flag: NO
X-Spam-Score: -3.051
X-Spam-Status: No, score=-3.051 tagged_above=-9999 required=6.31
	tests=[DCC_REPUT_70_89=0.1, DKIM_SIGNED=0.1, DKIM_VALID=-0.1,
	DKIM_VALID_AU=-0.1, HEADER_FROM_DIFFERENT_DOMAINS=0.249,
	MAILING_LIST_MULTI=-1, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001,
	SPF_PASS=-0.001] autolearn=ham autolearn_force=no
X-Authentication-Results: mail.dewy.ru (amavisd-new); dkim=pass (3072-bit key)
	header.d=crustytoothpaste.net
X-Received: from mail.dewy.ru ([127.0.0.1])
	by localhost (mail.dewy.ru [127.0.0.1]) (amavisd-new, port 10024)
	with ESMTP id TjID75CFQ-8k;
	Wed, 18 Nov 2026 02:51:01 +0300 (MSK)
X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.105.105.114; helo=tor.lore.kernel.org; envelope-from=git+bounces-75656-linux-kernel-git=dewy.ru@vger.kernel.org; receiver=<UNKNOWN> 
X-Authentication-Results: OpenDMARC; dmarc=fail (p=none dis=none) header.from=crustytoothpaste.net
X-Received: from tor.lore.kernel.org (tor.lore.kernel.org [172.105.105.114])
	by mail.dewy.ru (Postfix) with ESMTPS id A681C1150F8; Wed, 18 Nov 2026 02:50:51 +0300 (MSK)
X-Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.77.114.92])
	by tor.lore.kernel.org (Postfix) with ESMTP id 752BB383DF; Tue, 17 Nov 2026 23:50:50 +0000 (UTC)
X-Authentication-Results: smtp.subspace.kernel.org; arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1
X-ARC-Seal: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=pass;
	t=1794959448;
	b=lyinQsn5slbOu8HVNw2ErfnLlRXy1BMGH4RL6KRB7MZa7ecm6M6P9EdSaikk5XTGgVdK
	 q2H4HoDtaHCKvawZDV4gGp0HQygTgynJAMENLqcJsdAAPhMc+qqKWiGC1Lit8zjzxKFFf
	 Ho8KYPkKWpKa+Lv/B12Qd+PzAFvxIAvyQbOO1819rtJRIAxWsAZLwAz8IIKsCss/lmnNL
	 YaUX14W7qQ7QbS5dOkbbHDovDOo6xJCGuHL0cEQ8kjZTuKO5x6hdkk5zoDMg4/FgEaXM/
	 aJXmEGClEa2y+ykHYpepbpQ2idgLVJW12Mo6nx3jFXZjE6WBB3vOjE/OCEUdaxi2zpA==
X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015;
	a=rsa-sha256; c=relaxed/relaxed; t=1794959448;
	h=X-Original-To:Received:DMARC-Filter:DKIM-Signature:Received:Date:
	 From:To:Cc:Subject:Message-ID:Mail-Followup-To:References:
	 X-Mailing-List:List-Id:List-Post:List-Help:List-Subscribe:
	 List-Unsubscribe:List-Owner:Precedence:MIME-Version:Content-Type:
	 Content-Disposition:In-Reply-To:User-Agent;
	bh=SddfH0M2f2yMxa8Akae3HyjZTeesmCUs3a6N/1qfw5c=;
	b=J9I/OwFh3Cll+mlxjxr82U7dSsHb/ezkSXky8sPfNVEFrpoy1eRrAy21j9Z+lBbO9IoS
	 r5LwtZoD5QIEkKM1fkcVe8Q/ErgCDLcPgQcXfume/2GkWF/O8KPuFlpI46QOBoZZQO0DW
	 8SzcS05s0TxyjnqHJZ4L9SyrqGxYbFN18/7zYnZbpXzdx/ZUYjk5eil4UloSIQqyMCOk0
	 zWLeF5OJ1c9Smqf9/Q8ZHJHcV9Tlsu7gWPqD3DRJ3NvcA4RRkgmpHgmpwcd295s7Q1HSE
	 RUpXR7RTjzHd6faEpnoP00dXhDp/V9WrC9xSz3FTYAnc3DNOGo2QnGsCH7MvP+HSXAQ==
X-ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; 
	dkim=pass header.d=crustytoothpaste.net header.i=@crustytoothpaste.net header.a=rsa-sha256 header.s=default header.b=xROO1qaE;
	dmarc=pass header.from=crustytoothpaste.net;
	spf=pass smtp.mailfrom=crustytoothpaste.net;
	arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1
X-Received: from localhost.localdomain (localhost [127.0.0.1])
	by smtp.subspace.kernel.org (Postfix) with ESMTP id 1DD82606A334;
	Tue, 17 Nov 2026 23:50:48 +0000 (UTC)
X-Authentication-Results: smtp.subspace.kernel.org;
	dkim=pass (3072-bit key) header.d=crustytoothpaste.net header.i=@crustytoothpaste.net header.a=rsa-sha256 header.s=default header.b=xROO1qaE
X-Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=172.105.7.114
X-ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none;
	t=1794959447;
	b=kj1iDIldj0uMBsOHn11okhnAO7M0NrG/7Y8TlVP6WYDhjGrOJb/Dv8OsKBHHHHfz9m2O
	 uBlMC6hYiwvJPe/82rlp9YSMxeFeT4sG6q1eSCC8GgSl6LzWql5OKk2pY66uUhVQRtFdr
	 vx7eAg9Mkn/xWAiDEcA6Tfxpv9pjJH7xjH8yA7quUiZpeLOGos9Lnm/qpl2vrvBI4kunj
	 d5J0qceroLtj6BDC5MKoOIWTPwg/hppqdPW+ByV0/ogVutjWo/zW9mEw34MIj47/Yp4Fp
	 Inq4MOvK7J8i1oAnRHDkpwBIHseKdKiRnmHJ1+LVM1NnrS81kcpU+OHaQTqd18sFssA==
X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015;
	a=rsa-sha256; c=relaxed/relaxed; t=1794959447;
	h=DMARC-Filter:DKIM-Signature:Received:Date:From:To:Cc:Subject:
	 Message-ID:Mail-Followup-To:References:MIME-Version:Content-Type:
	 Content-Disposition:In-Reply-To:User-Agent;
	bh=SddfH0M2f2yMxa8Akae3HyjZTeesmCUs3a6N/1qfw5c=;
	b=miyoOpx8SA7vscsQ/TY11v8f+RGEnjZM0gvDROCgUyCetYzOGRTFa0BMwKahgEz5bCRe
	 sPntDggC7Nu7/zMDOJQt/ffLPHJx5zj5DuI6HKW0bDxnrlC5i2y3HNvuq/NuG0/tflGOl
	 04/zXCx9AxeFuP2MVYngKItWFRK5QAhQpEiEnW9rX1k9N7BwP8+g2fZYsJ/lc0BDISDAu
	 3h2GPNj14K74Rs8cbD7dM+/suJLF/zHrur0L8fCGSnmjpclCPKu+SCL8EM9ruJFZTVK4O
	 Xm0fNYj8Ns44dq86d3cEHCMIZbwe+wk3fH6+/Yp6eKwEKd0/81s+WZNvF4jRcXoztoQ==
X-ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; 
	dmarc=pass header.from=crustytoothpaste.net;
	spf=pass smtp.mailfrom=crustytoothpaste.net;
	dkim=pass header.d=crustytoothpaste.net header.i=@crustytoothpaste.net header.a=rsa-sha256 header.s=default header.b=xROO1qaE;
	arc=none smtp.remote-ip=172.105.7.114
X-Received: from complex.crustytoothpaste.net (complex.crustytoothpaste.net [172.105.7.114])
	(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 A03A8606A330
	for <git@vger.kernel.org>; Tue, 17 Nov 2026 23:50:46 +0000 (UTC)
X-DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org A03A8606A330
X-Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=crustytoothpaste.net
X-Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=crustytoothpaste.net
X-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=crustytoothpaste.net;
	s=default; t=1794959439;
	bh=iq70JrtMdXfE4X/imWk+lIDj87DFu4tIRnlCnGjXgQQ=;
	h=Date:From:To:Cc:Subject:References:Content-Type:
	 Content-Disposition:In-Reply-To:From:Reply-To:Subject:Date:To:CC:
	 Resent-Date:Resent-From:Resent-To:Resent-Cc:In-Reply-To:References:
	 Content-Type:Content-Disposition;
	b=xROO1qaEuft2jz5n4k2kDpFLFl4+rT/DUM2QVcGtslEkI6dtKOo3nW+oY0cr2vGrW
	 AT0+wrde7BF0Cxd2i8LXHz6989BADdIqImT+xEHCNYN3a5LLgXX5YLD4gzfWnOoE6U
	 LqztmLwQ6EBKeNZfs6A1zvT/oG6mXn1X9XYlw9/KbxOHeGjQ+9sbF5A46JcF9K+4NF
	 G1INbkM1yTnPlZ5IkQdjI+Duqzqh9l8RvXrjKOOEqNN4SwoGK3wRjFkCm30eI1Twp8
	 YgaMvljzQvYcCRkwIRIDuntGu2TZqbOo3aUXttJSjb0LY3ccTt5v0Psua4NoetzjHL
	 ckLiSVN95TasLh+VnsDimQ4Rq0sYIYGdK0T8bEss1nWKiqYqxG7aCIuvAPluYEnHIX
	 +NCv0MRYiPXYiVA46X/1k684MRadKEQiArFj+jegLCNou6yeKTF3RM9qhLlFKOAecC
	 bOrynt3QcYS+6kTLVpR5/6Vf/vifi67GIAoEw8rQirlZGsHT+sZ
X-Received: from fruit.crustytoothpaste.net (unknown [IPv6:2607:f2c0:f00f:f901:c07:7d00:ae8f:ead1])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange ECDHE (prime256v1) server-signature ECDSA (prime256v1) server-digest SHA256)
	(No client certificate requested)
	by complex.crustytoothpaste.net (Postfix) with ESMTPSA id DBD06200BF;
	Tue, 17 Nov 2026 23:50:39 +0000 (UTC)
X-Cc: Elia Pinto <gitter.spiros@gmail.com>, git@vger.kernel.org,
	Johannes Schindelin <Johannes.Schindelin@gmx.de>,
	Neeraj Singh <neerajsi@microsoft.com>,
	Patrick Steinhardt <ps@pks.im>
X-Mail-Followup-To: "brian m. carlson" <sandals@crustytoothpaste.net>,
	Junio C Hamano <gitster@pobox.com>,
	Elia Pinto <gitter.spiros@gmail.com>, git@vger.kernel.org,
	Johannes Schindelin <Johannes.Schindelin@gmx.de>,
	Neeraj Singh <neerajsi@microsoft.com>,
	Patrick Steinhardt <ps@pks.im>
X-Mailing-List: git@vger.kernel.org
X-List-Post: <mailto:git@vger.kernel.org>
X-List-Help: <mailto:git+help@vger.kernel.org>
X-List-Subscribe: <mailto:git+subscribe@vger.kernel.org>
X-List-Unsubscribe: <mailto:git+unsubscribe@vger.kernel.org>
X-List-Owner: <mailto:git+owner@vger.kernel.org>
X-Precedence: list
X-In-Reply-To: <xmqqeccjfipy.fsf@gitster.g>
X-User-Agent: Mutt/2.4.1 (2026-07-04)