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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <78EB27739596EE489E55E81C33FEC33A0B47B52A@DE02WEMBXB.internal.synopsys.com>
Date:   Thu, 9 May 2019 16:05:35 +0000
From:   Jose Abreu <Jose.Abreu@...opsys.com>
To:     'Andrew Lunn' <andrew@...n.ch>,
        'Jose Abreu' <Jose.Abreu@...opsys.com>
CC:     "'netdev@...r.kernel.org'" <netdev@...r.kernel.org>,
        "'linux-kernel@...r.kernel.org'" <linux-kernel@...r.kernel.org>,
        'Joao Pinto' <Joao.Pinto@...opsys.com>,
        "'David S . Miller'" <davem@...emloft.net>,
        'Giuseppe Cavallaro' <peppe.cavallaro@...com>,
        'Alexandre Torgue' <alexandre.torgue@...com>
Subject: RE: [PATCH net-next 00/11] net: stmmac: Selftests

From: Jose Abreu <joabreu@...opsys.com>
Date: Thu, May 09, 2019 at 09:17:03

> From: Andrew Lunn <andrew@...n.ch>
> Date: Wed, May 08, 2019 at 20:50:11
> 
> > The normal operation is interrupted by the tests you carry out
> > here. But i don't see any code looking for ETH_TEST_FL_OFFLINE
> 
> Ok will fix to only run in offline mode then.
> 
> > 
> > > (Error code -95 means EOPNOTSUPP in current HW).
> > 
> > How deep do you have to go before you know about EOPNOTSUPP?  It would
> > be better to not return the string and result at all. Or patch ethtool
> > to call strerror(3).
> 
> When I looked at other drivers I saw that they return positive value (1) 
> or zero so calling strerror in ethtool may not be ideal.
> 
> I think its useful to let the user know if a given test is not supported 
> in HW so maybe I can return 1 instead of EOPNOTSUPP ?

After thinking about this in more detail I now realize that returning 1 
is not ideal because when a test fails it will also return 1. So if I do 
it this way and more than one test fails then user won't know if the test 
really failed or if it wasn't supported in the first time.

Any advice ?

Thanks,
Jose Miguel Abreu

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ