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]
Date:   Thu, 19 Jan 2023 08:44:48 -0800
From:   Breno Leitao <leitao@...ian.org>
To:     leitao@...ian.org, kuba@...nel.org, netdev@...r.kernel.org
Cc:     leit@...com, davem@...emloft.net, edumazet@...gle.com,
        pabeni@...hat.com, sa+renesas@...g-engineering.com,
        linux-kernel@...r.kernel.org,
        Michael van der Westhuizen <rmikey@...a.com>
Subject: [PATCH] netpoll: Remove 4s sleep during carrier detection

This patch proposes to remove the msleep(4s) during netpoll_setup() if
the carrier appears instantly.

Modern NICs do not seem to have this bouncing problem anymore, and this
sleep slows down the machine boot unnecessarily

Reported-by: Michael van der Westhuizen <rmikey@...a.com>
Signed-off-by: Breno Leitao <leitao@...ian.org>
---
 net/core/netpoll.c | 9 ---------
 1 file changed, 9 deletions(-)

diff --git a/net/core/netpoll.c b/net/core/netpoll.c
index 9be762e1d042..6f45aeaf3da0 100644
--- a/net/core/netpoll.c
+++ b/net/core/netpoll.c
@@ -704,15 +704,6 @@ int netpoll_setup(struct netpoll *np)
 			msleep(1);
 		}
 
-		/* If carrier appears to come up instantly, we don't
-		 * trust it and pause so that we don't pump all our
-		 * queued console messages into the bitbucket.
-		 */
-
-		if (time_before(jiffies, atleast)) {
-			np_notice(np, "carrier detect appears untrustworthy, waiting 4 seconds\n");
-			msleep(4000);
-		}
 		rtnl_lock();
 	}
 
-- 
2.30.2

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ