🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: linux.kernel.netdev
Article #23614

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

#23614
From: Antonio Quartulli
Date: Fri, 27 Nov 2026 15:08
33 lines
10464 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 033699aa0385..46dcfba86b3f 100644
--- a/drivers/net/ethernet/qualcomm/rmnet/rmnet_map_data.c
+++ b/drivers/net/ethernet/qualcomm/rmnet/rmnet_map_data.c
@@ -686,7 +686,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: <20261127150827.785753-4-antonio@mandelbit.com>
Path: mbox-mo1.pugleaf.net!srl.newsdeef.eu!newsfeed.bofh.team!news.nntp4.net!nntp.xenet.de!news.neodome.net!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-372814-linux-kernel-netdev=dewy.ru
References: <20261127150827.785753-1-antonio@mandelbit.com>

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!srl.newsdeef.eu!newsfeed.bofh.team!news.nntp4.net!nntp.xenet.de!news.neodome.net!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-372814-linux-kernel-netdev=dewy.ru
From: antonio@mandelbit.com (Antonio Quartulli)
Newsgroups: linux.kernel.netdev
Subject: [PATCH net-next v2 3/3] net: qualcomm: rmnet: fix TX aggregation timeout overflow on 32-bit
Date: Fri, 27 Nov 2026 16:08:27 +0100
Organization: Usenet Network
Message-ID: <20261127150827.785753-4-antonio@mandelbit.com>
References: <20261127150827.785753-1-antonio@mandelbit.com>
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
Injection-Info: usenet.network;
	logging-data="758468"; mail-complaints-to="abuse@usenet.network"
Cancel-Lock: sha1:itX+dRRT2Z9mdvq6Rj7gksSEKdE= sha256:8SLy9NCKKRcKdJO4zNM0n9wmyL2HQ5ak4XKkmYQzAHk=
	sha1:643nl0ggUndtrzuI0nKw/Kgmjq4= sha256:DW+pPuHA5mKJdmuuCh53UOKVSjg9mFpfETzraChJ2uA=
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 1D7DA125F5E; Fri, 27 Nov 2026 18:09:04 +0300 (MSK)
X-Virus-Scanned: Debian amavisd-new at usenet.network
X-Spam-Flag: NO
X-Spam-Score: -3.151
X-Spam-Status: No, score=-3.151 tagged_above=-9999 required=6.31
	tests=[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 (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 61pR6zF21tlx;
	Fri, 27 Nov 2026 18:09:01 +0300 (MSK)
X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.105.105.114; helo=tor.lore.kernel.org; envelope-from=netdev+bounces-372814-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 tor.lore.kernel.org (tor.lore.kernel.org [172.105.105.114])
	by mail.dewy.ru (Postfix) with ESMTPS id 4E176125F64; Fri, 27 Nov 2026 18:08:52 +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 C2F862D094; Fri, 27 Nov 2026 15:08:48 +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=1795792125;
	b=JjCr1Ucy0TExelUaCZV40lKUhzzg9JpejyAoH7e5XSV9eWGqdQI5hp75fkG2j4BX1ElI
	 Hb+9z4mV60MqKOIESRvsJV0C0GnUEBpIPk71z6z8xxnN3OEPHc7Ax1nzqMtHNxBYlWP+b
	 sPUAt55yl7sFYdWIsGePOvMXK+Xxbl0SskJmyLCiL2wKRkfPkfkM5oBnahIg99p4XsSoF
	 ECAYvNg/AslY6i+LFNpeL+D+oklNDmarNkBEwJCMLTfSyQmjYAZ1F4b8WQf1/Q/qsdqRi
	 oxuFHKWgBQQbNbmYatVb6h6Jt1IB7o5qq9aMevsDjzNXW3YqnL7piSIiP+5Sc9KbTnw==
X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015;
	a=rsa-sha256; c=relaxed/relaxed; t=1795792125;
	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=muNvK9LefSzPBuodcVVUfzwx3zouBwL9SxDxhw0Uttc=;
	b=pn1fopvNscEbDARWQjRv5rlWnlootvWmSm2liXANy9yW0sO7S8O9agTMVOccAMsx6pGR
	 6NT4LmZSzZtdOo/JH8vfMqtEHVOrGaY7QDXhzxR0u49Pj1zQEkGOZP8+DCIp9Rei6bAO8
	 aUIT7pXtwVlIjyjihLPMMk31JknJGwb2fA2fRNEM5kMnsmEIENwCkBZJN4X1tSMZTplQj
	 S1DQuzOPcah1uFZ1/PG5N3c4jBkTrmXssqKy3/+o2dqyWmSygjFTO/L5Wf5VT4+cFVS34
	 3z/ueFC/Ih6o4GVpotaqx8oapCHgsRE0U5To5Eb8O55qg1X/XCfcNSQxyqOD3xSIPsw==
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=0oCvcGp4;
	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 01926606A329;
	Fri, 27 Nov 2026 15:08:45 +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=0oCvcGp4
X-Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=195.10.208.61
X-ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none;
	t=1795792124;
	b=iAzWyBj+8NVDMyeimj22ZaXxcqBUnEATtiN2fV2nezEpjED8rTDR8fiLnrliY4kiJI/t
	 hparDIAykJx5/wph4CLlBcEKVWBkSz8nzitoiBUtq9gthJH6/0WDT3srU3Et1WzeFvn0P
	 ijcXtlNVPp7lAr7NoVmJKEZ35HpvkRBLexItkPrqxWR21xQ3QAVPBc9wBOxxO8iRAu9TA
	 +1iwbG4T7maxFXFIeiqqqm2CyaU0WItuW0bR19cCGNrvi0dk2UzxrGRYgWBpoXoFGjwCP
	 aAaFj8fnoWVU/bEpzen6j+175apo5fMMibqUXoijapcTct0ypXVqJHQAy7ufFUXxkCw==
X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015;
	a=rsa-sha256; c=relaxed/relaxed; t=1795792124;
	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=muNvK9LefSzPBuodcVVUfzwx3zouBwL9SxDxhw0Uttc=;
	b=sADooM4EXgyrxPMD0fIc1BIYnFeJt4DBZPdCpNxX4x2w7Pqy15Ui0rTvmwRhxPL6zvB4
	 u33LZMHh4IdU4ksSN2/PQasxF5FzDpPuLMNaTr0JRebOhN4yPhi9DyIPXCOmjsSbXhFuq
	 vTt04isDD77Ddnau7KtjSxrKRpqAOILEdO3VONsFWPFm6Ce4hwaIdhENPR8wJGS7uAFxg
	 tA9WolkW4BJLwcCy4G28cvKvSnx+N21JHby5CrbSPdTWr21redqgvzlN02lRJS/jA5Cuw
	 t0IgwHxm5K//Ya3iP+7ZZFS8U6pwlDlrhcUizflLY4aFfwc7G3HX3MGad8xwPeFM1eg==
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=0oCvcGp4;
	arc=none smtp.remote-ip=195.10.208.61
X-Received: from mout-b-201.mailbox.org (mout-b-201.mailbox.org [195.10.208.61])
	(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 9F904606A31F
	for <netdev@vger.kernel.org>; Fri, 27 Nov 2026 15:08:43 +0000 (UTC)
X-DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 9F904606A31F
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-201.mailbox.org (Postfix) with ESMTPS id 4jbcHp4NGKzLlRq;
	Fri, 27 Nov 2026 16:08:38 +0100 (CET)
X-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mandelbit.com;
	s=MBO0001; t=1795792118;
	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=muNvK9LefSzPBuodcVVUfzwx3zouBwL9SxDxhw0Uttc=;
	b=0oCvcGp4Sqo5fXGF32FgtsVu7ANklyn23c+82c9UFjRol6fmA7pxR4/pGwV1xUx3DLtSRO
	lKj46LyVXxqCjD+d7nt3rNS9ralyZKy4CJAUhxunC/c1XPbtmosZJtndD9KIz/MG8gLVVx
	z+lh2/sy1+1GVrjTbaG9QOho9cl71Viloos0m+jAiDxp3nnCayLubiJrFEuDyLTYmwPZG6
	ADLNwwSlvJ3RG9Sc6ytbXM720PmilwIh59b2RbTU0NPtUmOhkgd62sa+VEo7nMt5DqmByp
	0AZ+ngiqbr72P2eHxf8a7N4nxh7wgPdhkhezjH2hLSsCcMLc55OfzBkHFCODPw==
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>,
	Koen Vandeputte <koen.vandeputte@citymesh.com>,
	Jérémy Jean <Jeremy.Jean@oss.cyber.gouv.fr>,
	Antonio Quartulli <antonio@mandelbit.com>
X-Mailer: git-send-email 2.56.1
X-In-Reply-To: <20261127150827.785753-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: 4jbcHp4NGKzLlRq