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>] [day] [month] [year] [list]
Date:   Tue, 20 Mar 2018 11:28:22 +0100
From:   Stephan Mondwurf <s.mondwurf@...ro-kom.de>
To:     Vince Bridgers <vbridger@...nsource.altera.com>
CC:     <netdev@...r.kernel.org>, <nios2-dev@...ts.rocketboards.org>
Subject: [PATCH] Avoid interruption of multicast reception if mc list changes

The Altera TSE driver clears the multicast hash table before reapplying the
correct values. This results in an interruption of multicast reception on
any change of the mc addr list.

This patch recalculates the multicast hash table before applying it to the
hardware.

Signed-off-by: Stephan Mondwurf <s.mondwurf@...ro-kom.de>
---
  drivers/net/ethernet/altera/altera_tse_main.c | 11 ++++++-----
  1 file changed, 6 insertions(+), 5 deletions(-)

diff --git a/drivers/net/ethernet/altera/altera_tse_main.c 
b/drivers/net/ethernet/altera/altera_tse_main.c
index 241d27b..ec4bb7b 100644
--- a/drivers/net/ethernet/altera/altera_tse_main.c
+++ b/drivers/net/ethernet/altera/altera_tse_main.c
@@ -1022,10 +1022,7 @@ static void altera_tse_set_mcfilter(struct 
net_device *dev)
  	struct altera_tse_private *priv = netdev_priv(dev);
  	int i;
  	struct netdev_hw_addr *ha;
-
-	/* clear the hash filter */
-	for (i = 0; i < 64; i++)
-		csrwr32(0, priv->mac_dev, tse_csroffs(hash_table) + i * 4);
+	u32 ht[64] = { 0 };

  	netdev_for_each_mc_addr(ha, dev) {
  		unsigned int hash = 0;
@@ -1041,8 +1038,12 @@ static void altera_tse_set_mcfilter(struct 
net_device *dev)

  			hash = (hash << 1) | xor_bit;
  		}
-		csrwr32(1, priv->mac_dev, tse_csroffs(hash_table) + hash * 4);
+		ht[hash] = 1;
  	}
+
+	/* write the hash filter table */
+	for (i = 0; i < 64; i++)
+		csrwr32(ht[i], priv->mac_dev, tse_csroffs(hash_table) + i * 4);
  }


-- 
1.9.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ