lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <e82f7f4d-8d45-1e7c-a2ef-5a8bfc3992c6@gmail.com>
Date:   Thu, 5 Nov 2020 14:58:01 +0100
From:   Heiner Kallweit <hkallweit1@...il.com>
To:     Jakub Kicinski <kuba@...nel.org>,
        David Miller <davem@...emloft.net>,
        Realtek linux nic maintainers <nic_swsd@...ltek.com>
Cc:     "netdev@...r.kernel.org" <netdev@...r.kernel.org>
Subject: [PATCH net] r8169: disable hw csum for short packets and chip
 versions with hw padding bug

RTL8125B has same or similar short packet hw padding bug as RTL8168evl.
The main workaround has been extended accordingly, however we have to
disable also hw checksumming for short packets on affected new chip
versions. Change the code in a way that in case of further affected
chip versions we have to add them in one place only.

Fixes: 0439297be951 ("r8169: add support for RTL8125B")
Signed-off-by: Heiner Kallweit <hkallweit1@...il.com>
---
 drivers/net/ethernet/realtek/r8169_main.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/realtek/r8169_main.c b/drivers/net/ethernet/realtek/r8169_main.c
index c5d5c1cfc..56f84b597 100644
--- a/drivers/net/ethernet/realtek/r8169_main.c
+++ b/drivers/net/ethernet/realtek/r8169_main.c
@@ -4315,11 +4315,13 @@ static netdev_features_t rtl8169_features_check(struct sk_buff *skb,
 			features &= ~NETIF_F_ALL_TSO;
 	} else if (skb->ip_summed == CHECKSUM_PARTIAL) {
 		if (skb->len < ETH_ZLEN) {
+			if (rtl_test_hw_pad_bug(tp))
+				features &= ~NETIF_F_CSUM_MASK;
+
 			switch (tp->mac_version) {
 			case RTL_GIGA_MAC_VER_11:
 			case RTL_GIGA_MAC_VER_12:
 			case RTL_GIGA_MAC_VER_17:
-			case RTL_GIGA_MAC_VER_34:
 				features &= ~NETIF_F_CSUM_MASK;
 				break;
 			default:
-- 
2.29.2

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ