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, 16 May 2024 17:33:31 -0700
From: Stephen Boyd <sboyd@...nel.org>
To: Rob Herring <robh@...nel.org>
Cc: David Gow <davidgow@...gle.com>, Michael Turquette <mturquette@...libre.com>, linux-kernel@...r.kernel.org, linux-clk@...r.kernel.org, patches@...ts.linux.dev, kunit-dev@...glegroups.com, linux-kselftest@...r.kernel.org, devicetree@...r.kernel.org, Brendan Higgins <brendan.higgins@...ux.dev>, Rae Moar <rmoar@...gle.com>, Greg Kroah-Hartman <gregkh@...uxfoundation.org>, Rafael J . Wysocki <rafael@...nel.org>, Saravana Kannan <saravanak@...gle.com>, Daniel Latypov <dlatypov@...gle.com>, Christian Marangi <ansuelsmth@...il.com>, Krzysztof Kozlowski <krzysztof.kozlowski+dt@...aro.org>, Conor Dooley <conor+dt@...nel.org>, Maxime Ripard <maxime@...no.tech>
Subject: Re: [PATCH v4 00/10] clk: Add kunit tests for fixed rate and parent data

Quoting Rob Herring (2024-05-15 15:08:47)
> On Wed, May 15, 2024 at 4:15 PM Stephen Boyd <sboyd@...nel.org> wrote:
> > diff --git a/drivers/of/platform.c b/drivers/of/platform.c
> > index 389d4ea6bfc1..acecefcfdba7 100644
> > --- a/drivers/of/platform.c
> > +++ b/drivers/of/platform.c
> > @@ -421,6 +421,7 @@ int of_platform_bus_probe(struct device_node *root,
> >         if (of_match_node(matches, root)) {
> >                 rc = of_platform_bus_create(root, matches, NULL, parent, false);
> >         } else for_each_child_of_node(root, child) {
> > +               of_node_set_flag(root, OF_POPULATED_BUS);
> 
> No, the same spot as of_platform_populate has it. I guess this would
> be the same, but no reason to do this in the for_each_child_of_node
> loop...

Ok. I'm not intending to send this patch.

> 
> >                 if (!of_match_node(matches, child))
> >                         continue;
> >                 rc = of_platform_bus_create(child, matches, NULL, parent, false);
> >
> >
> > This doesn't work though. I see that prom_init() is called, which
> > constructs a DTB and flattens it to be unflattened by
> > unflatten_device_tree(). The powerpc machine type used by qemu is
> > PLATFORM_PSERIES_LPAR. It looks like it never calls
> > of_platform_bus_probe() from the pseries platform code.
> 
> Huh. Maybe pseries doesn't have any platform devices?

Looks like it.

> 
> Ideally, we'd still do it in of_platform_default_populate_init(), but
> if you look at the history, you'll see that broke some PPC boards
> (damn initcall ordering).
> 
> > What about skipping the OF_POPULATED_BUS check, or skipping the check
> > when the parent is the root node? This is the if condition that's
> > giving the headache.
> 
> I don't think we should just remove it, but a root node check seems fine.
> 

Alright. I've added a check to see if the root node is the parent to
allow it. That works well enough, so I'll send that in v5.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ