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: <20221110123249.5f0e19df@kernel.org>
Date:   Thu, 10 Nov 2022 12:32:49 -0800
From:   Jakub Kicinski <kuba@...nel.org>
To:     Roger Quadros <rogerq@...nel.org>,
        Vladimir Oltean <vladimir.oltean@....com>,
        Ido Schimmel <idosch@...sch.org>,
        Nikolay Aleksandrov <razor@...ckwall.org>
Cc:     davem@...emloft.net, edumazet@...gle.com, pabeni@...hat.com,
        vigneshr@...com, srk@...com, linux-omap@...r.kernel.org,
        netdev@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] net: ethernet: ti: cpsw_ale: optimize
 cpsw_ale_restore()

On Thu, 10 Nov 2022 11:39:47 +0200 Roger Quadros wrote:
> > Maybe my tree is old but I see we clear only if there is a netdev that  
> 
> This patch depends on this series
> https://lore.kernel.org/netdev/20221104132310.31577-3-rogerq@kernel.org/T/

I do have those in my tree.

> > needs to be opened but then always call ale_restore(). Is that okay?  
> 
> If netdev is closed and opened ale_restore() is not called.
> ale_restore() is only called during system suspend/resume path
> since CPSW-ALE might have lost context during suspend and we want to restore
> all valid ALE entries.

Ack, what I'm referring to is the contents of am65_cpsw_nuss_resume().

I'm guessing that ALE_CLEAR is expected to be triggered by
cpsw_ale_start().

Assuming above is true and that ALE_CLEAR comes from cpsw_ale_start(),
the call stack is:

 cpsw_ale_start()
 am65_cpsw_nuss_common_open()
 am65_cpsw_nuss_ndo_slave_open()
 am65_cpsw_nuss_resume()

but resume() only calls ndo_slave_open under certain conditions:

        for (i = 0; i < common->port_num; i++) {                                  
                if (netif_running(ndev)) {                                      
                        rtnl_lock();                                            
                        ret = am65_cpsw_nuss_ndo_slave_open(ndev);    

Is there another path? Or perhaps there's nothing to restore 
if all netdevs are down?

> I have a question here. How should ageable entries be treated in this case?

Ah, no idea :) Let's me add experts to To:

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ