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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1627e8c1-e9f9-438e-9ca2-6a931c814e70@lunn.ch>
Date: Wed, 18 Dec 2024 18:13:08 +0100
From: Andrew Lunn <andrew@...n.ch>
To: Dimitri Fedrau <dima.fedrau@...il.com>
Cc: Heiner Kallweit <hkallweit1@...il.com>,
	Russell King <linux@...linux.org.uk>,
	"David S. Miller" <davem@...emloft.net>,
	Eric Dumazet <edumazet@...gle.com>,
	Jakub Kicinski <kuba@...nel.org>, Paolo Abeni <pabeni@...hat.com>,
	netdev@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH net-next] net: phy: dp83822: Add support for PHY LEDs on
 DP83822

> > index is taken direct from DT. Somebody might have:
> > 
> >            leds {
> >                 #address-cells = <1>;
> >                 #size-cells = <0>;
> > 
> >                 led@42 {
> >                     reg = <42>;
> >                     color = <LED_COLOR_ID_WHITE>;
> >                     function = LED_FUNCTION_LAN;
> >                     default-state = "keep";
> >                 };
> >             };
> > 
> > so you should not assume if it is not 0, 1 or 2, then it must be
> > 3. Please always validate index.
> >
> dp83822_of_init_leds does a check that index is 0, 1, 2 or 3. Is this
> sufficient ? Otherwise I would validate the index.

Ah, i missed that. I'm just used to the usual pattern that every PHY
driver has a check for the MAX LEDs in their callback.

	Andrew

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ