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>] [day] [month] [year] [list]
Message-ID: <CANEJEGuciX5he18HU5B+mAEcTom2MFtAKZfiVHCojvj24mzSAA@mail.gmail.com>
Date:   Tue, 13 Oct 2020 19:14:45 +0000
From:   Grant Grundler <grundler@...gle.com>
To:     nic_swsd <nic_swsd@...ltek.com>, Hayes Wang <hayeswang@...ltek.com>
Cc:     netdev <netdev@...r.kernel.org>,
        Prashant Malani <pmalani@...omium.org>
Subject: cdc-ncm spewing link state

When I connect a "newish" RTL8156 2.5Gbps USB ethernet dongle to any
chromebook running 4.4, 4.14 or local workstation running 5.7.17 I get
the link state spewed on the dmesg at ~30 times per second:
[67541.686970] usb 2-6: new SuperSpeed Gen 1 USB device number 3 using xhci_hcd
[67541.707673] usb 2-6: New USB device found, idVendor=0bda,
idProduct=8156, bcdDevice=30.00
[67541.707678] usb 2-6: New USB device strings: Mfr=1, Product=2, SerialNumber=6
[67541.707681] usb 2-6: Product: USB 10/100/1G/2.5G LAN
[67541.707684] usb 2-6: Manufacturer: Realtek
[67541.707687] usb 2-6: SerialNumber: 000A91758
[67541.751910] cdc_ncm 2-6:2.0: MAC-Address: 00:c0:ca:a9:17:58
[67541.751912] cdc_ncm 2-6:2.0: setting rx_max = 16384
[67541.751978] cdc_ncm 2-6:2.0: setting tx_max = 16384
[67541.752223] cdc_ncm 2-6:2.0 usb0: register 'cdc_ncm' at
usb-0000:00:14.0-6, CDC NCM, 00:c0:ca:a9:17:58
[67541.752507] usbcore: registered new interface driver cdc_ncm
[67541.753929] usbcore: registered new interface driver cdc_wdm
[67541.755147] usbcore: registered new interface driver cdc_mbim
[67541.760965] cdc_ncm 2-6:2.0 enx00c0caa91758: renamed from usb0
[67541.833636] cdc_ncm 2-6:2.0 enx00c0caa91758: network connection: disconnected
[67541.865610] cdc_ncm 2-6:2.0 enx00c0caa91758: network connection: disconnected
...

This works out to roughly 200MB per day or 1 GB per week. Not acceptable.


QUESTION: Is the following change the correct approach to resolve at
least 1/2 the issue?
    Or is this a bug in the Realtek CDC NCM support?

diff --git a/drivers/net/usb/cdc_ncm.c b/drivers/net/usb/cdc_ncm.c
index 16546268d77d7..8258f7463fcf1 100644
--- a/drivers/net/usb/cdc_ncm.c
+++ b/drivers/net/usb/cdc_ncm.c
@@ -1623,8 +1623,7 @@ static void cdc_ncm_status(struct usbnet *dev,
struct urb *urb)

 static const struct driver_info cdc_ncm_info = {
        .description = "CDC NCM",
-       .flags = FLAG_POINTTOPOINT | FLAG_NO_SETINT | FLAG_MULTI_PACKET
-                       | FLAG_LINK_INTR,
+       .flags = FLAG_POINTTOPOINT | FLAG_NO_SETINT | FLAG_MULTI_PACKET,
        .bind = cdc_ncm_bind,
        .unbind = cdc_ncm_unbind,
        .manage_power = usbnet_manage_power,

Removing FLAG_LINK_INTR eliminated the "no link" spew but not the
"uplink" spew output from cdc_ncm_speed_change():
[   70.919608] usb 2-2: new SuperSpeed USB device number 3 using xhci_hcd
[   70.931102] usb 2-2: New USB device found, idVendor=0bda,
idProduct=8156, bcdDevice=30.00
[   70.931107] usb 2-2: New USB device strings: Mfr=1, Product=2, SerialNumber=6
[   70.931108] usb 2-2: Product: USB 10/100/1G/2.5G LAN
[   70.931110] usb 2-2: Manufacturer: Realtek
[   70.931112] usb 2-2: SerialNumber: 000000001
[   71.013028] cdc_ncm 2-2:2.0: MAC-Address: a0:ce:c8:c8:13:60
[   71.013033] cdc_ncm 2-2:2.0: setting rx_max = 16384
[   71.013110] cdc_ncm 2-2:2.0: setting tx_max = 16384
[   71.013394] cdc_ncm 2-2:2.0 usb0: register 'cdc_ncm' at
usb-0000:00:14.0-2, CDC NCM, a0:ce:c8:c8:13:60
[   71.014265] usbcore: registered new interface driver cdc_ncm
[   71.018726] usbcore: registered new interface driver cdc_wdm
[   71.019875] usbcore: registered new interface driver cdc_mbim
... (connect ethernet from GigE switch to dongle)
[  133.820200] cdc_ncm 2-2:2.0 usb0: 1000 mbit/s downlink 1000 mbit/s uplink
[  133.884202] cdc_ncm 2-2:2.0 usb0: 1000 mbit/s downlink 1000 mbit/s uplink
[  133.948235] cdc_ncm 2-2:2.0 usb0: 1000 mbit/s downlink 1000 mbit/s uplink
...
[  167.164652] cdc_ncm 2-2:2.0 usb0: 1000 mbit/s downlink 1000 mbit/s uplink
[  167.228824] cdc_ncm 2-2:2.0 usb0: 1000 mbit/s downlink 1000 mbit/s uplink
[  167.292679] cdc_ncm 2-2:2.0 usb0: 1000 mbit/s downlink 1000 mbit/s uplink
[  167.356662] cdc_ncm 2-2:2.0 usb0: 1000 mbit/s downlink 1000 mbit/s uplink
[  173.473869] usb 2-2: USB disconnect, device number 3
[  173.474110] cdc_ncm 2-2:2.0 usb0: unregister 'cdc_ncm'
usb-0000:00:14.0-2, CDC NCM
[  181.171531] PDLOG 2020/10/13 01:55:23.1602554122 P0 SRC 3000mA

Thanks for any help with this.

cheers,
grant

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ