Netdev List
 help / color / mirror / Atom feed
* [RFC net-next 0/2] octeontx2-af: fix CN20K counter bounds and mailbox base
@ 2026-11-11  9:34 Yicheng Zhong
  2026-11-11  9:34 ` [RFC net-next 1/2] octeontx2-af: reject an out of range MCAM counter on CN20K Yicheng Zhong
  2026-11-11  9:34 ` [RFC net-next 2/2] octeontx2-af: cn20k: do not phys_to_virt() the mailbox base Yicheng Zhong
  0 siblings, 2 replies; 6+ messages in thread
From: Yicheng Zhong @ 2026-11-11  9:34 UTC (permalink / raw)
  To: Sunil Goutham, Ratheesh Kannoth, Geetha sowjanya,
	Subbaraya Sundeep; +Cc: netdev

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


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2026-11-12 11:17 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-11-11  9:34 [RFC net-next 0/2] octeontx2-af: fix CN20K counter bounds and mailbox base Yicheng Zhong
2026-11-11  9:34 ` [RFC net-next 1/2] octeontx2-af: reject an out of range MCAM counter on CN20K Yicheng Zhong
2026-11-12  2:01   ` Ratheesh Kannoth
2026-11-12  3:25     ` Yicheng Zhong
2026-11-11  9:34 ` [RFC net-next 2/2] octeontx2-af: cn20k: do not phys_to_virt() the mailbox base Yicheng Zhong
2026-11-12 11:16   ` Sai Krishna Gajula

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox