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-next>] [day] [month] [year] [list]
Message-Id: <20201219222140.4161646-1-roland@kernel.org>
Date:   Sat, 19 Dec 2020 14:21:40 -0800
From:   Roland Dreier <roland@...nel.org>
To:     Oliver Neukum <oliver@...kum.org>
Cc:     netdev@...r.kernel.org, linux-usb@...r.kernel.org
Subject: Re: cdc_ncm kernel log spam with trendnet 2.5G USB adapter

(Apologies, trying one more time with a better mailer)

Sorry it took so long, but I finally got a chance to test the patches.  They
seem to work well, but they only get rid of the downlink / uplink speed spam -
I still get the following filling my kernel log with a patched kernel:

  [   29.830383] cdc_ncm 2-2:2.0 enp0s2u2c2: network connection: connected
  [   29.894359] cdc_ncm 2-2:2.0 enp0s2u2c2: network connection: connected
  [   29.958601] cdc_ncm 2-2:2.0 enp0s2u2c2: network connection: connected
  [   30.022473] cdc_ncm 2-2:2.0 enp0s2u2c2: network connection: connected
  [   30.086548] cdc_ncm 2-2:2.0 enp0s2u2c2: network connection: connected

with the below patch on top of your 3, then my kernel log is clean.

Please apply your patches plus my patch, and feel free to add

Tested-by: Roland Dreier <roland@...nel.org>

to the other three.

--- 8< ---------- 8< ---

Subject: [PATCH] CDC-NCM: remove "connected" log message

The cdc_ncm driver passes network connection notifications up to
usbnet_link_change(), which is the right place for any logging.
Remove the netdev_info() duplicating this from the driver itself.

This stops devices such as my "TRENDnet USB 10/100/1G/2.5G LAN"
(ID 20f4:e02b) adapter from spamming the kernel log with

    cdc_ncm 2-2:2.0 enp0s2u2c2: network connection: connected

messages every 60 msec or so.

Signed-off-by: Roland Dreier <roland@...nel.org>
---
 drivers/net/usb/cdc_ncm.c | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/drivers/net/usb/cdc_ncm.c b/drivers/net/usb/cdc_ncm.c
index a45fcc44facf..50d3a4e6d445 100644
--- a/drivers/net/usb/cdc_ncm.c
+++ b/drivers/net/usb/cdc_ncm.c
@@ -1850,9 +1850,6 @@ static void cdc_ncm_status(struct usbnet *dev, struct urb *urb)
 		 * USB_CDC_NOTIFY_NETWORK_CONNECTION notification shall be
 		 * sent by device after USB_CDC_NOTIFY_SPEED_CHANGE.
 		 */
-		netif_info(dev, link, dev->net,
-			   "network connection: %sconnected\n",
-			   !!event->wValue ? "" : "dis");
 		usbnet_link_change(dev, !!event->wValue, 0);
 		break;
 
-- 
2.29.2

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ