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: <52b62cec-cb65-03a4-f5c2-e36d0d0ff8d3@gmail.com>
Date:   Sun, 26 Apr 2020 14:19:55 -0700
From:   Florian Fainelli <f.fainelli@...il.com>
To:     Andrew Lunn <andrew@...n.ch>
Cc:     David Miller <davem@...emloft.net>,
        netdev <netdev@...r.kernel.org>,
        Heiner Kallweit <hkallweit1@...il.com>,
        Chris Healy <cphealy@...il.com>,
        Michal Kubecek <mkubecek@...e.cz>
Subject: Re: [PATCH net-next v1 2/9] net: phy: Add support for polling cable
 test



On 4/25/2020 1:10 PM, Andrew Lunn wrote:
> On Sat, Apr 25, 2020 at 12:49:46PM -0700, Florian Fainelli wrote:
>> Hi Andrew,
>>
>> On 4/25/2020 11:06 AM, Andrew Lunn wrote:
>>> Some PHYs are not capable of generating interrupts when a cable test
>>> finished. They do however support interrupts for normal operations,
>>> like link up/down. As such, the PHY state machine would normally not
>>> poll the PHY.
>>>
>>> Add support for indicating the PHY state machine must poll the PHY
>>> when performing a cable test.
>>>
>>> Signed-off-by: Andrew Lunn <andrew@...n.ch>
>>
>> If you started a cable test and killed the ethtool process before the
>> cable diagnostics are available, the state machine gets stuck in that
>> state, so we should find a way to propagate the signal all the way to
>> the PHY library somehow.
> 
> Hi Florian
> 
> It should not matter if the user space tool goes away. As you read
> later patches you will see why. But:
> 
> ETHTOOL_MSG_CABLE_TEST_ACT is an action to trigger cable
> test. Assuming the driver supports it etc, the cable test is started,
> and user space immediately gets a ETHTOOL_MSG_CABLE_TEST_ACT_REPLY.
> The state is changed to PHY_CABLETEST.
> 
> Sometime later, the driver indicates the cable test has
> completed. This can be an interrupt, or because it is being polled.  A
> ETHTOOL_MSG_CABLE_TEST_NTF is multicast to user space with the
> results. And the PHY then leaves state PHY_CABLETEST. If there is no
> user space listening for the ETHTOOL_MSG_CABLE_TEST_NTF, it does not
> matter.
> 
> At least with the Marvell PHY, there is no documented way to tell it
> to abort a cable test. So knowing the user space has lost interest in
> the results does not help us.

The same is true with Broadcom PHYs, but I think we should be guarding
somehow against the PHY state machine being left in PHY_CABLETEST state
with no other way to recover than do an ip link set down/up in order to
recover it. We can try to tackle this as an improvement later on.
-- 
Florian

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ