* [PATCH] kbuild: Enable -Wuninitialized
@ 2019-06-14 16:52 Nathan Chancellor
2019-06-14 18:16 ` Nick Desaulniers
2019-06-20 15:45 ` Masahiro Yamada
0 siblings, 2 replies; 3+ messages in thread
From: Nathan Chancellor @ 2019-06-14 16:52 UTC (permalink / raw)
To: Masahiro Yamada, Michal Marek
Cc: linux-kbuild, linux-kernel, Nick Desaulniers, Arnd Bergmann,
clang-built-linux, Nathan Chancellor
This helps fine very dodgy behavior through both -Wuninitialized
(warning that a variable is always uninitialized) and
-Wsometimes-uninitialized (warning that a variable is sometimes
uninitialized, like GCC's -Wmaybe-uninitialized). These warnings
catch things that GCC doesn't such as:
https://lore.kernel.org/lkml/86649ee4-9794-77a3-502c-f4cd10019c36@lca.pw/
We very much want to catch these so turn this warning on so that CI is
aware of it.
Link: https://github.com/ClangBuiltLinux/linux/issues/381
Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>
---
| 1 -
1 file changed, 1 deletion(-)
--git a/scripts/Makefile.extrawarn b/scripts/Makefile.extrawarn
index 98081ab300e5..699683a7c116 100644
--- a/scripts/Makefile.extrawarn
+++ b/scripts/Makefile.extrawarn
@@ -71,6 +71,5 @@ KBUILD_CFLAGS += -Wno-unused-value
KBUILD_CFLAGS += -Wno-format
KBUILD_CFLAGS += -Wno-sign-compare
KBUILD_CFLAGS += -Wno-format-zero-length
-KBUILD_CFLAGS += -Wno-uninitialized
endif
endif
--
2.22.0
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] kbuild: Enable -Wuninitialized
2019-06-14 16:52 [PATCH] kbuild: Enable -Wuninitialized Nathan Chancellor
@ 2019-06-14 18:16 ` Nick Desaulniers
2019-06-20 15:45 ` Masahiro Yamada
1 sibling, 0 replies; 3+ messages in thread
From: Nick Desaulniers @ 2019-06-14 18:16 UTC (permalink / raw)
To: Nathan Chancellor
Cc: Masahiro Yamada, Michal Marek, Linux Kbuild mailing list, LKML,
Arnd Bergmann, clang-built-linux
On Fri, Jun 14, 2019 at 9:53 AM Nathan Chancellor
<natechancellor@gmail.com> wrote:
>
> This helps fine very dodgy behavior through both -Wuninitialized
> (warning that a variable is always uninitialized) and
> -Wsometimes-uninitialized (warning that a variable is sometimes
> uninitialized, like GCC's -Wmaybe-uninitialized). These warnings
> catch things that GCC doesn't such as:
>
> https://lore.kernel.org/lkml/86649ee4-9794-77a3-502c-f4cd10019c36@lca.pw/
or this one, which was my favorite, and quite insidious from an
underhanded C contest perspective.
https://lore.kernel.org/lkml/20190226053855.7020-1-natechancellor@gmail.com/
Thank you very much for all the hard work you did tracking done and
fixing all of the cases we could find. I very much look forward to
this patch as the capstone to all that work.
Reviewed-by: Nick Desaulniers <ndesaulniers@google.com>
>
> We very much want to catch these so turn this warning on so that CI is
> aware of it.
>
> Link: https://github.com/ClangBuiltLinux/linux/issues/381
> Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>
> ---
> scripts/Makefile.extrawarn | 1 -
> 1 file changed, 1 deletion(-)
>
> diff --git a/scripts/Makefile.extrawarn b/scripts/Makefile.extrawarn
> index 98081ab300e5..699683a7c116 100644
> --- a/scripts/Makefile.extrawarn
> +++ b/scripts/Makefile.extrawarn
> @@ -71,6 +71,5 @@ KBUILD_CFLAGS += -Wno-unused-value
> KBUILD_CFLAGS += -Wno-format
> KBUILD_CFLAGS += -Wno-sign-compare
> KBUILD_CFLAGS += -Wno-format-zero-length
> -KBUILD_CFLAGS += -Wno-uninitialized
> endif
> endif
> --
> 2.22.0
>
--
Thanks,
~Nick Desaulniers
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] kbuild: Enable -Wuninitialized
2019-06-14 16:52 [PATCH] kbuild: Enable -Wuninitialized Nathan Chancellor
2019-06-14 18:16 ` Nick Desaulniers
@ 2019-06-20 15:45 ` Masahiro Yamada
1 sibling, 0 replies; 3+ messages in thread
From: Masahiro Yamada @ 2019-06-20 15:45 UTC (permalink / raw)
To: Nathan Chancellor
Cc: Michal Marek, Linux Kbuild mailing list,
Linux Kernel Mailing List, Nick Desaulniers, Arnd Bergmann,
clang-built-linux
On Sat, Jun 15, 2019 at 1:53 AM Nathan Chancellor
<natechancellor@gmail.com> wrote:
>
> This helps fine very dodgy behavior through both -Wuninitialized
> (warning that a variable is always uninitialized) and
> -Wsometimes-uninitialized (warning that a variable is sometimes
> uninitialized, like GCC's -Wmaybe-uninitialized). These warnings
> catch things that GCC doesn't such as:
>
> https://lore.kernel.org/lkml/86649ee4-9794-77a3-502c-f4cd10019c36@lca.pw/
>
> We very much want to catch these so turn this warning on so that CI is
> aware of it.
>
> Link: https://github.com/ClangBuiltLinux/linux/issues/381
> Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>
> ---
Applied to linux-kbuild.
Thanks!
--
Best Regards
Masahiro Yamada
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2019-06-20 15:46 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-06-14 16:52 [PATCH] kbuild: Enable -Wuninitialized Nathan Chancellor
2019-06-14 18:16 ` Nick Desaulniers
2019-06-20 15:45 ` Masahiro Yamada
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).