🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: linux.kernel.netdev
Article #14465

[RFC net-next 0/2] octeontx2-af: fix CN20K counter bounds and mailbox base

#14465
From: Yicheng Zhong
Date: Wed, 11 Nov 2026 09:34
28 lines
9181 bytes
Two fixes in the CN20K paths of octeontx2-af.

The first bounds the counter argument of the MCAM counter handler before it
is turned into a bank and a register offset.  With a counter past the table
the bank selects a bank that does not exist and the offset leaves the NPC
block.

The second removes a phys_to_virt() from a pointer that is already a kernel
virtual address, which otherwise takes probe out of the linear map on arm64.

Both were found by reading the driver and were exercised in a QEMU model of
CN20K silicon, not on hardware, which is why they are RFC.  A longer report
covering other findings in the same handlers went to the maintainers and the
security team separately and is not part of this series.

Yicheng Zhong (2):
  octeontx2-af: reject an out of range MCAM counter on CN20K
  octeontx2-af: cn20k: do not phys_to_virt() the mailbox base

 .../net/ethernet/marvell/octeontx2/af/cn20k/mbox_init.c    | 4 ++--
 drivers/net/ethernet/marvell/octeontx2/af/rvu_npc.c        | 7 +++++++
 2 files changed, 9 insertions(+), 2 deletions(-)


base-commit: 7b6ab4dbc156e2f96419715130b3d5738a306c93
-- 
2.43.0
Technical Details
Message-ID: <179438966513.1752948.1646241391383361825@mails.ucas.ac.cn>
Path: mbox-mo1.pugleaf.net!news-lax.pugleaf.net!srl.newsdeef.eu!newsfeed.bofh.team!nntp.comgw.net!eternal-september.org!feeder.eternal-september.org!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-360947-linux-kernel-netdev=dewy.ru

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!news-lax.pugleaf.net!srl.newsdeef.eu!newsfeed.bofh.team!nntp.comgw.net!eternal-september.org!feeder.eternal-september.org!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-360947-linux-kernel-netdev=dewy.ru
From: zhongyicheng241@mails.ucas.ac.cn (Yicheng Zhong)
Newsgroups: linux.kernel.netdev
Subject: [RFC net-next 0/2] octeontx2-af: fix CN20K counter bounds and mailbox base
Date: Wed, 11 Nov 2026 09:34:25 -0000
Organization: Usenet Network
Message-ID: <179438966513.1752948.1646241391383361825@mails.ucas.ac.cn>
MIME-Version: 1.0
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: 8bit
Injection-Info: usenet.network;
	logging-data="822634"; mail-complaints-to="abuse@usenet.network"
Cancel-Lock: sha1:7QxVr1t7QqPFqNlZfpZZDWYAo9g= sha256:hypHseFCIIzU9+Vt3gaGYm3f+hVKzcIk1D6pucjSenk=
	sha1:4wo13yTXacka+zfl7jTxahINFJ0= sha256:8LqJs0XdIPfFrZY72VP8xifNyYLzSHGv6WDhLm7Zn40=
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 395F0113E87; Wed, 11 Nov 2026 12:45:23 +0300 (MSK)
X-Virus-Scanned: Debian amavisd-new at usenet.network
X-Spam-Flag: NO
X-Spam-Score: -2.951
X-Spam-Status: No, score=-2.951 tagged_above=-9999 required=6.31
	tests=[DCC_REPUT_70_89=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-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 C_Fc19pU2FJP;
	Wed, 11 Nov 2026 12:45:18 +0300 (MSK)
X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=104.64.211.4; helo=sin.lore.kernel.org; envelope-from=netdev+bounces-360947-linux-kernel-netdev=dewy.ru@vger.kernel.org; receiver=<UNKNOWN> 
X-Authentication-Results: OpenDMARC; dmarc=none (p=none dis=none) header.from=mails.ucas.ac.cn
X-Received: from sin.lore.kernel.org (sin.lore.kernel.org [104.64.211.4])
	by mail.dewy.ru (Postfix) with ESMTPS id E3191113E79; Wed, 11 Nov 2026 12:45:13 +0300 (MSK)
X-Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.77.114.92])
	by sin.lore.kernel.org (Postfix) with ESMTP id 733713A573; Wed, 11 Nov 2026 09:34:39 +0000 (UTC)
X-Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.remote-ip=127.0.0.1
X-ARC-Seal: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=fail;
	t=1794389677;
	b=MURqi8V04JFNuoySYlnEADe1HbeNim7Yl85aBtcdfkg4aBd/YRqeedDS/usOveTDXQki
	 wOD6VlAgdfkYxRPg9LbxWiLmqhBlEijM5Mu7SPR9LbT3Ye6L+Mx4Yz5sxoGtYkNLxWtSX
	 eWvgIHjV5DOM/mqBxvnFuVfeKHRG446KMnibJ9ZYhBsAGU8HNGL4e4o1/KhvZaktO3QIS
	 MYsPrpJnHWlwoQs0baV8HbHMJXFeKh2MsVzXVPyxcoltcRrwxMg0ee3qJpb6hxDcABCQr
	 d/IubrIhkO3+YZZRhaEBlda7vEJt4qMnDjc1r+kNaRoTKAmUtMWjp0qfC3A297ExY9Q==
X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015;
	a=rsa-sha256; c=relaxed/relaxed; t=1794389677;
	h=X-Original-To:Received:DMARC-Filter:Received:From:To:Cc:Subject:Date:
	 Message-ID:Content-Type:Content-Transfer-Encoding:X-Mailing-List:
	 List-Id:List-Post:List-Help:List-Subscribe:List-Unsubscribe:
	 List-Owner:Precedence:MIME-Version:X-CM-TRANSID:X-Coremail-Antispam:
	 X-CM-SenderInfo;
	bh=HJGwxaWDGmRmOnT4rUcqo289jZ3CK7URRyj+Uuhv5eU=;
	b=rn4rJj3/0vMlGtewWBPr9kMtmGl5KOpP0WWcL4u7EDkWD+8CtYlA8Geb67CskHkV5hNq
	 OflaB/wvN4LXPcRZpvy18BvtKwg5nu6/5TZhGn2TQywnif+gOhIxcbULQk/V0el4fx4ZZ
	 3eMRo+oKQncVg07CpkuOZ+DrOyZQM1CFpE0vbz2/VxeUvn+svjYAvZJV/XyJrr/cgFWeH
	 DdzOd1ToSMifo3FuudGCnJwvDCpSjJLdcFKuP1Kp4ldXDI1n2B63c9QvJ6MDnRy9oYdlQ
	 ckH3kLB99IyPP7URutMCvTvdmXL85/tjF6Yi+/JgZXujR9lWqoOFn8+LcKoelI6CyZg==
X-ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; 
	dmarc=none header.from=mails.ucas.ac.cn;
	spf=pass smtp.mailfrom=mails.ucas.ac.cn;
	arc=fail 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 1EA73606A336;
	Wed, 11 Nov 2026 09:34:37 +0000 (UTC)
X-Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=159.226.251.25
X-ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none;
	t=1794389671;
	b=rJDc+/XTfDb/sto8Bxo0HDhcTeqvrJTLnTyOtI91RXGt1YD2NYQgicXv8c0Y2Dl7NDx8
	 XN4xWgC1IeZYrOcO7YQwq5Ntop9+Mp9HMqYOj640Cwn83usoUBNymBIX+GYE89ilfhggm
	 923CZQ1HL8DhkRw97HU/l2w/Tqcz3Ui0o1f5GKaStbLO0JYT3uuM0fjfIPpDJKBFsxdQU
	 2+1kxJwrJP6h5Q/E15/ncAd1f7LNSev53tnglVplyuXlmfWT0ocWiSVVLmxDM/8Yuf7T+
	 8fvuZx9wOWpWU1iey+D3U8QliIYlKWCC7lOAam3koD2lMQa+6ubwDCjyU7ks0GyP0IA==
X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015;
	a=rsa-sha256; c=relaxed/relaxed; t=1794389671;
	h=DMARC-Filter:Received:From:To:Cc:Subject:Date:Message-ID:
	 Content-Type:Content-Transfer-Encoding:MIME-Version:X-CM-TRANSID:
	 X-Coremail-Antispam:X-Originating-IP:X-CM-SenderInfo;
	bh=HJGwxaWDGmRmOnT4rUcqo289jZ3CK7URRyj+Uuhv5eU=;
	b=bAydciASgewQH8EM/U5GUdeWOoNhoEV1/pl2a39BEziEIXSsrVpRmNX+n3bTgN6b3Eaa
	 2JxsshdLNgSmeWtCsme+xtuiE+fYQjAsrlO5qGZJSr2o1Tlq4ViUv2wEyUzWgVhqMrbY3
	 Ew4VJbEODcCRtXWmKp7yudIm/7ueCvM8Jv/h+EwW8LB926k58UD9ILAOwd+SVWeSg19WN
	 QfMs5TiVKAOumApCIyB6WFitxuRC4FHun/K63qbTIT3oh+HDWwxuMAKUK+3K442CSsTGf
	 MBEV0GzmC9GZf016y9Qa7fRu730c65d7hv5b/35D5wl7nNX5X74nYP36Jdqw1xFKl5A==
X-ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; 
	dmarc=none header.from=mails.ucas.ac.cn;
	spf=pass smtp.mailfrom=mails.ucas.ac.cn;
	arc=none smtp.remote-ip=159.226.251.25
X-Received: from cstnet.cn (smtp25.cstnet.cn [159.226.251.25])
	(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 38525606A324
	for <netdev@vger.kernel.org>; Wed, 11 Nov 2026 09:34:27 +0000 (UTC)
X-DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 38525606A324
X-Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=mails.ucas.ac.cn
X-Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=mails.ucas.ac.cn
X-Received: from imini.taila1aac7.ts.net (unknown [36.110.52.2])
	by APP-05 (Coremail) with SMTP id zQCowAAHZbqhNvRq183fAA--.7089S2;
	Wed, 11 Nov 2026 17:34:25 +0800 (CST)
X-Cc: netdev@vger.kernel.org
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-CM-TRANSID: zQCowAAHZbqhNvRq183fAA--.7089S2
X-Coremail-Antispam: 1UD129KBjvdXoW7Jry8CrWkKF18uF4DWr4DJwb_yoWkXFg_C3
	9rZFW7Cw45C3WfAa1ayrsrZ34DCFW8uFWIvrs7WrWUKrWUAFW5ArykGrZYvr4xuan3Zrsr
	ArWrWryfu34a9jkaLaAFLSUrUUUUbb8apTn2vfkv8UJUUUU8Yxn0WfASr-VFAUDa7-sFnT
	9fnUUIcSsGvfJTRUUUbIkYjsxI4VWDJwAYFVCjjxCrM7AC8VAFwI0_Jr0_Gr1l1xkIjI8I
	6I8E6xAIw20EY4v20xvaj40_Wr0E3s1l1IIY67AEw4v_Jr0_Jr4l8cAvFVAK0II2c7xJM2
	8CjxkF64kEwVA0rcxSw2x7M28EF7xvwVC0I7IYx2IY67AKxVW5JVW7JwA2z4x0Y4vE2Ix0
	cI8IcVCY1x0267AKxVW8JVWxJwA2z4x0Y4vEx4A2jsIE14v26rxl6s0DM28EF7xvwVC2z2
	80aVCY1x0267AKxVW0oVCq3wAac4AC62xK8xCEY4vEwIxC4wAS0I0E0xvYzxvE52x082IY
	62kv0487Mc02F40EFcxC0VAKzVAqx4xG6I80ewAv7VC0I7IYx2IY67AKxVWUtVWrXwAv7V
	C2z280aVAFwI0_Cr1j6rxdMcvjeVCFs4IE7xkEbVWUJVW8JwACjcxG0xvEwIxGrwCY1x02
	62kKe7AKxVWUAVWUtwCF04k20xvY0x0EwIxGrwCFx2IqxVCFs4IE7xkEbVWUJVW8JwC20s
	026c02F40E14v26r1j6r18MI8I3I0E7480Y4vE14v26r106r1rMI8E67AF67kF1VAFwI0_
	JF0_Jw1lIxkGc2Ij64vIr41lIxAIcVC0I7IYx2IY67AKxVWUJVWUCwCI42IY6xIIjxv20x
	vEc7CjxVAFwI0_Jr0_Gr1lIxAIcVCF04k26cxKx2IYs7xG6r1j6r1xMIIF0xvEx4A2jsIE
	14v26r1j6r4UMIIF0xvEx4A2jsIEc7CjxVAFwI0_Gr0_Gr1UYxBIdaVFxhVjvjDU0xZFpf
	9x07jbZ2-UUUUU=
X-CM-SenderInfo: x2kr0wx1lfxvtqjskio6pdxz3voxutnvoduhdfq/