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:   Sun, 26 Apr 2020 22:31:50 +0200
From:   Andrew Lunn <andrew@...n.ch>
To:     Michal Kubecek <mkubecek@...e.cz>
Cc:     netdev@...r.kernel.org, David Miller <davem@...emloft.net>,
        Florian Fainelli <f.fainelli@...il.com>,
        Heiner Kallweit <hkallweit1@...il.com>,
        Chris Healy <cphealy@...il.com>
Subject: Re: [PATCH net-next v1 1/9] net: phy: Add cable test support to
 state machine

> > +	mutex_lock(&phydev->lock);
> > +	if (phydev->state < PHY_UP ||
> > +	    phydev->state >= PHY_CABLETEST) {
> > +		NL_SET_ERR_MSG(extack,
> > +			       "PHY not configured. Try setting interface up");
> > +		err = -EBUSY;
> > +		goto out;
> > +	}
> 
> If I read the code correctly, this check would also catch an attempt to
> start a cable test while the test is already in progress in which case
> the error message would be rather misleading. I'm not sure what would be
> more appropriate in such case: we can return -EBUSY (with more fitting
> error message) but we could also silently ignore the request and let the
> client wait for the notification from the test which is already in
> progress.

Hi Michal

Yes, i will change this to handle phydev->state == PHY_CABLETEST
differently. Probably -EBUSY is the simplest.

Thanks
	Andrew

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ