summaryrefslogtreecommitdiff
path: root/net
diff options
context:
space:
mode:
authorTobias Waldekranz <tobias@waldekranz.com>2025-04-01 08:58:04 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2025-04-10 14:33:40 +0200
commitb3f48a41a00d6d8d9c6fe09ae47dd21c8c1c8b03 (patch)
treeefd43397aaf8f3b5c268cd860763465a6cb1a35a /net
parent1dcc144c322a8d526b791135604c0663f1af9d85 (diff)
downloadlinux-b3f48a41a00d6d8d9c6fe09ae47dd21c8c1c8b03.tar.gz
linux-b3f48a41a00d6d8d9c6fe09ae47dd21c8c1c8b03.tar.bz2
linux-b3f48a41a00d6d8d9c6fe09ae47dd21c8c1c8b03.zip
net: mvpp2: Prevent parser TCAM memory corruption
[ Upstream commit 96844075226b49af25a69a1d084b648ec2d9b08d ] Protect the parser TCAM/SRAM memory, and the cached (shadow) SRAM information, from concurrent modifications. Both the TCAM and SRAM tables are indirectly accessed by configuring an index register that selects the row to read or write to. This means that operations must be atomic in order to, e.g., avoid spreading writes across multiple rows. Since the shadow SRAM array is used to find free rows in the hardware table, it must also be protected in order to avoid TOCTOU errors where multiple cores allocate the same row. This issue was detected in a situation where `mvpp2_set_rx_mode()` ran concurrently on two CPUs. In this particular case the MVPP2_PE_MAC_UC_PROMISCUOUS entry was corrupted, causing the classifier unit to drop all incoming unicast - indicated by the `rx_classifier_drops` counter. Fixes: 3f518509dedc ("ethernet: Add new driver for Marvell Armada 375 network unit") Signed-off-by: Tobias Waldekranz <tobias@waldekranz.com> Reviewed-by: Maxime Chevallier <maxime.chevallier@bootlin.com> Tested-by: Maxime Chevallier <maxime.chevallier@bootlin.com> Link: https://patch.msgid.link/20250401065855.3113635-1-tobias@waldekranz.com Signed-off-by: Jakub Kicinski <kuba@kernel.org> Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'net')
0 files changed, 0 insertions, 0 deletions