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:   Mon, 24 May 2021 12:07:24 -0500
From:   Rob Herring <robh@...nel.org>
To:     Masahiro Yamada <masahiroy@...nel.org>
Cc:     Dmitry Baryshkov <dmitry.baryshkov@...aro.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        Linux Kbuild mailing list <linux-kbuild@...r.kernel.org>,
        Michal Marek <michal.lkml@...kovi.net>,
        Bjorn Andersson <bjorn.andersson@...aro.org>
Subject: Re: [PATCH] kbuild: allow checking single device tree file

On Sat, May 22, 2021 at 1:48 AM Masahiro Yamada <masahiroy@...nel.org> wrote:
>
> On Wed, May 19, 2021 at 10:43 PM Rob Herring <robh@...nel.org> wrote:
> >
> > On Thu, May 13, 2021 at 10:18 AM Dmitry Baryshkov
> > <dmitry.baryshkov@...aro.org> wrote:
> > >
> > > Add support for testing single device tree file by running
> > > 'make tree.dt.yaml', e.g. 'make ARCH=arm64 qcom/qrb5165-rb5.dt.yaml'.
> > > This looks useful for checking idividual changes to dts files.
> >
> > typo
> >
> > I'd rather not expose .*.dt.yaml as I want to make checking not
> > optional and I have some plans of integrating the schema checks into
> > dtc which would eliminate .dt.yaml files. Instead, I think %.dtb
> > targets should run the checks always.
> >
> > >
> > > Cc: Rob Herring <robh@...nel.org>
> > > Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@...aro.org>
> > > ---
> > >  Makefile | 4 ++++
> > >  1 file changed, 4 insertions(+)
> > >
> > > diff --git a/Makefile b/Makefile
> > > index 53d09c414635..b36a3d48eb68 100644
> > > --- a/Makefile
> > > +++ b/Makefile
> > > @@ -1383,6 +1383,10 @@ ifneq ($(dtstree),)
> > >  %.dtbo: include/config/kernel.release scripts_dtc
> > >         $(Q)$(MAKE) $(build)=$(dtstree) $(dtstree)/$@
> > >
> > > +%.dt.yaml: include/config/kernel.release scripts_dtc
> > > +       $(Q)$(MAKE) $(build)=Documentation/devicetree/bindings Documentation/devicetree/bindings/processed-schema.json
> >
> > I don't think we should expose this detail (processed-schema.json) to
> > the top-level makefile. This will be built if 'dt_binding_check' is a
> > dependency with CHECK_DTBS=y set.
> >
> > > +       $(Q)$(MAKE) $(build)=$(dtstree) $(dtstree)/$@ CHECK_DTBS=y
> >
> > CHECK_DTBS here doesn't work. It has to be exported.
> >
> > So here's my modified patch (%.dtbo should probably be included too,
> > but I'm not yet sure how well the schema checks will work on them):
> >
> > 8<---------------------------------------------------------
> > diff --git a/Makefile b/Makefile
> > index 53d09c414635..a1e246956d65 100644
> > --- a/Makefile
> > +++ b/Makefile
> > @@ -1377,12 +1377,18 @@ endif
> >
> >  ifneq ($(dtstree),)
> >
> > -%.dtb: include/config/kernel.release scripts_dtc
> > +%.dtb: %.dt.yaml
> >         $(Q)$(MAKE) $(build)=$(dtstree) $(dtstree)/$@
> >
> >  %.dtbo: include/config/kernel.release scripts_dtc
> >         $(Q)$(MAKE) $(build)=$(dtstree) $(dtstree)/$@
> >
> > +ifneq ($(filter %.dtb, $(MAKECMDGOALS)),)
> > +export CHECK_DTBS=y
> > +endif
> > +%.dt.yaml: dt_binding_check include/config/kernel.release scripts_dtc
> > +       $(Q)$(MAKE) $(build)=$(dtstree) $(dtstree)/$@
> > +
>
> I do not understand how this will work.
>
> 'make foo.dtb' will also create foo.dt.yaml
> (that is, schema check is always run) ?

Yes, that is my intent. As I mentioned above, I have some plans to
integrate the schema checks into dtc which would eliminate .dt.yaml
files. So I don't really want to add them as a user make target if we
might remove it. Also, at some point, running the schema checks
shouldn't be optional. We can't do that yet for 'dtbs' as there's a
bunch of warnings. But for %.dtb targets, I don't think getting the
warnings is a problem.

Rob

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ