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]
Message-ID: <CAL_JsqLbKSsnNrvo=NWAUbsbd8Yy8v3gbMAu6e+WMofJv0Pcvg@mail.gmail.com>
Date: Tue, 8 Apr 2025 07:55:29 -0500
From: Rob Herring <robh@...nel.org>
To: Sakari Ailus <sakari.ailus@...ux.intel.com>
Cc: Sean Anderson <sean.anderson@...ux.dev>, Saravana Kannan <saravanak@...gle.com>, 
	devicetree@...r.kernel.org, Greg Kroah-Hartman <gregkh@...uxfoundation.org>, 
	"Rafael J . Wysocki" <rafael@...nel.org>, Andy Shevchenko <andriy.shevchenko@...ux.intel.com>, 
	Len Brown <lenb@...nel.org>, Heikki Krogerus <heikki.krogerus@...ux.intel.com>, 
	Daniel Scally <djrscally@...il.com>, linux-kernel@...r.kernel.org, 
	Danilo Krummrich <dakr@...nel.org>, linux-acpi@...r.kernel.org
Subject: Re: [PATCH 1/2] device property: Add optional nargs_prop for get_reference_args

On Tue, Apr 8, 2025 at 4:14 AM Sakari Ailus
<sakari.ailus@...ux.intel.com> wrote:
>
> Hi Sean,
>
> On Mon, Apr 07, 2025 at 06:37:13PM -0400, Sean Anderson wrote:
> > get_reference_args does not permit falling back to nargs when nargs_prop
> > is missing. This makes it difficult to support older devicetrees where
> > nargs_prop may not be present. Add support for this by converting nargs
> > to a signed value. Where before nargs was ignored if nargs_prop was
> > passed, now nargs is only ignored if it is strictly negative. When it is
> > positive, nargs represents the fallback cells to use if nargs_prop is
> > absent.
>
> If you don't know either the argument count or have a property that tells
> it, there's no way to differentiate phandles from arguments. I'd say such
> DTS are broken. Where do they exist?

#msi-cells for one is optional because we added it after the initial
bindings and missing means 0.

> At the very least this needs to be documented as a workaround and moved to
> the OF framework. I wouldn't add such a workaround to swnodes either, the
> bugs should be fixed instead.

The DT API supports this already.

Rob

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ