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]
Date:   Mon, 26 Oct 2020 13:22:57 +0200
From:   Vladimir Oltean <vladimir.oltean@....com>
To:     netdev@...r.kernel.org
Cc:     alexandre.belloni@...tlin.com, andrew@...n.ch,
        f.fainelli@...il.com, vivien.didelot@...il.com,
        claudiu.manoil@....com, xiaoliang.yang_1@....com,
        hongbo.wang@....com, kuba@...nel.org, UNGLinuxDriver@...rochip.com
Subject: [PATCH net] net: mscc: ocelot: populate the entry type in ocelot_mact_read

Currently this boolean in ocelot_fdb_dump will always be set to false:

is_static = (entry.type == ENTRYTYPE_LOCKED);

Fix it by ensuring the entry type is always read from hardware.

Fixes: 64bfb05b74ad ("net: mscc: ocelot: break out fdb operations into abstract implementations")
Signed-off-by: Vladimir Oltean <vladimir.oltean@....com>
---
 drivers/net/ethernet/mscc/ocelot.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/net/ethernet/mscc/ocelot.c b/drivers/net/ethernet/mscc/ocelot.c
index 70bf8c67d7ef..860cd2390670 100644
--- a/drivers/net/ethernet/mscc/ocelot.c
+++ b/drivers/net/ethernet/mscc/ocelot.c
@@ -647,6 +647,8 @@ static int ocelot_mact_read(struct ocelot *ocelot, int port, int row, int col,
 	if (dst != port)
 		return -EINVAL;
 
+	entry->type = ANA_TABLES_MACACCESS_ENTRYTYPE_X(val);
+
 	/* Get the entry's MAC address and VLAN id */
 	macl = ocelot_read(ocelot, ANA_TABLES_MACLDATA);
 	mach = ocelot_read(ocelot, ANA_TABLES_MACHDATA);
-- 
2.25.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ