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: <d4f6fab0-8099-7cc2-dfce-bd7a3363c131@alliedtelesis.co.nz>
Date:   Tue, 20 Oct 2020 21:24:04 +0000
From:   Chris Packham <Chris.Packham@...iedtelesis.co.nz>
To:     Russell King - ARM Linux admin <linux@...linux.org.uk>
CC:     "andrew@...n.ch" <andrew@...n.ch>,
        "vivien.didelot@...il.com" <vivien.didelot@...il.com>,
        "f.fainelli@...il.com" <f.fainelli@...il.com>,
        "olteanv@...il.com" <olteanv@...il.com>,
        "davem@...emloft.net" <davem@...emloft.net>,
        "kuba@...nel.org" <kuba@...nel.org>,
        "netdev@...r.kernel.org" <netdev@...r.kernel.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH v3 3/3] net: dsa: mv88e6xxx: Support serdes ports on
 MV88E6123/6131


On 20/10/20 11:18 pm, Russell King - ARM Linux admin wrote:
> On Tue, Oct 20, 2020 at 04:45:58PM +1300, Chris Packham wrote:
>> +void mv88e6123_serdes_get_regs(struct mv88e6xxx_chip *chip, int port, void *_p)
>> +{
>> +	u16 *p = _p;
>> +	u16 reg;
>> +	int i;
>> +
>> +	if (mv88e6xxx_serdes_get_lane(chip, port) == 0)
>> +		return;
>> +
>> +	for (i = 0; i < 26; i++) {
>> +		mv88e6xxx_phy_read(chip, port, i, &reg);
> Shouldn't this deal with a failed read in some way, rather than just
> assigning the last or possibly uninitialised value to p[i] ?

mv88e6390_serdes_get_regs() and mv88e6352_serdes_get_regs() also ignore 
the error. The generic mv88e6xxx_get_regs() memsets p[] to 0xff so if 
the serdes_get_regs functions just left it alone we'd return 0xffff 
which is probably better than repeating the last value although it's 
still ambiguous because 0xffff is a valid value for plenty of these 
registers.

Since it looks like I need to come up with an alternative to patch #1 
I'll concentrate on that but making the serdes_get_regs() a little more 
error tolerant is a cleanup I can easily tack on onto this series.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ