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: <CAMRc=MdbgeJOMoHDm_z04ko1pdKed06GP4=M+VsPaD3YOEvs6Q@mail.gmail.com>
Date: Wed, 19 Nov 2025 15:30:46 +0100
From: Bartosz Golaszewski <brgl@...ev.pl>
To: Andy Shevchenko <andy.shevchenko@...il.com>
Cc: Charles Keepax <ckeepax@...nsource.cirrus.com>, 
	Andy Shevchenko <andriy.shevchenko@...ux.intel.com>, David Rhodes <david.rhodes@...rus.com>, 
	Richard Fitzgerald <rf@...nsource.cirrus.com>, Lee Jones <lee@...nel.org>, 
	Mark Brown <broonie@...nel.org>, Philipp Zabel <p.zabel@...gutronix.de>, 
	Linus Walleij <linus.walleij@...aro.org>, Maciej Strozek <mstrozek@...nsource.cirrus.com>, 
	Andy Shevchenko <andy@...nel.org>, linux-sound@...r.kernel.org, 
	patches@...nsource.cirrus.com, linux-kernel@...r.kernel.org, 
	linux-spi@...r.kernel.org, 
	Bartosz Golaszewski <bartosz.golaszewski@...aro.org>
Subject: Re: [PATCH RFT/RFC] mfd: cs42l43: setup true links with software nodes

On Wed, Nov 19, 2025 at 3:24 PM Andy Shevchenko
<andy.shevchenko@...il.com> wrote:
>
> > >
> > > My idea was to mark the fwnode with __private and fix the (ab)users,
> > > should not be so many. Can somebody mock up a coccinelle script to
> > > find all dereferences of fwnode from struct device?
> >
> > I think you're underestimating the level of complexity. What about the
> > concept of dev_fwnode()? It literally makes no sense if we switch to a
> > list of fwnodes.
>
> Why not? It will return the pointer to the primary node. You can look
> for example how the list of the DMA descriptors is done in
> drivers/dma/dw/core.c. Not the best solution, but gives you an idea of
> how it may look.

What even is a primary node though? You can have auxiliary devices
without an ACPI or OF node. Only with software nodes. Which one is the
primary? The first one we add?

>
> > For it to make sense we'd have to have a kind of "dynamic" firmware
> > node attached to a device which we'd fill with an aggregation of all
> > properties from firmware nodes in the list.
>
> "Dynamic" is just a node in the list. The only potential problem here
> is prioritisation. Should we add to the head, tail or insert? But
> converting current approach will be straightforward.
>

What I have in my mind is not another firmware node in the list in
struct device but rather a new firmware node implementation, that
would be assigned to the device via a dedicated pointer and would be
filled with a logical OR of properties from other firmware nodes added
to the list. Then dev_fwnode() would return this rather than any one
of the firmware nodes from the list. Think of it as the "master
fwnode" of a struct device.

Bart

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ