From: Linus Torvalds Date: Sun, 28 Oct 2018 20:26:45 +0000 (-0700) Subject: Merge tag 'vla-v4.20-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=746bb4ed6d626f3f9e431a7f9b20504538e62ded;p=linux.git Merge tag 'vla-v4.20-rc1' of git://git./linux/kernel/git/kees/linux Pull VLA removal from Kees Cook: "Globally warn on VLA use. This turns on "-Wvla" globally now that the last few trees with their VLA removals have landed (crypto, block, net, and powerpc). Arnd mentioned that there may be a couple more VLAs hiding in hard-to-find randconfigs, but nothing big has shaken out in the last month or so in linux-next. We should be basically VLA-free now! Wheee. :) Summary: - Remove unused fallback for BUILD_BUG_ON (which technically contains a VLA) - Lift -Wvla to the top-level Makefile" * tag 'vla-v4.20-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux: Makefile: Globally enable VLA warning compiler.h: give up __compiletime_assert_fallback() --- 746bb4ed6d626f3f9e431a7f9b20504538e62ded diff --cc Makefile index eb73f062e9e9d,f1760e8db5732..9aa352b388158 --- a/Makefile +++ b/Makefile @@@ -799,10 -802,13 +799,13 @@@ endi NOSTDINC_FLAGS += -nostdinc -isystem $(shell $(CC) -print-file-name=include) # warn about C99 declaration after statement -KBUILD_CFLAGS += $(call cc-option,-Wdeclaration-after-statement,) +KBUILD_CFLAGS += -Wdeclaration-after-statement + # Variable Length Arrays (VLAs) should not be used anywhere in the kernel + KBUILD_CFLAGS += $(call cc-option,-Wvla) + # disable pointer signed / unsigned warnings in gcc 4.0 -KBUILD_CFLAGS += $(call cc-disable-warning, pointer-sign) +KBUILD_CFLAGS += -Wno-pointer-sign # disable stringop warnings in gcc 8+ KBUILD_CFLAGS += $(call cc-disable-warning, stringop-truncation)