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] [day] [month] [year] [list]
Date: Thu, 15 Feb 2024 13:57:39 -0800
From: Stephen Boyd <sboyd@...nel.org>
To: Rob Herring <robh+dt@...nel.org>
Cc: Geert Uytterhoeven <geert@...ux-m68k.org>, David Gow <davidgow@...gle.com>, linux-kernel@...r.kernel.org, patches@...ts.linux.dev, linux-um@...ts.infradead.org, linux-arm-kernel@...ts.infradead.org, kunit-dev@...glegroups.com, linux-kselftest@...r.kernel.org, devicetree@...r.kernel.org, Frank Rowand <frowand.list@...il.com>, Brendan Higgins <brendan.higgins@...ux.dev>
Subject: Re: [PATCH v3 7/7] of: Add KUnit test to confirm DTB is loaded

Quoting Rob Herring (2024-02-13 09:52:00)
> On Fri, Feb 9, 2024 at 8:59 PM Stephen Boyd <sboyd@...nel.org> wrote:
> >
> > ---8<---
> > diff --git a/init/main.c b/init/main.c
> > index e24b0780fdff..02f5cf8be6c1 100644
> > --- a/init/main.c
> > +++ b/init/main.c
> > @@ -97,6 +97,8 @@
> >  #include <linux/jump_label.h>
> >  #include <linux/kcsan.h>
> >  #include <linux/init_syscalls.h>
> > +#include <linux/of.h>
> > +#include <linux/of_fdt.h>
> >  #include <linux/stackdepot.h>
> >  #include <linux/randomize_kstack.h>
> >  #include <net/net_namespace.h>
> > @@ -895,6 +897,8 @@ void start_kernel(void)
> >         pr_notice("%s", linux_banner);
> >         early_security_init();
> >         setup_arch(&command_line);
> > +       if (!of_root)
> 
> of_root is another thing I'd like to remove direct access to. That
> check could be inside unflatten_device_tree().

Ok.

> 
> > +               unflatten_device_tree();
> 
> That's back to what Frank had essentially and I wanted to avoid.

Alright, fair enough.

> 
> I think I'd just disable the tests on the above arches and let them
> opt-in. I could be convinced otherwise though.
> 

Kunit folks would prefer to skip tests when dependencies aren't
satisfied. The OF_UNITTEST config already depends on !SPARC so perhaps
it's simplest to have tests skip if OF_EARLY_FLATREE=n. Then
OF_EARLY_FLATREE can be def_bool OF && !(SPARC || M68K || other arches).
The OF_UNITTEST config can depend on OF_EARLY_FLATREE instead of select
it then. This way new supporting architectures can remove themselves
from the def_bool line when they start calling unflatten_device_tree().

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ