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: <5762AA6B.9060003@linaro.org>
Date:	Thu, 16 Jun 2016 16:32:27 +0300
From:	Ivan Khoronzhuk <ivan.khoronzhuk@...aro.org>
To:	Grygorii Strashko <grygorii.strashko@...com>,
	Florian Fainelli <f.fainelli@...il.com>,
	"David S. Miller" <davem@...emloft.net>, netdev@...r.kernel.org,
	Sekhar Nori <nsekhar@...com>,
	Mugunthan V N <mugunthanvnm@...com>
Cc:	linux-kernel@...r.kernel.org, linux-omap@...r.kernel.org,
	Rob Herring <robh+dt@...nel.org>, devicetree@...r.kernel.org
Subject: Re: [PATCH 04/15] drivers: net: cpsw: ethtool: fix accessing to
 suspended device



On 16.06.16 15:48, Ivan Khoronzhuk wrote:
>
>
> On 15.06.16 19:45, Grygorii Strashko wrote:
>> On 06/15/2016 07:14 PM, Florian Fainelli wrote:
>>> On 06/15/2016 04:55 AM, Grygorii Strashko wrote:
>>>> The CPSW might be suspended by RPM if all ethX interfaces are down,
>>>> but it still could be accesible through ethtool interfce. In this case
>>>> ethtool operations, requiring registers access, will cause L3 errors and
>>>> CPSW crash.
>>>>
>>>> Hence, fix it by adding RPM get/put calls in ethtool callbcaks which
>>>> can access CPSW registers: .set_coalesce(), .get_ethtool_stats(),
>>>> .set_pauseparam(), .get_regs()
>>>
>>> Provided that you implement an ethtool_ops::begin, it will be called
>>> before each ethtool operation runs, so that could allow you to eliminate
>>> some of the duplication here. Conversely ethtool_ops::end terminates
>>> each operation and can be used for that purpose.
>>
>> Ah. Thanks for the advice. (assume you've meant .complete())
>
> Maybe better leave as is, I'm going to add two additional ehttool ops
> containing RPM sensitive part and not, better to split code on those,
> if possible...and hiding put/get in begin op can call rpm when it's not
> needed at all..

But it's not a big deal, ethtool operations are rarelly anyway, and have
impact only when interface is down that makes it even more rarely.

>
>>
>>
>>
>

-- 
Regards,
Ivan Khoronzhuk

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ