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:   Wed, 28 Mar 2018 09:19:01 -0700
From:   Joe Perches <joe@...ches.com>
To:     Russell King - ARM Linux <linux@...linux.org.uk>
Cc:     Andrew Lunn <andrew@...n.ch>,
        Florian Fainelli <f.fainelli@...il.com>, netdev@...r.kernel.org
Subject: Re: [PATCH] sfp: allow cotsworks modules

On Wed, 2018-03-28 at 11:41 +0100, Russell King - ARM Linux wrote:
> On Wed, Mar 28, 2018 at 03:33:57AM -0700, Joe Perches wrote:
> > On Wed, 2018-03-28 at 11:18 +0100, Russell King wrote:
> > > Cotsworks modules fail the checksums - it appears that Cotsworks
> > > reprograms the EEPROM at the end of production with the final product
> > > information (serial, date code, and exact part number for module
> > > options) and fails to update the checksum.
> > 
> > trivia:
> > 
> > > diff --git a/drivers/net/phy/sfp.c b/drivers/net/phy/sfp.c
> > 
> > []
> > > @@ -574,23 +575,43 @@ static int sfp_sm_mod_probe(struct sfp *sfp)
> > 
> > []
> > > +		if (cotsworks) {
> > > +			dev_warn(sfp->dev,
> > > +				 "EEPROM base structure checksum failure (0x%02x != 0x%02x)\n",
> > > +				 check, id.base.cc_base);
> > > +		} else {
> > > +			dev_err(sfp->dev,
> > > +				"EEPROM base structure checksum failure: 0x%02x != 0x%02x\n",
> > 
> > It'd be better to move this above the if and
> > use only a single format string instead of
> > using 2 slightly different formats.
> 
> No.  I think you've missed the fact that one is a _warning_ the other is
> an _error_ and they are emitted at the appropriate severity.  It's not
> just that the format strings are slightly different.

Right.  Still nicer to use the same formats.

cheers, Joe

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ