diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2018-10-28 16:26:45 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2018-10-28 16:26:45 -0400 |
commit | 746bb4ed6d626f3f9e431a7f9b20504538e62ded (patch) | |
tree | cc2f68bca54fb36ee8c72a29013e9c094a69935e /Makefile | |
parent | ac747c0715f29c2be3848b719a1b7e65b07f7b21 (diff) | |
parent | 0bb95f80a38f82884693194ea720e9cca5e12ada (diff) |
Merge tag 'vla-v4.20-rc1' of git://git.kernel.org/pub/scm/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()
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -801,6 +801,9 @@ NOSTDINC_FLAGS += -nostdinc -isystem $(shell $(CC) -print-file-name=include) | |||
801 | # warn about C99 declaration after statement | 801 | # warn about C99 declaration after statement |
802 | KBUILD_CFLAGS += -Wdeclaration-after-statement | 802 | KBUILD_CFLAGS += -Wdeclaration-after-statement |
803 | 803 | ||
804 | # Variable Length Arrays (VLAs) should not be used anywhere in the kernel | ||
805 | KBUILD_CFLAGS += $(call cc-option,-Wvla) | ||
806 | |||
804 | # disable pointer signed / unsigned warnings in gcc 4.0 | 807 | # disable pointer signed / unsigned warnings in gcc 4.0 |
805 | KBUILD_CFLAGS += -Wno-pointer-sign | 808 | KBUILD_CFLAGS += -Wno-pointer-sign |
806 | 809 | ||