]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
Makefile: Enable -Wzero-length-bounds
authorKees Cook <keescook@chromium.org>
Tue, 17 Aug 2021 18:56:36 +0000 (11:56 -0700)
committerKees Cook <keescook@chromium.org>
Mon, 30 Aug 2021 18:32:10 +0000 (11:32 -0700)
With all known internal zero-length accesses fixed, it is possible to
enable -Wzero-length-bounds globally. Since this is included by default
in -Warray-bounds, we just need to stop disabling it.

Cc: "Gustavo A. R. Silva" <gustavoars@kernel.org>
Cc: Arnd Bergmann <arnd@arndb.de>
Cc: Masahiro Yamada <masahiroy@kernel.org>
Cc: linux-kbuild@vger.kernel.org
Signed-off-by: Kees Cook <keescook@chromium.org>
Makefile

index 8e7e73a642e26b6061f8a6f68624fddc0053a9a3..8e732e875e785a98054b057791da505adfb57c7d 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -994,7 +994,6 @@ KBUILD_CFLAGS += -Wno-pointer-sign
 KBUILD_CFLAGS += $(call cc-disable-warning, stringop-truncation)
 
 # We'll want to enable this eventually, but it's not going away for 5.7 at least
-KBUILD_CFLAGS += $(call cc-disable-warning, zero-length-bounds)
 KBUILD_CFLAGS += $(call cc-disable-warning, stringop-overflow)
 
 # Another good warning that we'll want to enable eventually