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: Thu, 25 Jan 2024 12:53:38 +0000
From: Conor Dooley <conor.dooley@...rochip.com>
To: Andrew Lunn <andrew@...n.ch>
CC: Conor Dooley <conor@...nel.org>, Philippe Schenker <dev@...henker.ch>,
	<netdev@...r.kernel.org>, Paolo Abeni <pabeni@...hat.com>, Conor Dooley
	<conor+dt@...nel.org>, Woojung Huh <woojung.huh@...rochip.com>, "Vladimir
 Oltean" <olteanv@...il.com>, <linux-kernel@...r.kernel.org>,
	<UNGLinuxDriver@...rochip.com>, Marek Vasut <marex@...x.de>, Florian Fainelli
	<f.fainelli@...il.com>, <devicetree@...r.kernel.org>, Eric Dumazet
	<edumazet@...gle.com>, "David S . Miller" <davem@...emloft.net>, "Krzysztof
 Kozlowski" <krzysztof.kozlowski+dt@...aro.org>, Jakub Kicinski
	<kuba@...nel.org>, Rob Herring <robh+dt@...nel.org>
Subject: Re: [PATCH net-next v1 1/2] dt-bindings: net: dsa: Add KSZ8567
 switch support

On Wed, Jan 24, 2024 at 07:08:29PM +0100, Andrew Lunn wrote:
> > That sounds counter productive to be honest. Why does the driver not
> > trust that the dt is correct? I saw this recently in some IIO drivers,
> > but it was shot down for this sort of reason.
> 
> DT is software, therefore it contains bugs.
> 
> Say we ignore that the compatible does not match the hardware on the
> board and just accept the DT has a bug in it and keep going.
> 
> That then makes the compatible pointless, and unusable for anything,
> since there are boards out in the wild with incorrect compatibles. If
> we later actually use the compatible for something, it might cause
> regressions for those buggy DT blobs.
> 
> By erroring out then the compatible does not match the hardware avoids
> such bugs.

It also makes fallback compatibles useless, which is what I see as being
counter productive, since you'll have to add support to the driver even
if (other than the id) the change is imperceptible to software.
If you have your reasons why you do not trust the compatibles for these
devices, then it is your prerogative as a driver author to cross check it
and fail if they don't match.

That said, it does not prevent the fallback being accurately described
in the binding itself, which at the end of the day is what I am more
interested it.

> The marvell mv88e6xxx driver takes a different approach. All the
> compatible does is tell the driver where to find the ID
> register. Marvell keeps moving it around, so there are three different
> compatibles for the three different locations. If you use the wrong
> compatible, its not going to find a device is knows about and errors
> out. So this also avoids bugs in the compatible.
> 
>      Andrew

Download attachment "signature.asc" of type "application/pgp-signature" (229 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ