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  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:   Tue, 19 May 2020 15:26:30 +0200
From:   Andrew Lunn <>
To:     Oleksij Rempel <>
Cc:     "David S. Miller" <>,
        Florian Fainelli <>,
        Heiner Kallweit <>,
        Jakub Kicinski <>,
        Jonathan Corbet <>,
        Michal Kubecek <>,
        David Jander <>,,,,
        Russell King <>,,
        Marek Vasut <>,
        Christian Herber <>
Subject: Re: [PATCH net-next v1 1/2] ethtool: provide UAPI for PHY Signal
 Quality Index (SQI)

On Tue, May 19, 2020 at 09:51:59AM +0200, Oleksij Rempel wrote:
> Signal Quality Index is a mandatory value required by "OPEN Alliance
> SIG" for the 100Base-T1 PHYs [1]. This indicator can be used for cable
> integrity diagnostic and investigating other noise sources and
> implement by at least two vendors: NXP[2] and TI[3].

Hi Oleksij

With a multi part patch set, please always include a cover note,
describing what the patchset as a whole does.

> +int __ethtool_get_sqi(struct net_device *dev)
> +{
> +	struct phy_device *phydev = dev->phydev;
> +
> +	if (!phydev->drv->get_sqi)
> +		return -EOPNOTSUPP;
> +
> +	return phydev->drv->get_sqi(phydev);
> +}

You are not doing any locking here, which you should. Due to modules
vs built in, it can be a bit tricky getting this right. Take a look at
how ethtool ioctl.c uses phy_ethtool_get_stats() and that inline
function itself.


Powered by blists - more mailing lists