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-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <245234f4964a304e6b427b7f1895d2c30d38aabd.1310601401.git.mirq-linux@rere.qmqm.pl>
Date:	Thu, 14 Jul 2011 02:10:29 +0200 (CEST)
From:	Michał Mirosław <mirq-linux@...e.qmqm.pl>
To:	netdev@...r.kernel.org
Cc:	Tom Herbert <therbert@...gle.com>
Subject: [PATCH 05/10] net: Disable NOCACHE_COPY by default

Disable NOCACHE_COPY by default as there's no reliable way to tell
in advance what device(s) will take the packet. Also, allow the
setting to be inherited by VLAN devices.

This is the last use of NETIF_F_NO_CSUM.

Signed-off-by: Michał Mirosław <mirq-linux@...e.qmqm.pl>
---
 net/core/dev.c |   11 +++++------
 1 files changed, 5 insertions(+), 6 deletions(-)

diff --git a/net/core/dev.c b/net/core/dev.c
index e57be02..7b9e2f4 100644
--- a/net/core/dev.c
+++ b/net/core/dev.c
@@ -5480,13 +5480,12 @@ int register_netdevice(struct net_device *dev)
 	dev->features |= NETIF_F_SOFT_FEATURES;
 	dev->wanted_features = dev->features & dev->hw_features;
 
-	/* Turn on no cache copy if HW is doing checksum */
+	/* Allow changing no-cache copy but disable it by default
+	 * as there's no reliable way to tell what device(s) will take
+	 * the packet. Allow the setting to be inherited to VLANs.
+	 */
 	dev->hw_features |= NETIF_F_NOCACHE_COPY;
-	if ((dev->features & NETIF_F_ALL_CSUM) &&
-	    !(dev->features & NETIF_F_NO_CSUM)) {
-		dev->wanted_features |= NETIF_F_NOCACHE_COPY;
-		dev->features |= NETIF_F_NOCACHE_COPY;
-	}
+	dev->vlan_features |= NETIF_F_NOCACHE_COPY;
 
 	/* Make NETIF_F_HIGHDMA inheritable to VLAN devices.
 	 */
-- 
1.7.5.4

--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ