🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: linux.kernel.netdev
Article #23173

[PATCH net 3/6] net: qualcomm: rmnet: fix TX aggregation timeout overflow on 32-bit

#23173
From: Antonio Quartulli
Date: Thu, 26 Nov 2026 16:32
33 lines
10443 bytes
On 32-bit, time * NSEC_PER_USEC is computed in 32 bits before being
stored in the u64 time_nsec, so a tx-aggr-time-usecs above 4294967
wraps: 5000000 is stored as 705032704 ns and read back as 705032.

Reproducer:

  ethtool -C rmnet0 tx-aggr-max-frames 64 tx-aggr-time-usecs 5000000
  ethtool -c rmnet0

Do the multiplication in 64 bits.

Fixes: 64b5d1f8f2d1 ("net: qualcomm: rmnet: add tx packets aggregation")
Signed-off-by: Antonio Quartulli <antonio@mandelbit.com>
---
 drivers/net/ethernet/qualcomm/rmnet/rmnet_map_data.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/qualcomm/rmnet/rmnet_map_data.c b/drivers/net/ethernet/qualcomm/rmnet/rmnet_map_data.c
index fdfc65c7c5e5..b156e864535f 100644
--- a/drivers/net/ethernet/qualcomm/rmnet/rmnet_map_data.c
+++ b/drivers/net/ethernet/qualcomm/rmnet/rmnet_map_data.c
@@ -689,7 +689,7 @@ void rmnet_map_update_ul_agg_config(struct rmnet_port *port, u32 size,
 	spin_lock_bh(&port->agg_lock);
 	port->egress_agg_params.bytes = size;
 	WRITE_ONCE(port->egress_agg_params.count, count);
-	port->egress_agg_params.time_nsec = time * NSEC_PER_USEC;
+	port->egress_agg_params.time_nsec = (u64)time * NSEC_PER_USEC;
 	spin_unlock_bh(&port->agg_lock);
 }
 
-- 
2.56.1
Technical Details
Message-ID: <20261126163219.1744750-4-antonio@mandelbit.com>
Path: mbox-mo1.pugleaf.net!srv.newsdeef.eu!newsfeed.bofh.team!news.nntp4.net!nntp.xenet.de!news.neodome.net!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-372230-linux-kernel-netdev=dewy.ru
References: <20261126163219.1744750-1-antonio@mandelbit.com>

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!srv.newsdeef.eu!newsfeed.bofh.team!news.nntp4.net!nntp.xenet.de!news.neodome.net!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-372230-linux-kernel-netdev=dewy.ru
From: antonio@mandelbit.com (Antonio Quartulli)
Newsgroups: linux.kernel.netdev
Subject: [PATCH net 3/6] net: qualcomm: rmnet: fix TX aggregation timeout overflow on 32-bit
Date: Thu, 26 Nov 2026 17:32:16 +0100
Organization: Usenet Network
Message-ID: <20261126163219.1744750-4-antonio@mandelbit.com>
References: <20261126163219.1744750-1-antonio@mandelbit.com>
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
Injection-Info: usenet.network;
	logging-data="508746"; mail-complaints-to="abuse@usenet.network"
Cancel-Lock: sha1:d5eeYRYdFiDoFUkvo5ctXLR0dyk= sha256:Hmkyp+MTfw8/CdORbuGUs/LayFMLZJ9dRfRciLyYyIE=
	sha1:2H4K6771zrisqXqSCDRljOE2P/s= sha256:6KgJePMX06yFdYUy2HQ9Daz3TFelBQKaYv1lD3k+/ps=
List-ID: <netdev.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 65DC3125EEF; Thu, 26 Nov 2026 19:33:26 +0300 (MSK)
X-Virus-Scanned: Debian amavisd-new at usenet.network
X-Spam-Flag: NO
X-Spam-Score: -3.05
X-Spam-Status: No, score=-3.05 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, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no
X-Authentication-Results: mail.dewy.ru (amavisd-new); dkim=pass (2048-bit key)
	header.d=mandelbit.com
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 pXUmBmJanu3h;
	Thu, 26 Nov 2026 19:33:23 +0300 (MSK)
X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.234.253.10; helo=sea.lore.kernel.org; envelope-from=netdev+bounces-372230-linux-kernel-netdev=dewy.ru@vger.kernel.org; receiver=<UNKNOWN> 
X-Authentication-Results: OpenDMARC; dmarc=none (p=none dis=none) header.from=mandelbit.com
X-Received: from sea.lore.kernel.org (sea.lore.kernel.org [172.234.253.10])
	by mail.dewy.ru (Postfix) with ESMTPS id A4BF6125EEE; Thu, 26 Nov 2026 19:33:13 +0300 (MSK)
X-Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.77.114.92])
	by sea.lore.kernel.org (Postfix) with ESMTP id 6A553410AE; Thu, 26 Nov 2026 16:32:37 +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=1795710757;
	b=xW5OiCxqoud3vegCIx18JFNmfl1Iqll92h1MsYGC+wVUIs3HP3X3n8C+TUiyVL9cNNMj
	 SRbUmPussLRWQYl4gplc6aCme4/FdMLmZuTeJAyFCyqhgJOlo49zZwTSr6DCfCb9DQwn0
	 fgde+e7W8zqODSVJ4GVRjl89LqEDArKMvi7y7C2HU1Hvy3aWe3xpiMFVoa7n71pshHFWo
	 DwqKFbSWzupheyH6lCDjVq6XV349VeSyCwX16GhV3QBqaLKLf927YZPc9imSFsl/gpAS5
	 D0AVNzhbjPuuQAiMyxStzzLt9LCEf/acZLmjawE7uLruqoPcF08vELlDeXzr9Ghv+HQ==
X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015;
	a=rsa-sha256; c=relaxed/relaxed; t=1795710757;
	h=X-Original-To:Received:DMARC-Filter:Received:DKIM-Signature:From:To:
	 Cc:Subject:Date:Message-ID:X-Mailer:In-Reply-To:References:
	 X-Mailing-List:List-Id:List-Post:List-Help:List-Subscribe:
	 List-Unsubscribe:List-Owner:Precedence:MIME-Version:
	 Content-Transfer-Encoding:X-Rspamd-Queue-Id;
	bh=9ro/Ul7fqP8W2uHW3wh4lFnKRkOBN+yQMyu7M6Mtqdo=;
	b=4DGi6TRBD7/v0DeBURlfdFVHMwegEbBCXOnXOpV7MxsatJNr9AdvhtFGtN/SmMT8SXS+
	 xDtPqMg+etxwdYRUGxjtJ3zo/n++bWwMh/5Amo9FCWOOLh78vtH5hDmlV3ezA5iSG6bW5
	 61zotAQBzfiqyXEImJG2g/x/LYoqwYrzDcrSG+jVqSe2Gk35pyua7x7LL9+yM+El9/La1
	 dbLWJhpJXb4bJ3voAh05lA0qjTGGXtRw8cEk9U9myf7Bm2cxZmKKrSNhl4ykuOr6AwsJP
	 khNBDE3ikBh+BT5UBQbsv30e2OxE9rPMCf5Ai0BO4bZIs9wMqarCAXEy/VZK3kyYyfQ==
X-ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; 
	dkim=pass header.d=mandelbit.com header.i=@mandelbit.com header.a=rsa-sha256 header.s=MBO0001 header.b=bVykUGzx;
	dmarc=none header.from=mandelbit.com;
	spf=pass smtp.mailfrom=mandelbit.com;
	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 3C296606A326;
	Thu, 26 Nov 2026 16:32:37 +0000 (UTC)
X-Authentication-Results: smtp.subspace.kernel.org;
	dkim=pass (2048-bit key, unprotected) header.d=mandelbit.com header.i=@mandelbit.com header.a=rsa-sha256 header.s=MBO0001 header.b=bVykUGzx
X-Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=195.10.208.47
X-ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none;
	t=1795710756;
	b=06LI/HG9VvRyYwZy3IoB0aZEKWBLSrFIQmykT2EuNk9Kex+cPYCZxVfHLT2TLcuvjC24
	 SMo+Mj6VdvTF4sqIxvA0vCk3d5Xaqj0YXaPQZuS2z7P+jBo33Y9haEOMBVuUZYzXYn627
	 VcUoujNwy4/x1l8jaEd7HoUd86bS2fwqqcKGG7/sPKScwTlmCOTCVNaKBKuDdfp0VOKmF
	 4urPUYjtb0VnvJnSmT6puB6BAhns5j6+iJojRdFmTDIsCE+f6l7CkuEPJ+fp6YDjHmrTQ
	 z9vl4qkmqDz/uXBqZeaxi1rIlO3fTsfo2zMHBdxg4M3PEymCQJEjtJYbZTWdMfqBOWg==
X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015;
	a=rsa-sha256; c=relaxed/relaxed; t=1795710756;
	h=DMARC-Filter:Received:DKIM-Signature:From:To:Cc:Subject:Date:
	 Message-ID:X-Mailer:In-Reply-To:References:MIME-Version:
	 Content-Transfer-Encoding:X-Rspamd-Queue-Id;
	bh=9ro/Ul7fqP8W2uHW3wh4lFnKRkOBN+yQMyu7M6Mtqdo=;
	b=gNB27AuCpmBRN7ElvocbKPOM88yXiCMlCwat6lr0HOeAXNwTJAfyGBosIIq+YbtYT/Pm
	 EF9n4NTx8mg5KQTLNGa1zXpwH+lyGpf0DJCSNlG1jGY1Yg8fLCB2yVKXa0JZlmDGMiBnT
	 VCO3cyqO5MymS3KRcku39ITMAOglu6Y/GB9yPntCnkZd9m57Izl3YYEzMCw8itK4KrRdp
	 tt3Bfbg8lFXfG4Y8LGHV3tFx+SNknm6rGoDIb9oDax9bF/WDXhoQmYNjoRoViCc7dbrEq
	 ShQF7Ixs7WZMLULnpQvON1KvYpL3rlFYtK+O8hbIlaIFFXxbnFLpwJXh2kv+8DnQsBQ==
X-ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; 
	dmarc=none header.from=mandelbit.com;
	spf=pass smtp.mailfrom=mandelbit.com;
	dkim=pass header.d=mandelbit.com header.i=@mandelbit.com header.a=rsa-sha256 header.s=MBO0001 header.b=bVykUGzx;
	arc=none smtp.remote-ip=195.10.208.47
X-Received: from mout-b-107.mailbox.org (mout-b-107.mailbox.org [195.10.208.47])
	(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 AEA08606A323
	for <netdev@vger.kernel.org>; Thu, 26 Nov 2026 16:32:35 +0000 (UTC)
X-DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org AEA08606A323
X-Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=mandelbit.com
X-Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=mandelbit.com
X-Received: from smtp1.mailbox.org (smtp1.mailbox.org [IPv6:2001:67c:2050:b231:465::1])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519MLKEM768 server-signature RSA-PSS (4096 bits) server-digest SHA256)
	(No client certificate requested)
	by mout-b-107.mailbox.org (Postfix) with ESMTPS id 4jb2By3jk0z3wq1;
	Thu, 26 Nov 2026 17:32:26 +0100 (CET)
X-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mandelbit.com;
	s=MBO0001; t=1795710746;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:cc:mime-version:mime-version:
	 content-transfer-encoding:content-transfer-encoding:
	 in-reply-to:in-reply-to:references:references;
	bh=9ro/Ul7fqP8W2uHW3wh4lFnKRkOBN+yQMyu7M6Mtqdo=;
	b=bVykUGzx4aPcytfnW+ya1Rcczk2LNF+3g1D1eUDNpsfdDYxlMMTVtOjrEdXOWQhJCLvaIB
	QYhvUyXHNnfyrO7W1ag35m4eozo4YEVK/09CM67qHelgdrrpVZXpb5rmiYTphScshDWe5L
	nKJPZBppn+OH+ewitjyuwouWwYROUmN66hy+RVe95d/vOxOSPErGROXTYrNgjc0lOWav/e
	h5XO3zgdaI3d3eEuHR8WPGrGmAvJH1SYQ34lQK2PkTrGj8B7CDI1XytOcd+AUsNdhfqvtF
	s8kectkazwAm7I0tt9ZtWLqBJ41wAK3UwwYpyiqiV+TRvJusF01uHveGewJaFA==
X-Authentication-Results: outgoing_mbo_mout;
	dkim=none;
	spf=pass (outgoing_mbo_mout: domain of antonio@mandelbit.com designates 2001:67c:2050:b231:465::1 as permitted sender) smtp.mailfrom=antonio@mandelbit.com
X-Cc: Subash Abhinov Kasiviswanathan <subash.a.kasiviswanathan@oss.qualcomm.com>,
	Sean Tranchetti <sean.tranchetti@oss.qualcomm.com>,
	Andrew Lunn <andrew+netdev@lunn.ch>,
	"David S. Miller" <davem@davemloft.net>,
	Eric Dumazet <edumazet@kernel.org>,
	Jakub Kicinski <kuba@kernel.org>,
	Paolo Abeni <pabeni@redhat.com>,
	Daniele Palmas <dnlplm@gmail.com>,
	Taehee Yoo <ap420073@gmail.com>,
	koen.vandeputte@citymesh.com,
	Antonio Quartulli <antonio@mandelbit.com>
X-Mailer: git-send-email 2.56.1
X-In-Reply-To: <20261126163219.1744750-1-antonio@mandelbit.com>
X-Mailing-List: netdev@vger.kernel.org
X-List-Post: <mailto:netdev@vger.kernel.org>
X-List-Help: <mailto:netdev+help@vger.kernel.org>
X-List-Subscribe: <mailto:netdev+subscribe@vger.kernel.org>
X-List-Unsubscribe: <mailto:netdev+unsubscribe@vger.kernel.org>
X-List-Owner: <mailto:netdev+owner@vger.kernel.org>
X-Precedence: list
X-Rspamd-Queue-Id: 4jb2By3jk0z3wq1