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:   Tue, 11 May 2021 11:23:10 -0700
From:   Nick Desaulniers <ndesaulniers@...gle.com>
To:     Masami Hiramatsu <mhiramat@...nel.org>
Cc:     Arnaldo Carvalho de Melo <acme@...nel.org>,
        Anders Roxell <anders.roxell@...aro.org>,
        Leo Yan <leo.yan@...aro.org>,
        LKML <linux-kernel@...r.kernel.org>,
        Nathan Chancellor <nathan@...nel.org>
Subject: Re: [PATCH 2/2] tools: Add -Wno-missing-field-initializers to for clang

On Tue, May 11, 2021 at 8:02 AM Masami Hiramatsu <mhiramat@...nel.org> wrote:
>
> Since clang's -Wmissing-field-initializers warns valid syntax of
> initializing data structure (e.g. initializing static data
> structure with single NULL, the rest of fields are initialized
> with zero), it is better to disable this warning option
> for clang for now.
> This can stop building perf because -Werror is also specified.
>
> Note that same issue on gcc has been fixed in 4.7.0, so we don't need
> this for gcc.
>
>  https://gcc.gnu.org/bugzilla/show_bug.cgi?id=36750
>
> Signed-off-by: Masami Hiramatsu <mhiramat@...nel.org>

Seems fine, it's only enabled for the kernel at W=2 anyways.
Acked-by: Nick Desaulniers <ndesaulniers@...gle.com>

> ---
>  tools/scripts/Makefile.include |    4 ++++
>  1 file changed, 4 insertions(+)
>
> diff --git a/tools/scripts/Makefile.include b/tools/scripts/Makefile.include
> index f9271f3ea912..4fd5d33ded03 100644
> --- a/tools/scripts/Makefile.include
> +++ b/tools/scripts/Makefile.include
> @@ -89,6 +89,10 @@ ifeq ($(CC_NO_CLANG), 1)
>  EXTRA_WARNINGS += -Wstrict-aliasing=3
>  endif
>
> +ifneq ($(CC_NO_CLANG), 1)
> +EXTRA_WARNINGS += -Wno-missing-field-initializers
> +endif
> +
>  # Hack to avoid type-punned warnings on old systems such as RHEL5:
>  # We should be changing CFLAGS and checking gcc version, but this
>  # will do for now and keep the above -Wstrict-aliasing=3 in place
>


-- 
Thanks,
~Nick Desaulniers

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ