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  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:   Mon, 11 May 2020 23:14:11 +0000
From:   "Brown, Aaron F" <aaron.f.brown@...el.com>
To:     Kai-Heng Feng <kai.heng.feng@...onical.com>,
        "Kirsher, Jeffrey T" <jeffrey.t.kirsher@...el.com>
CC:     "David S. Miller" <davem@...emloft.net>,
        "moderated list:INTEL ETHERNET DRIVERS" 
        <intel-wired-lan@...ts.osuosl.org>,
        "open list:NETWORKING DRIVERS" <netdev@...r.kernel.org>,
        open list <linux-kernel@...r.kernel.org>
Subject: RE: [PATCH v2] igb: Report speed and duplex as unknown when device is
 runtime suspended

> From: Kai-Heng Feng <kai.heng.feng@...onical.com>
> Sent: Monday, May 4, 2020 9:02 PM
> To: Kirsher, Jeffrey T <jeffrey.t.kirsher@...el.com>
> Cc: Kai-Heng Feng <kai.heng.feng@...onical.com>; Brown, Aaron F
> <aaron.f.brown@...el.com>; David S. Miller <davem@...emloft.net>;
> moderated list:INTEL ETHERNET DRIVERS <intel-wired-lan@...ts.osuosl.org>;
> open list:NETWORKING DRIVERS <netdev@...r.kernel.org>; open list <linux-
> kernel@...r.kernel.org>
> Subject: [PATCH v2] igb: Report speed and duplex as unknown when device is
> runtime suspended
> 
> igb device gets runtime suspended when there's no link partner. We can't
> get correct speed under that state:
> $ cat /sys/class/net/enp3s0/speed
> 1000
> 
> In addition to that, an error can also be spotted in dmesg:
> [  385.991957] igb 0000:03:00.0 enp3s0: PCIe link lost
> 
> Since device can only be runtime suspended when there's no link partner,
> we can skip reading register and let the following logic set speed and
> duplex with correct status.
> 
> The more generic approach will be wrap get_link_ksettings() with begin()
> and complete() callbacks. However, for this particular issue, begin()
> calls igb_runtime_resume() , which tries to rtnl_lock() while the lock
> is already hold by upper ethtool layer.
> 
> So let's take this approach until the igb_runtime_resume() no longer
> needs to hold rtnl_lock.
> 
> Cc: Jeff Kirsher <jeffrey.t.kirsher@...el.com>
> Cc: Aaron Brown <aaron.f.brown@...el.com>
> Suggested-by: Alexander Duyck <alexander.duyck@...il.com>
> Signed-off-by: Kai-Heng Feng <kai.heng.feng@...onical.com>
> ---
> v2:
>  - Don't early return the routine so other info can be set.
> 
>  drivers/net/ethernet/intel/igb/igb_ethtool.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
Tested-by: Aaron Brown <aaron.f.brown@...el.com>

Powered by blists - more mailing lists