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:   Sun, 20 Sep 2020 16:53:51 +0200
From:   Andrew Lunn <andrew@...n.ch>
To:     Masahiro Yamada <masahiroy@...nel.org>
Cc:     netdev <netdev@...r.kernel.org>,
        David Miller <davem@...emloft.net>,
        Jakub Kicinski <kuba@...nel.org>,
        Michal Marek <michal.lkml@...kovi.net>,
        Linux Kbuild mailing list <linux-kbuild@...r.kernel.org>,
        clang-built-linux <clang-built-linux@...glegroups.com>
Subject: Re: [PATCH RFC/RFT 0/2] W=1 by default for Ethernet PHY subsystem

On Sun, Sep 20, 2020 at 12:42:51PM +0900, Masahiro Yamada wrote:
> On Sun, Sep 20, 2020 at 4:03 AM Andrew Lunn <andrew@...n.ch> wrote:
> >
> > There is a movement to make the code base compile clean with W=1. Some
> > subsystems are already clean. In order to keep them clean, we need
> > developers to build new code with W=1 by default in these subsystems.
> >
> > This patchset refactors the core Makefile warning code to allow the
> > additional warnings W=1 adds available to any Makefile. The Ethernet
> > PHY subsystem Makefiles then make use of this to make W=1 the default
> > for this subsystem.
> >
> > RFT since i've only tested with x86 and arm with a modern gcc. Is the
> > code really clean for older compilers? For clang?
> 
> 
> I appreciate your efforts for keeping your subsystems
> clean for W=1 builds, and I hope this work will be
> extended towards upper directory level,
> drivers/net/phy -> drivers/net -> drivers/.
 
It definitely is.

drivers/net:
https://www.spinics.net/lists/netdev/msg683687.html

drivers/spi
https://www.spinics.net/lists/linux-spi/msg23280.html

drivers/mfd
https://www.mail-archive.com/linux-kernel@vger.kernel.org/msg2211644.html

etc.

> So, another idea might be hard-coding extra warnings
> like drivers/gpu/drm/i915/Makefile.
> 
> For example, your subsystem already achieved
> -Wmissing-declarations free.
> 
> You can add
> 
>    subdir-ccflags-y += -Wmissing-declarations
> 
> to drivers/net/phy/Makefile.
> 
> Once you fix all net drivers, you can move it to
> the parent, drivers/net/Makefile.
> 
> Then, drivers/Makefile next, and if it reaches
> the top directory level, we can move it to W=0.

Do you think this will scale?

Lets just assume we do this at driver/ level. We have 141
subdirectories in driver/ . So we will end up with 141

subdir-ccflags-y += 

lines which we need to maintain.

Given the current cleanup effort, many are going to be identical to
todays W=1.

How do we maintain those 141 lines when it is time to add a new flag
to W=1?

How often are new W=1 flags added? My patch exported
KBUILD_CFLAGS_WARN1. How about instead we export
KBUILD_CFLAGS_WARN1_20200920. A subsystem can then sign up to being
W=1 clean as for the 20200920 definition of W=1.

If you want to add a new warning

KBUILD_CFLAGS_WARN1_20201031 := KBUILD_CFLAGS_WARN1_20200920 + "-Wghosts"

W=1 will always use the latest. You then build with W=1, maybe by
throwing it at 0-day, find which subsystems are still clean, and
update their subdir-ccflags-y += line with the new timestamp?

This should help with scaling, in that a subsystem is not dealing with
a list of warnings, just a symbol that represents the warnings from a
particular date?

Or maybe others have better ideas?

   Andrew

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ