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_JsqJSFnVG6+CfcbgVFGo3EyiSTt-et0NSW2qWjei+zXURcg@mail.gmail.com>
Date:   Tue, 28 Nov 2023 16:25:30 -0600
From:   Rob Herring <robh@...nel.org>
To:     Masahiro Yamada <masahiroy@...nel.org>
Cc:     Nathan Chancellor <nathan@...nel.org>,
        Nick Desaulniers <ndesaulniers@...gle.com>,
        Nicolas Schier <nicolas@...sle.eu>,
        Krzysztof Kozlowski <krzysztof.kozlowski+dt@...aro.org>,
        Conor Dooley <conor+dt@...nel.org>,
        Paul Walmsley <paul.walmsley@...ive.com>,
        Palmer Dabbelt <palmer@...belt.com>,
        Albert Ou <aou@...s.berkeley.edu>,
        Krzysztof Kozlowski <krzysztof.kozlowski@...aro.org>,
        Alim Akhtar <alim.akhtar@...sung.com>,
        Conor Dooley <conor@...nel.org>, linux-kbuild@...r.kernel.org,
        linux-kernel@...r.kernel.org, devicetree@...r.kernel.org,
        linux-riscv@...ts.infradead.org,
        linux-arm-kernel@...ts.infradead.org,
        linux-samsung-soc@...r.kernel.org
Subject: Re: [PATCH v2 0/4] kbuild: Per arch/platform dtc warning levels

On Tue, Nov 28, 2023 at 6:03 AM Masahiro Yamada <masahiroy@...nel.org> wrote:
>
> On Mon, Nov 27, 2023 at 11:03 PM Rob Herring <robh@...nel.org> wrote:
> >
> > On Thu, Nov 23, 2023 at 1:39 AM Masahiro Yamada <masahiroy@...nel.org> wrote:
> > >
> > > On Thu, Nov 23, 2023 at 7:12 AM Rob Herring <robh@...nel.org> wrote:
> > > >
> > > > This series adds support to set the dtc extra warning level on a per
> > > > arch or per platform (directory really) basis.
> > > >
> > > > The first version of this was just a simple per directory override for
> > > > Samsung platforms, but Conor asked to be able to do this for all of
> > > > riscv.
> > > >
> > > > For merging, either I can take the whole thing or the riscv and samsung
> > > > patches can go via their normal trees. The added variable will have no
> > > > effect until merged with patch 2.
> > > >
> > > > v1:
> > > >  - https://lore.kernel.org/all/20231116211739.3228239-1-robh@kernel.org/
> > > >
> > > > Signed-off-by: Rob Herring <robh@...nel.org>
> > > > ---
> > >
> > >
> > > There were some attempts in the past to enable W=1 in particular subsystems,
> > > so here is a similar comment.
> > >
> > > Adding a new warning flag to W=1 is always safe without doing any compile test.
> > >
> > > With this series, it would not be true any more because a new warning in W=1
> > > would potentially break riscv/samsung platforms.
> >
> > The difference here is the people potentially adding warnings are also
> > the ones ensuring no warnings.
> >
> > > Linus requires a clean build (i.e. zero warning) when W= option is not given.
> >
> > Linus doesn't build any of this AFAICT. We are not always warning free
> > for W=0 with dtbs.
>
>
>
> Does it mean, you can enable all warnings by default?

No, Linus might not care, but others (me) do. The whole point of not
allowing warnings is the same. Get to zero warnings so any new
warnings stand out. We now have some subset of platforms which are
warning free and want warnings enabled by default to keep them that
way. How do you suggest we do that?

I understand your point on W=1 in general, but I think it just doesn't
apply in this case. In general,
someone may be testing a new compiler and there's some new warning to
enable, so they add it to W=1. They are working independently of any
subsystem (and Linus) and introducing new warnings would be a burden
to fix and a problem to leave. For DT, it is a bit different as adding
new warnings, updating dtc version, and selecting warnings to enable
are pretty much all done together. Plus, schema warnings have pretty
much superseded dtc warnings. If we do add new warnings which can't be
fixed up front, then we could still only enable the warning for W=1
from the command line. Something like this on top of this series:

diff --git a/scripts/Makefile.lib b/scripts/Makefile.lib
index 53a74e53e0ca..41307c6e1fee 100644
--- a/scripts/Makefile.lib
+++ b/scripts/Makefile.lib
@@ -341,6 +341,10 @@ quiet_cmd_gzip = GZIP    $@
 # ---------------------------------------------------------------------------
 DTC ?= $(objtree)/scripts/dtc/dtc

+ifeq ($(findstring 1,$(KBUILD_EXTRA_WARN)),)
+DTC_FLAGS += -Wno-some_new_warning_we_need_off_globally
+endif
+
 KBUILD_EXTRA_WARN_DTC += $(KBUILD_EXTRA_WARN)

 # Disable noisy checks by default

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ