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  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Thu, 26 Dec 2019 13:34:59 -0800
From:   Tom Herbert <tom@...bertland.com>
To:     davem@...emloft.net, netdev@...r.kernel.org
Cc:     Tom Herbert <tom@...bertland.com>
Subject: [PATCH net-next 2/2] net: Warning about use of deprecated TX checksum offload

Add a warning in netdev_fix_features that NETIF_F_IP_CSUM and
NETIF_F_IPV6_CSUM are deprecated and that drivers should advertise
NETIF_F_HW_CSUM instead.

Signed-off-by: Tom Herbert <tom@...bertland.com>
---
 net/core/dev.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/net/core/dev.c b/net/core/dev.c
index 0ad39c8..ef09fb7 100644
--- a/net/core/dev.c
+++ b/net/core/dev.c
@@ -8835,6 +8835,10 @@ static void netdev_sync_lower_features(struct net_device *upper,
 static netdev_features_t netdev_fix_features(struct net_device *dev,
 	netdev_features_t features)
 {
+	/* NETIF_F_IP_CSUM and NETIF_F_IPV6_CSUM are deprecated */
+	if (features & (NETIF_F_IP_CSUM | NETIF_F_IPV6_CSUM))
+		netdev_warn(dev, "NETIF_F_IP_CSUM and NETIF_F_IPV6_CSUM are considered deprecated. Please fix driver to use NETIF_F_HW_CSUM.\n");
+
 	/* Fix illegal checksum combinations */
 	if ((features & NETIF_F_HW_CSUM) &&
 	    (features & (NETIF_F_IP_CSUM|NETIF_F_IPV6_CSUM))) {
-- 
2.7.4

Powered by blists - more mailing lists