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]
Date:   Thu, 2 Jul 2020 11:19:58 +0100
From:   Russell King - ARM Linux admin <linux@...linux.org.uk>
To:     Codrin Ciubotariu <codrin.ciubotariu@...rochip.com>
Cc:     netdev@...r.kernel.org, linux-kernel@...r.kernel.org,
        woojung.huh@...rochip.com, UNGLinuxDriver@...rochip.com,
        andrew@...n.ch, vivien.didelot@...il.com, f.fainelli@...il.com,
        davem@...emloft.net, kuba@...nel.org
Subject: Re: [PATCH net-next] net: dsa: microchip: split adjust_link() in
 phylink_mac_link_{up|down}()

On Thu, Jul 02, 2020 at 12:54:39PM +0300, Codrin Ciubotariu wrote:
> The DSA subsystem moved to phylink and adjust_link() became deprecated in
> the process. This patch removes adjust_link from the KSZ DSA switches and
> adds phylink_mac_link_up() and phylink_mac_link_down().
> 
> Signed-off-by: Codrin Ciubotariu <codrin.ciubotariu@...rochip.com>

For the code _transformation_ that the patch does:

Reviewed-by: Russell King <rmk+kernel@...linux.org.uk>

as it is equivalent.  However, for a deeper review of what is going
on here, I've a question:

$ grep live_ports *
ksz8795.c:         dev->live_ports = dev->host_mask;
ksz8795.c:                 dev->live_ports |= BIT(port);
ksz_common.h:      u16 live_ports;
ksz_common.c:              dev->live_ports &= ~(1 << port);
ksz_common.c:              dev->live_ports |= (1 << port) & dev->on_ports;
ksz_common.c:      dev->live_ports &= ~(1 << port);
ksz9477.c:         dev->live_ports = dev->host_mask;
ksz9477.c:                 dev->live_ports |= (1 << port);

These are the only references to dev->live_ports, so the purpose of
dev->live_ports seems unclear; it seems it is only updated but never
read.  Can it be removed, along with the locking in your new functions?

Thanks.

-- 
RMK's Patch system: https://www.armlinux.org.uk/developer/patches/
FTTP is here! 40Mbps down 10Mbps up. Decent connectivity at last!

Powered by blists - more mailing lists