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, 25 Apr 2022 08:50:26 +0200
From:   Arnd Bergmann <arnd@...db.de>
To:     Vincent MAILHOL <mailhol.vincent@...adoo.fr>
Cc:     Nathan Chancellor <nathan@...nel.org>,
        Nick Desaulniers <ndesaulniers@...gle.com>,
        Tom Rix <trix@...hat.com>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
        clang-built-linux <llvm@...ts.linux.dev>,
        Arnd Bergmann <arnd@...db.de>,
        Linux API <linux-api@...r.kernel.org>
Subject: Re: [PATCH] checksyscalls: ignore -Wunused-macros

On Mon, Apr 25, 2022 at 8:17 AM Vincent MAILHOL
<mailhol.vincent@...adoo.fr> wrote:
> On Mon. 25 Apr 2022 at 07:17, Nathan Chancellor <nathan@...nel.org> wrote:
> > Hi Vincent,
> >
> > On Sat, Apr 23, 2022 at 12:17:25AM +0900, Vincent Mailhol wrote:
> > > The macros defined in this file are for testing only and are purposely
> > > not used. When compiled with W=2, both gcc and clang yield some
> > > -Wunused-macros warnings. Ignore them.
> > >
> > > Signed-off-by: Vincent Mailhol <mailhol.vincent@...adoo.fr>
> >
> > The change itself looks fine but a couple of comments:
> >
> > 1. Nick and I do not pick up patches, we rely on others to do so.
> >    Additionally, this is not really something within our domain, despite
> >    what get_maintainer.pl might say. This change should be sent to
> >    either
> >
> >    Masahiro Yamada <masahiroy@...nel.org>
> >    linux-kbuild@...r.kernel.org
> >
> >    or
> >
> >    Andrew Morton <akpm@...ux-foundation.org>
> >
> >    so that it can be applied by one of them.
>
> Ack. As you pointed out, I indeed just followed get_maintainer.pl.
> I will resend a v2 to the people you pointed out (and exclude you).
>
> > 2. I am not sure that silencing warnings from W=2 is that useful, as
> >    they are unlikely to be real issues. Not to discourage you by any
> >    means but it might be more useful to focus on cleaning up warnings
> >    from W=1 and getting those promoted to regular build warnings.
>
> Normally I agree, but there is one reason to fix this W=2: this
> warning appears when building other files.
>
> Example:
> | $ make W=2 drivers/net/dummy.o
> |   CALL    scripts/checksyscalls.sh
> | <stdin>:21: warning: macro "__IGNORE_stat64" is not used [-Wunused-macros]
> | <stdin>:22: warning: macro "__IGNORE_lstat64" is not used [-Wunused-macros]
> | <stdin>:75: warning: macro "__IGNORE_llseek" is not used [-Wunused-macros]
> | <stdin>:159: warning: macro "__IGNORE_madvise1" is not used [-Wunused-macros]
> (rest of the output redacted).
>
> When I run W=2, I want to only see the warnings of the file I am
> working on. So I find it useful to fix the W=2 warnings which
> show up when building other files to not get spammed by
> irrelevant issues and to simplify the triage.
>
> My initial message lacked the rationale. I will add additional
> explanations in the v2 of this patch.

I agree this is worth fixing if we want to make W=2 have any meaning at all.

Your approach is probably fine. We could try to improve this by comparing
against the list from include/uapi/asm-generic/unistd.h instead of the i386
list. I suppose that would involve rewriting the script into a simpler one,
but I'm not sure if anyone has an interest in working on this.

       Arnd

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ