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]
Date:	Mon, 11 Oct 2010 09:54:20 +0200
From:	Oskar Schirmer <oskar@...utronix.de>
To:	David Miller <davem@...emloft.net>
Cc:	oskar@...utronix.de, netdev@...r.kernel.org, dan@...eddedalley.com,
	bigeasy@...utronix.de, hjk@...utronix.de, gerg@...inux.org,
	bhutchings@...arflare.com
Subject: Re: [PATCH] net/fec: carrier off initially to avoid root mount failure

On Sun, Oct 10, 2010 at 21:19:56 -0700, David Miller wrote:
> From: Oskar Schirmer <oskar@...utronix.de>
> Date: Thu,  7 Oct 2010 14:30:30 +0200
> 
> > with hardware slow in negotiation, the system did freeze
> > while trying to mount root on nfs at boot time.
> > 
> > the link state has not been initialised so network stack
> > tried to start transmission right away. this caused instant
> > retries, as the driver solely stated business upon link down,
> > rendering the system unusable.
> > 
> > notify carrier off initially to prevent transmission until
> > phylib will report link up.
> > 
> > Signed-off-by: Oskar Schirmer <oskar@...utronix.de>
> 
> I did some more investigation into this situation, and for now I'm
> going to apply your patch.  It is correct, and it also matches what
> the only other seemingly correct driver I could find using phylib does
> (gianfar) :-) Actually, although I didn't check, bi-modal drivers
> (those that only use phylib for some phy types) like tg3 probably do
> the right thing here too.
> 
> Longer term I think the right thing to do might be:
> 
> 1) Create some notion of "network device has managed carrier"
> 
>    This could simply be a flag bit in the netdev or netdev_ops,
>    or some other kind of attribute.
> 
> 2) Managed carrier devices start with netif_carrier_off(), otherwise
>    the device starts with netif_carrier_on().

This last conditional (managed vs otherwise) would be implicit
with a null PHY driver as Ben Hutchings proposes it to Greg Ungerers
"allow FEC driver to not have attached PHY", 2010/10/07,
with the null PHY simply switching to netif_carrier_on right after
machine start.

Otherwise my patch would need another #ifdef to live in
peace with Gregs patch.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ