]> git.baikalelectronics.ru Git - kernel.git/commit
hardening: Remove Clang's enable flag for -ftrivial-auto-var-init=zero
authorKees Cook <keescook@chromium.org>
Fri, 30 Sep 2022 05:57:43 +0000 (22:57 -0700)
committerKees Cook <keescook@chromium.org>
Fri, 30 Sep 2022 06:05:00 +0000 (23:05 -0700)
commit0e37f397fb47f60252f1c36ff82317b8a903601b
treed283aabf6a96769dd213d34cab580a0ec32f1c91
parent35e14532565fd01e89ac67e42a46938b7f30bc92
hardening: Remove Clang's enable flag for -ftrivial-auto-var-init=zero

Now that Clang's -enable-trivial-auto-var-init-zero-knowing-it-will-be-removed-from-clang
option is no longer required, remove it from the command line. Clang 16
and later will warn when it is used, which will cause Kconfig to think
it can't use -ftrivial-auto-var-init=zero at all. Check for whether it
is required and only use it when so.

Cc: Nathan Chancellor <nathan@kernel.org>
Cc: Masahiro Yamada <masahiroy@kernel.org>
Cc: Nick Desaulniers <ndesaulniers@google.com>
Cc: linux-kbuild@vger.kernel.org
Cc: llvm@lists.linux.dev
Cc: stable@vger.kernel.org
Fixes: 4184c70d46c7 ("hardening: Avoid harmless Clang option under CONFIG_INIT_STACK_ALL_ZERO")
Signed-off-by: Kees Cook <keescook@chromium.org>
Makefile
security/Kconfig.hardening