All of lore.kernel.org
 help / color / mirror / Atom feed
* [RFC][PATCH] Makefile: globally enable VLA warning
@ 2018-06-26 17:40 ` Kees Cook
  0 siblings, 0 replies; 10+ messages in thread
From: Kees Cook @ 2018-06-26 17:40 UTC (permalink / raw)
  To: linux-kernel
  Cc: Joe Perches, Gustavo A. R. Silva, Masahiro Yamada, Michal Marek,
	Andrew Morton, Palmer Dabbelt, Matt Redfearn,
	Sebastian Andrzej Siewior, David Airlie, linux-kbuild, intel-gfx,
	dri-devel, Linus Torvalds

This is the patch I've got prepared now that fixes for all VLAs have been
sent to maintainers (some are still under review/adjustment, but there
aren't any unexplored cases left). My intention would be to have this land
at the end of the next merge window after all the pending VLA patches
have landed. I just wanted to get any feedback here, since it touches
a couple areas in the process and I didn't want anyone to be surprised. :)

Thanks!

-Kees

----
Now that VLAs have been removed from the kernel, enable the VLA warning
globally. The only exceptions to this are the KASan an UBSan tests which
are explicitly checking that VLAs trigger their respective tests.

Signed-off-by: Kees Cook <keescook@chromium.org>
---
 Makefile                      | 3 +++
 drivers/gpu/drm/i915/Makefile | 2 +-
 lib/Makefile                  | 2 ++
 scripts/Makefile.extrawarn    | 1 -
 4 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/Makefile b/Makefile
index c9132594860b..3d5013ec4116 100644
--- a/Makefile
+++ b/Makefile
@@ -778,6 +778,9 @@ NOSTDINC_FLAGS += -nostdinc -isystem $(shell $(CC) -print-file-name=include)
 # warn about C99 declaration after statement
 KBUILD_CFLAGS += $(call cc-option,-Wdeclaration-after-statement,)
 
+# 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)
 
diff --git a/drivers/gpu/drm/i915/Makefile b/drivers/gpu/drm/i915/Makefile
index 4c6adae23e18..289ab5dc5712 100644
--- a/drivers/gpu/drm/i915/Makefile
+++ b/drivers/gpu/drm/i915/Makefile
@@ -12,7 +12,7 @@
 # Note the danger in using -Wall -Wextra is that when CI updates gcc we
 # will most likely get a sudden build breakage... Hopefully we will fix
 # new warnings before CI updates!
-subdir-ccflags-y := -Wall -Wextra -Wvla
+subdir-ccflags-y := -Wall -Wextra
 subdir-ccflags-y += $(call cc-disable-warning, unused-parameter)
 subdir-ccflags-y += $(call cc-disable-warning, type-limits)
 subdir-ccflags-y += $(call cc-disable-warning, missing-field-initializers)
diff --git a/lib/Makefile b/lib/Makefile
index 90dc5520b784..4720e276232e 100644
--- a/lib/Makefile
+++ b/lib/Makefile
@@ -52,7 +52,9 @@ obj-$(CONFIG_TEST_SYSCTL) += test_sysctl.o
 obj-$(CONFIG_TEST_HASH) += test_hash.o test_siphash.o
 obj-$(CONFIG_TEST_KASAN) += test_kasan.o
 CFLAGS_test_kasan.o += -fno-builtin
+CFLAGS_test_kasan.o += $(call cc-disable-warning, vla)
 obj-$(CONFIG_TEST_UBSAN) += test_ubsan.o
+CFLAGS_test_ubsan.o += $(call cc-disable-warning, vla)
 UBSAN_SANITIZE_test_ubsan.o := y
 obj-$(CONFIG_TEST_KSTRTOX) += test-kstrtox.o
 obj-$(CONFIG_TEST_LIST_SORT) += test_list_sort.o
diff --git a/scripts/Makefile.extrawarn b/scripts/Makefile.extrawarn
index 8d5357053f86..24b2fb1d1297 100644
--- a/scripts/Makefile.extrawarn
+++ b/scripts/Makefile.extrawarn
@@ -52,7 +52,6 @@ warning-3 += -Wpointer-arith
 warning-3 += -Wredundant-decls
 warning-3 += -Wswitch-default
 warning-3 += $(call cc-option, -Wpacked-bitfield-compat)
-warning-3 += $(call cc-option, -Wvla)
 
 warning := $(warning-$(findstring 1, $(KBUILD_ENABLE_EXTRA_GCC_CHECKS)))
 warning += $(warning-$(findstring 2, $(KBUILD_ENABLE_EXTRA_GCC_CHECKS)))
-- 
2.17.1


-- 
Kees Cook
Pixel Security

^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [RFC][PATCH] Makefile: globally enable VLA warning
@ 2018-06-26 17:40 ` Kees Cook
  0 siblings, 0 replies; 10+ messages in thread
From: Kees Cook @ 2018-06-26 17:40 UTC (permalink / raw)
  To: linux-kernel
  Cc: Michal Marek, Gustavo A. R. Silva, David Airlie,
	Sebastian Andrzej Siewior, Matt Redfearn, dri-devel,
	Masahiro Yamada, Palmer Dabbelt, Joe Perches, Andrew Morton,
	Linus Torvalds, intel-gfx, linux-kbuild

This is the patch I've got prepared now that fixes for all VLAs have been
sent to maintainers (some are still under review/adjustment, but there
aren't any unexplored cases left). My intention would be to have this land
at the end of the next merge window after all the pending VLA patches
have landed. I just wanted to get any feedback here, since it touches
a couple areas in the process and I didn't want anyone to be surprised. :)

Thanks!

-Kees

----
Now that VLAs have been removed from the kernel, enable the VLA warning
globally. The only exceptions to this are the KASan an UBSan tests which
are explicitly checking that VLAs trigger their respective tests.

Signed-off-by: Kees Cook <keescook@chromium.org>
---
 Makefile                      | 3 +++
 drivers/gpu/drm/i915/Makefile | 2 +-
 lib/Makefile                  | 2 ++
 scripts/Makefile.extrawarn    | 1 -
 4 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/Makefile b/Makefile
index c9132594860b..3d5013ec4116 100644
--- a/Makefile
+++ b/Makefile
@@ -778,6 +778,9 @@ NOSTDINC_FLAGS += -nostdinc -isystem $(shell $(CC) -print-file-name=include)
 # warn about C99 declaration after statement
 KBUILD_CFLAGS += $(call cc-option,-Wdeclaration-after-statement,)
 
+# 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)
 
diff --git a/drivers/gpu/drm/i915/Makefile b/drivers/gpu/drm/i915/Makefile
index 4c6adae23e18..289ab5dc5712 100644
--- a/drivers/gpu/drm/i915/Makefile
+++ b/drivers/gpu/drm/i915/Makefile
@@ -12,7 +12,7 @@
 # Note the danger in using -Wall -Wextra is that when CI updates gcc we
 # will most likely get a sudden build breakage... Hopefully we will fix
 # new warnings before CI updates!
-subdir-ccflags-y := -Wall -Wextra -Wvla
+subdir-ccflags-y := -Wall -Wextra
 subdir-ccflags-y += $(call cc-disable-warning, unused-parameter)
 subdir-ccflags-y += $(call cc-disable-warning, type-limits)
 subdir-ccflags-y += $(call cc-disable-warning, missing-field-initializers)
diff --git a/lib/Makefile b/lib/Makefile
index 90dc5520b784..4720e276232e 100644
--- a/lib/Makefile
+++ b/lib/Makefile
@@ -52,7 +52,9 @@ obj-$(CONFIG_TEST_SYSCTL) += test_sysctl.o
 obj-$(CONFIG_TEST_HASH) += test_hash.o test_siphash.o
 obj-$(CONFIG_TEST_KASAN) += test_kasan.o
 CFLAGS_test_kasan.o += -fno-builtin
+CFLAGS_test_kasan.o += $(call cc-disable-warning, vla)
 obj-$(CONFIG_TEST_UBSAN) += test_ubsan.o
+CFLAGS_test_ubsan.o += $(call cc-disable-warning, vla)
 UBSAN_SANITIZE_test_ubsan.o := y
 obj-$(CONFIG_TEST_KSTRTOX) += test-kstrtox.o
 obj-$(CONFIG_TEST_LIST_SORT) += test_list_sort.o
diff --git a/scripts/Makefile.extrawarn b/scripts/Makefile.extrawarn
index 8d5357053f86..24b2fb1d1297 100644
--- a/scripts/Makefile.extrawarn
+++ b/scripts/Makefile.extrawarn
@@ -52,7 +52,6 @@ warning-3 += -Wpointer-arith
 warning-3 += -Wredundant-decls
 warning-3 += -Wswitch-default
 warning-3 += $(call cc-option, -Wpacked-bitfield-compat)
-warning-3 += $(call cc-option, -Wvla)
 
 warning := $(warning-$(findstring 1, $(KBUILD_ENABLE_EXTRA_GCC_CHECKS)))
 warning += $(warning-$(findstring 2, $(KBUILD_ENABLE_EXTRA_GCC_CHECKS)))
-- 
2.17.1


-- 
Kees Cook
Pixel Security
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply related	[flat|nested] 10+ messages in thread

* ✗ Fi.CI.SPARSE: warning for Makefile: globally enable VLA warning
  2018-06-26 17:40 ` Kees Cook
  (?)
@ 2018-06-26 18:03 ` Patchwork
  -1 siblings, 0 replies; 10+ messages in thread
From: Patchwork @ 2018-06-26 18:03 UTC (permalink / raw)
  To: Kees Cook; +Cc: intel-gfx

== Series Details ==

Series: Makefile: globally enable VLA warning
URL   : https://patchwork.freedesktop.org/series/45421/
State : warning

== Summary ==

$ dim sparse origin/drm-tip
Commit: Makefile: globally enable VLA warning
-
+drivers/gpu/drm/ati_pcigart.c:184:52:    expected unsigned int [unsigned] [usertype] <noident>
+drivers/gpu/drm/ati_pcigart.c:184:52:    got restricted __le32 [usertype] <noident>
+drivers/gpu/drm/ati_pcigart.c:184:52: warning: incorrect type in assignment (different base types)
+drivers/gpu/drm/drm_atomic.c:1282:29: warning: expression using sizeof(void)
+drivers/gpu/drm/drm_atomic.c:1282:29: warning: expression using sizeof(void)
+drivers/gpu/drm/drm_bufs.c:213:45:    expected void *handle
+drivers/gpu/drm/drm_bufs.c:213:45:    got void [noderef] <asn:2>*
+drivers/gpu/drm/drm_bufs.c:213:45: warning: incorrect type in assignment (different address spaces)
+drivers/gpu/drm/drm_bufs.c:216:45:    expected void *handle
+drivers/gpu/drm/drm_bufs.c:216:45:    got void [noderef] <asn:2>*
+drivers/gpu/drm/drm_bufs.c:216:45: warning: incorrect type in assignment (different address spaces)
+drivers/gpu/drm/drm_bufs.c:331:36:    expected void volatile [noderef] <asn:2>*addr
+drivers/gpu/drm/drm_bufs.c:331:36:    got void *handle
+drivers/gpu/drm/drm_bufs.c:331:36: warning: incorrect type in argument 1 (different address spaces)
+drivers/gpu/drm/drm_bufs.c:348:36:    expected void volatile [noderef] <asn:2>*addr
+drivers/gpu/drm/drm_bufs.c:348:36:    got void *handle
+drivers/gpu/drm/drm_bufs.c:348:36: warning: incorrect type in argument 1 (different address spaces)
+drivers/gpu/drm/drm_bufs.c:514:28:    expected void volatile [noderef] <asn:2>*addr
+drivers/gpu/drm/drm_bufs.c:514:28:    got void *handle
+drivers/gpu/drm/drm_bufs.c:514:28: warning: incorrect type in argument 1 (different address spaces)
+drivers/gpu/drm/drm_color_mgmt.c:127:16: warning: expression using sizeof(void)
+drivers/gpu/drm/drm_color_mgmt.c:127:16: warning: expression using sizeof(void)
+drivers/gpu/drm/drm_color_mgmt.c:127:16: warning: expression using sizeof(void)
+drivers/gpu/drm/drm_color_mgmt.c:127:16: warning: expression using sizeof(void)
+drivers/gpu/drm/drm_color_mgmt.c:127:16: warning: expression using sizeof(void)
+drivers/gpu/drm/drm_color_mgmt.c:127:16: warning: expression using sizeof(void)
+drivers/gpu/drm/drm_color_mgmt.c:127:16: warning: expression using sizeof(void)
+drivers/gpu/drm/drm_color_mgmt.c:127:16: warning: expression using sizeof(void)
+drivers/gpu/drm/drm_debugfs_crc.c:332:17:    expected restricted __poll_t ( *poll )( ... )
+drivers/gpu/drm/drm_debugfs_crc.c:332:17:    got unsigned int ( *<noident> )( ... )
+drivers/gpu/drm/drm_debugfs_crc.c:332:17: warning: incorrect type in initializer (different base types)
+drivers/gpu/drm/drm_dp_aux_dev.c:157:32: warning: expression using sizeof(void)
+drivers/gpu/drm/drm_dp_aux_dev.c:199:32: warning: expression using sizeof(void)
+drivers/gpu/drm/drm_dp_helper.c:766:27: warning: expression using sizeof(void)
+drivers/gpu/drm/drm_dp_helper.c:914:36: warning: expression using sizeof(void)
+drivers/gpu/drm/drm_dp_helper.c:914:36: warning: expression using sizeof(void)
+drivers/gpu/drm/drm_dp_helper.c:914:36: warning: expression using sizeof(void)
+drivers/gpu/drm/drm_dp_helper.c:914:36: warning: expression using sizeof(void)
+drivers/gpu/drm/drm_dp_helper.c:914:36: warning: expression using sizeof(void)
+drivers/gpu/drm/drm_dp_helper.c:914:36: warning: expression using sizeof(void)
+drivers/gpu/drm/drm_dp_helper.c:914:36: warning: expression using sizeof(void)
+drivers/gpu/drm/drm_dp_helper.c:944:36: warning: expression using sizeof(void)
+drivers/gpu/drm/drm_dp_helper.c:944:36: warning: expression using sizeof(void)
+drivers/gpu/drm/drm_dp_mst_topology.c:1429:26: warning: expression using sizeof(void)
+drivers/gpu/drm/drm_dp_mst_topology.c:1429:26: warning: expression using sizeof(void)
+drivers/gpu/drm/drm_dp_mst_topology.c:1429:26: warning: expression using sizeof(void)
+drivers/gpu/drm/drm_dp_mst_topology.c:1429:26: warning: expression using sizeof(void)
+drivers/gpu/drm/drm_dp_mst_topology.c:1429:26: warning: expression using sizeof(void)
+drivers/gpu/drm/drm_dp_mst_topology.c:1429:26: warning: expression using sizeof(void)
+drivers/gpu/drm/drm_dp_mst_topology.c:1429:26: warning: expression using sizeof(void)
+drivers/gpu/drm/drm_dp_mst_topology.c:1429:26: warning: expression using sizeof(void)
+drivers/gpu/drm/drm_dp_mst_topology.c:1516:18: warning: expression using sizeof(void)
+drivers/gpu/drm/drm_dp_mst_topology.c:1516:18: warning: expression using sizeof(void)
+drivers/gpu/drm/drm_dp_mst_topology.c:2267:15: warning: expression using sizeof(void)
+drivers/gpu/drm/drm_dp_mst_topology.c:2285:23: warning: expression using sizeof(void)
+drivers/gpu/drm/drm_dp_mst_topology.c:2285:23: warning: expression using sizeof(void)
+drivers/gpu/drm/drm_dp_mst_topology.c:2285:23: warning: expression using sizeof(void)
+drivers/gpu/drm/drm_dp_mst_topology.c:2285:23: warning: expression using sizeof(void)
+drivers/gpu/drm/drm_dp_mst_topology.c:2285:23: warning: expression using sizeof(void)
+drivers/gpu/drm/drm_dp_mst_topology.c:2285:23: warning: expression using sizeof(void)
+drivers/gpu/drm/drm_dp_mst_topology.c:2285:23: warning: expression using sizeof(void)
+drivers/gpu/drm/drm_dp_mst_topology.c:2285:23: warning: expression using sizeof(void)
+drivers/gpu/drm/drm_dp_mst_topology.c:2285:23: warning: expression using sizeof(void)
+drivers/gpu/drm/drm_dp_mst_topology.c:2285:23: warning: expression using sizeof(void)
+drivers/gpu/drm/drm_dp_mst_topology.c:2285:23: warning: expression using sizeof(void)
+drivers/gpu/drm/drm_dp_mst_topology.c:2285:23: warning: expression using sizeof(void)
+drivers/gpu/drm/drm_dp_mst_topology.c:2285:23: warning: expression using sizeof(void)
+drivers/gpu/drm/drm_dp_mst_topology.c:364:37: warning: expression using sizeof(void)
+drivers/gpu/drm/drm_dp_mst_topology.c:364:37: warning: expression using sizeof(void)
+drivers/gpu/drm/drm_drv.c:334:6: warning: context imbalance in 'drm_dev_enter' - different lock contexts for basic block
+drivers/gpu/drm/drm_drv.c:354:6: warning: context imbalance in 'drm_dev_exit' - unexpected unlock
+drivers/gpu/drm/drm_edid.c:1906:29: warning: expression using sizeof(void)
+drivers/gpu/drm/drm_edid.c:3868:23: warning: expression using sizeof(void)
+drivers/gpu/drm/drm_edid.c:3868:23: warning: expression using sizeof(void)
+drivers/gpu/drm/drm_edid.c:3944:45: warning: expression using sizeof(void)
+drivers/gpu/drm/drm_edid.c:3944:45: warning: expression using sizeof(void)
+drivers/gpu/drm/drm_edid.c:4128:21: warning: expression using sizeof(void)
+drivers/gpu/drm/drm_edid.c:4130:21: warning: expression using sizeof(void)
+drivers/gpu/drm/drm_edid.c:4132:16: warning: expression using sizeof(void)
+drivers/gpu/drm/drm_fb_helper.c:1012:23: warning: expression using sizeof(void)
+drivers/gpu/drm/drm_fb_helper.c:1012:23: warning: expression using sizeof(void)
+drivers/gpu/drm/drm_fb_helper.c:1013:23: warning: expression using sizeof(void)
+drivers/gpu/drm/drm_fb_helper.c:1013:23: warning: expression using sizeof(void)
+drivers/gpu/drm/drm_fb_helper.c:1018:22: warning: expression using sizeof(void)
+drivers/gpu/drm/drm_fb_helper.c:1018:22: warning: expression using sizeof(void)
+drivers/gpu/drm/drm_fb_helper.c:1854:40: warning: expression using sizeof(void)
+drivers/gpu/drm/drm_fb_helper.c:1854:40: warning: expression using sizeof(void)
+drivers/gpu/drm/drm_fb_helper.c:1855:40: warning: expression using sizeof(void)
+drivers/gpu/drm/drm_fb_helper.c:1855:40: warning: expression using sizeof(void)
+drivers/gpu/drm/drm_fb_helper.c:1869:43: warning: expression using sizeof(void)
+drivers/gpu/drm/drm_fb_helper.c:1869:43: warning: expression using sizeof(void)
+drivers/gpu/drm/drm_fb_helper.c:1871:43: warning: expression using sizeof(void)
+drivers/gpu/drm/drm_fb_helper.c:1871:43: warning: expression using sizeof(void)
+drivers/gpu/drm/drm_fb_helper.c:983:20: warning: expression using sizeof(void)
+drivers/gpu/drm/drm_fb_helper.c:983:20: warning: expression using sizeof(void)
+drivers/gpu/drm/drm_fb_helper.c:984:20: warning: expression using sizeof(void)
+drivers/gpu/drm/drm_fb_helper.c:984:20: warning: expression using sizeof(void)
+drivers/gpu/drm/drm_fb_helper.c:985:20: warning: expression using sizeof(void)
+drivers/gpu/drm/drm_fb_helper.c:985:20: warning: expression using sizeof(void)
+drivers/gpu/drm/drm_fb_helper.c:986:20: warning: expression using sizeof(void)
+drivers/gpu/drm/drm_fb_helper.c:986:20: warning: expression using sizeof(void)
+drivers/gpu/drm/drm_ioc32.c:188:39:    expected void [noderef] <asn:1>*uptr
+drivers/gpu/drm/drm_ioc32.c:188:39:    got void *[addressable] [assigned] handle
+drivers/gpu/drm/drm_ioc32.c:188:39: warning: incorrect type in argument 1 (different address spaces)
+drivers/gpu/drm/drm_ioc32.c:219:39:    expected void [noderef] <asn:1>*uptr
+drivers/gpu/drm/drm_ioc32.c:219:39:    got void *[addressable] [assigned] handle
+drivers/gpu/drm/drm_ioc32.c:219:39: warning: incorrect type in argument 1 (different address spaces)
+drivers/gpu/drm/drm_ioc32.c:220:24: error: incompatible types in comparison expression (different address spaces)
+drivers/gpu/drm/drm_ioc32.c:239:20:    expected void *handle
+drivers/gpu/drm/drm_ioc32.c:239:20:    got void [noderef] <asn:1>*
+drivers/gpu/drm/drm_ioc32.c:239:20: warning: incorrect type in assignment (different address spaces)
+drivers/gpu/drm/drm_ioc32.c:508:24:    expected void *[assigned] handle
+drivers/gpu/drm/drm_ioc32.c:508:24:    got void [noderef] <asn:1>*
+drivers/gpu/drm/drm_ioc32.c:508:24: warning: incorrect type in assignment (different address spaces)
+drivers/gpu/drm/drm_ioc32.c:529:41:    expected void [noderef] <asn:1>*uptr
+drivers/gpu/drm/drm_ioc32.c:529:41:    got void *[addressable] [assigned] handle
+drivers/gpu/drm/drm_ioc32.c:529:41: warning: incorrect type in argument 1 (different address spaces)
+drivers/gpu/drm/drm_ioctl.c:376:35: warning: expression using sizeof(void)
+drivers/gpu/drm/drm_ioctl.c:376:35: warning: expression using sizeof(void)
+drivers/gpu/drm/drm_ioctl.c:813:17: warning: expression using sizeof(void)
+drivers/gpu/drm/drm_ioctl.c:813:17: warning: expression using sizeof(void)
+drivers/gpu/drm/drm_ioctl.c:813:17: warning: expression using sizeof(void)
+drivers/gpu/drm/drm_ioctl.c:813:17: warning: expression using sizeof(void)
+drivers/gpu/drm/drm_ioctl.c:813:17: warning: expression using sizeof(void)
+drivers/gpu/drm/drm_ioctl.c:813:17: warning: expression using sizeof(void)
+drivers/gpu/drm/drm_ioctl.c:813:17: warning: expression using sizeof(void)
+drivers/gpu/drm/drm_ioctl.c:813:17: warning: expression using sizeof(void)
+drivers/gpu/drm/drm_ioctl.c:813:17: warning: expression using sizeof(void)
+drivers/gpu/drm/drm_ioctl.c:813:17: warning: expression using sizeof(void)
+drivers/gpu/drm/drm_ioctl.c:813:17: warning: expression using sizeof(void)
+drivers/gpu/drm/drm_ioctl.c:813:17: warning: expression using sizeof(void)
+drivers/gpu/drm/drm_ioctl.c:813:17: warning: expression using sizeof(void)
+drivers/gpu/drm/drm_ioctl.c:813:17: warning: expression using sizeof(void)
+drivers/gpu/drm/drm_memory.c:128:29:    expected void *handle
+drivers/gpu/drm/drm_memory.c:128:29:    got void [noderef] <asn:2>*
+drivers/gpu/drm/drm_memory.c:128:29: warning: incorrect type in assignment (different address spaces)
+drivers/gpu/drm/drm_memory.c:137:29:    expected void *handle
+drivers/gpu/drm/drm_memory.c:137:29:    got void [noderef] <asn:2>*
+drivers/gpu/drm/drm_memory.c:137:29: warning: incorrect type in assignment (different address spaces)
+drivers/gpu/drm/drm_memory.c:149:28:    expected void volatile [noderef] <asn:2>*addr
+drivers/gpu/drm/drm_memory.c:149:28:    got void *handle
+drivers/gpu/drm/drm_memory.c:149:28: warning: incorrect type in argument 1 (different address spaces)
+drivers/gpu/drm/drm_memory.c:153:5: warning: symbol 'drm_get_max_iomem' was not declared. Should it be static?
+drivers/gpu/drm/drm_memory.c:159:29: warning: expression using sizeof(void)
+drivers/gpu/drm/drm_memory.c:159:29: warning: expression using sizeof(void)
+drivers/gpu/drm/drm_mm.c:519:29: warning: expression using sizeof(void)
+drivers/gpu/drm/drm_mm.c:519:29: warning: expression using sizeof(void)
+drivers/gpu/drm/drm_mm.c:520:27: warning: expression using sizeof(void)
+drivers/gpu/drm/drm_mm.c:520:27: warning: expression using sizeof(void)
+drivers/gpu/drm/drm_mm.c:540:49: warning: expression using sizeof(void)
+drivers/gpu/drm/drm_mm.c:540:49: warning: expression using sizeof(void)
+drivers/gpu/drm/drm_mm.c:541:37: warning: expression using sizeof(void)
+drivers/gpu/drm/drm_mm.c:541:37: warning: expression using sizeof(void)
+drivers/gpu/drm/drm_mm.c:766:21: warning: expression using sizeof(void)
+drivers/gpu/drm/drm_mm.c:766:21: warning: expression using sizeof(void)
+drivers/gpu/drm/drm_mm.c:767:19: warning: expression using sizeof(void)
+drivers/gpu/drm/drm_mm.c:767:19: warning: expression using sizeof(void)
+drivers/gpu/drm/drm_mm.c:785:41: warning: expression using sizeof(void)
+drivers/gpu/drm/drm_mm.c:785:41: warning: expression using sizeof(void)
+drivers/gpu/drm/drm_mm.c:786:29: warning: expression using sizeof(void)
+drivers/gpu/drm/drm_mm.c:786:29: warning: expression using sizeof(void)
+drivers/gpu/drm/drm_modes.c:890:32: warning: expression using sizeof(void)
+drivers/gpu/drm/drm_modes.c:890:32: warning: expression using sizeof(void)
+drivers/gpu/drm/drm_modes.c:891:30: warning: expression using sizeof(void)
+drivers/gpu/drm/drm_modes.c:891:30: warning: expression using sizeof(void)
+drivers/gpu/drm/drm_modes.c:892:32: warning: expression using sizeof(void)
+drivers/gpu/drm/drm_modes.c:892:32: warning: expression using sizeof(void)
+drivers/gpu/drm/drm_modes.c:893:30: warning: expression using sizeof(void)
+drivers/gpu/drm/drm_modes.c:893:30: warning: expression using sizeof(void)
+drivers/gpu/drm/drm_rect.c:106:27: warning: expression using sizeof(void)
+drivers/gpu/drm/drm_rect.c:106:27: warning: expression using sizeof(void)
+drivers/gpu/drm/drm_rect.c:106:27: warning: expression using sizeof(void)
+drivers/gpu/drm/drm_rect.c:106:27: warning: expression using sizeof(void)
+drivers/gpu/drm/drm_rect.c:106:27: warning: expression using sizeof(void)
+drivers/gpu/drm/drm_rect.c:106:27: warning: expression using sizeof(void)
+drivers/gpu/drm/drm_rect.c:106:27: warning: expression using sizeof(void)
+drivers/gpu/drm/drm_rect.c:114:27: warning: expression using sizeof(void)
+drivers/gpu/drm/drm_rect.c:114:27: warning: expression using sizeof(void)
+drivers/gpu/drm/drm_rect.c:114:27: warning: expression using sizeof(void)
+drivers/gpu/drm/drm_rect.c:114:27: warning: expression using sizeof(void)
+drivers/gpu/drm/drm_rect.c:114:27: warning: expression using sizeof(void)
+drivers/gpu/drm/drm_rect.c:114:27: warning: expression using sizeof(void)
+drivers/gpu/drm/drm_rect.c:114:27: warning: expression using sizeof(void)
+drivers/gpu/drm/drm_rect.c:44:18: warning: expression using sizeof(void)
+drivers/gpu/drm/drm_rect.c:44:18: warning: expression using sizeof(void)
+drivers/gpu/drm/drm_rect.c:45:18: warning: expression using sizeof(void)
+drivers/gpu/drm/drm_rect.c:45:18: warning: expression using sizeof(void)
+drivers/gpu/drm/drm_rect.c:46:18: warning: expression using sizeof(void)
+drivers/gpu/drm/drm_rect.c:46:18: warning: expression using sizeof(void)
+drivers/gpu/drm/drm_rect.c:47:18: warning: expression using sizeof(void)
+drivers/gpu/drm/drm_rect.c:47:18: warning: expression using sizeof(void)
+drivers/gpu/drm/drm_rect.c:90:27: warning: expression using sizeof(void)
+drivers/gpu/drm/drm_rect.c:90:27: warning: expression using sizeof(void)
+drivers/gpu/drm/drm_rect.c:90:27: warning: expression using sizeof(void)
+drivers/gpu/drm/drm_rect.c:90:27: warning: expression using sizeof(void)
+drivers/gpu/drm/drm_rect.c:90:27: warning: expression using sizeof(void)
+drivers/gpu/drm/drm_rect.c:90:27: warning: expression using sizeof(void)
+drivers/gpu/drm/drm_rect.c:90:27: warning: expression using sizeof(void)
+drivers/gpu/drm/drm_rect.c:98:27: warning: expression using sizeof(void)
+drivers/gpu/drm/drm_rect.c:98:27: warning: expression using sizeof(void)
+drivers/gpu/drm/drm_rect.c:98:27: warning: expression using sizeof(void)
+drivers/gpu/drm/drm_rect.c:98:27: warning: expression using sizeof(void)
+drivers/gpu/drm/drm_rect.c:98:27: warning: expression using sizeof(void)
+drivers/gpu/drm/drm_rect.c:98:27: warning: expression using sizeof(void)
+drivers/gpu/drm/drm_rect.c:98:27: warning: expression using sizeof(void)
+drivers/gpu/drm/i915/gvt/gtt.c:671:9:    expected void [noderef] <asn:4>**slot
+drivers/gpu/drm/i915/gvt/gtt.c:671:9:    expected void **slot
+drivers/gpu/drm/i915/gvt/gtt.c:671:9:    expected void **slot
+drivers/gpu/drm/i915/gvt/gtt.c:671:9:    expected void **slot
+drivers/gpu/drm/i915/gvt/gtt.c:671:9:    got void [noderef] <asn:4>**
+drivers/gpu/drm/i915/gvt/gtt.c:671:9:    got void [noderef] <asn:4>**
+drivers/gpu/drm/i915/gvt/gtt.c:671:9:    got void [noderef] <asn:4>**
+drivers/gpu/drm/i915/gvt/gtt.c:671:9:    got void **slot
+drivers/gpu/drm/i915/gvt/gtt.c:671:9: warning: incorrect type in argument 1 (different address spaces)
+drivers/gpu/drm/i915/gvt/gtt.c:671:9: warning: incorrect type in assignment (different address spaces)
+drivers/gpu/drm/i915/gvt/gtt.c:671:9: warning: incorrect type in assignment (different address spaces)
+drivers/gpu/drm/i915/gvt/gtt.c:671:9: warning: incorrect type in assignment (different address spaces)
+drivers/gpu/drm/i915/gvt/gtt.c:672:45:    expected void [noderef] <asn:4>**slot
+drivers/gpu/drm/i915/gvt/gtt.c:672:45:    got void **slot
+drivers/gpu/drm/i915/gvt/gtt.c:672:45: warning: incorrect type in argument 1 (different address spaces)
+drivers/gpu/drm/i915/gvt/mmio.c:253:23: warning: memcpy with byte count of 279040
+drivers/gpu/drm/i915/gvt/mmio.c:254:23: warning: memcpy with byte count of 279040
+drivers/gpu/drm/i915/gvt/vgpu.c:195:48: warning: expression using sizeof(void)
+drivers/gpu/drm/i915/gvt/vgpu.c:195:48: warning: expression using sizeof(void)
+drivers/gpu/drm/i915/gvt/vgpu.c:195:48: warning: expression using sizeof(void)
+drivers/gpu/drm/i915/gvt/vgpu.c:195:48: warning: expression using sizeof(void)
+drivers/gpu/drm/i915/gvt/vgpu.c:195:48: warning: expression using sizeof(void)
+drivers/gpu/drm/i915/gvt/vgpu.c:195:48: warning: expression using sizeof(void)
+drivers/gpu/drm/i915/gvt/vgpu.c:195:48: warning: expression using sizeof(void)
+drivers/gpu/drm/i915/gvt/vgpu.c:195:48: warning: expression using sizeof(void)
+drivers/gpu/drm/i915/gvt/vgpu.c:195:48: warning: expression using sizeof(void)
+drivers/gpu/drm/i915/gvt/vgpu.c:195:48: warning: expression using sizeof(void)
+drivers/gpu/drm/i915/gvt/vgpu.c:195:48: warning: expression using sizeof(void)
+drivers/gpu/drm/i915/gvt/vgpu.c:195:48: warning: expression using sizeof(void)
+drivers/gpu/drm/i915/gvt/vgpu.c:195:48: warning: expression using sizeof(void)
+drivers/gpu/drm/i915/gvt/vgpu.c:195:48: warning: expression using sizeof(void)
+drivers/gpu/drm/i915/i915_cmd_parser.c:1104:35: warning: expression using sizeof(void)
+drivers/gpu/drm/i915/i915_cmd_parser.c:1104:35: warning: expression using sizeof(void)
+drivers/gpu/drm/i915/i915_debugfs.c:4307:41: warning: expression using sizeof(void)
+drivers/gpu/drm/i915/i915_debugfs.c:4307:41: warning: expression using sizeof(void)
+drivers/gpu/drm/i915/i915_debugfs.c:4361:49: warning: expression using sizeof(void)
+drivers/gpu/drm/i915/i915_debugfs.c:4361:49: warning: expression using sizeof(void)
+drivers/gpu/drm/i915/i915_debugfs.c:4417:49: warning: expression using sizeof(void)
+drivers/gpu/drm/i915/i915_debugfs.c:4417:49: warning: expression using sizeof(void)
+drivers/gpu/drm/i915/i915_drv.h:171:19: warning: expression using sizeof(void)
+drivers/gpu/drm/i915/i915_drv.h:171:19: warning: expression using sizeof(void)
+drivers/gpu/drm/i915/i915_drv.h:171:19: warning: expression using sizeof(void)
+drivers/gpu/drm/i915/i915_drv.h:171:19: warning: expression using sizeof(void)
+drivers/gpu/drm/i915/i915_d

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 10+ messages in thread

* ✓ Fi.CI.BAT: success for Makefile: globally enable VLA warning
  2018-06-26 17:40 ` Kees Cook
  (?)
  (?)
@ 2018-06-26 18:21 ` Patchwork
  -1 siblings, 0 replies; 10+ messages in thread
From: Patchwork @ 2018-06-26 18:21 UTC (permalink / raw)
  To: Kees Cook; +Cc: intel-gfx

== Series Details ==

Series: Makefile: globally enable VLA warning
URL   : https://patchwork.freedesktop.org/series/45421/
State : success

== Summary ==

= CI Bug Log - changes from CI_DRM_4381 -> Patchwork_9427 =

== Summary - SUCCESS ==

  No regressions found.

  External URL: https://patchwork.freedesktop.org/api/1.0/series/45421/revisions/1/mbox/

== Known issues ==

  Here are the changes found in Patchwork_9427 that come from known issues:

  === IGT changes ===

    ==== Issues hit ====

    igt@gem_exec_gttfill@basic:
      fi-byt-n2820:       PASS -> FAIL (fdo#106744)

    igt@kms_flip@basic-flip-vs-wf_vblank:
      fi-glk-dsi:         PASS -> FAIL (fdo#100368)

    igt@kms_pipe_crc_basic@suspend-read-crc-pipe-c:
      fi-bxt-dsi:         PASS -> INCOMPLETE (fdo#103927)

    
  fdo#100368 https://bugs.freedesktop.org/show_bug.cgi?id=100368
  fdo#103927 https://bugs.freedesktop.org/show_bug.cgi?id=103927
  fdo#106744 https://bugs.freedesktop.org/show_bug.cgi?id=106744


== Participating hosts (44 -> 39) ==

  Missing    (5): fi-ctg-p8600 fi-ilk-m540 fi-byt-squawks fi-bsw-cyan fi-hsw-4200u 


== Build changes ==

    * Linux: CI_DRM_4381 -> Patchwork_9427

  CI_DRM_4381: ed0d219201c3fd3eb430b712d6ceb51b423daefc @ git://anongit.freedesktop.org/gfx-ci/linux
  IGT_4530: 0e98bf69f146eb72fe3a7c3b19a049b5786f0ca3 @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
  Patchwork_9427: e40c09ebdd8985f81970f02ada37dc18072c44ee @ git://anongit.freedesktop.org/gfx-ci/linux


== Linux commits ==

e40c09ebdd89 Makefile: globally enable VLA warning

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_9427/issues.html
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 10+ messages in thread

* ✗ Fi.CI.IGT: failure for Makefile: globally enable VLA warning
  2018-06-26 17:40 ` Kees Cook
                   ` (2 preceding siblings ...)
  (?)
@ 2018-06-26 20:00 ` Patchwork
  -1 siblings, 0 replies; 10+ messages in thread
From: Patchwork @ 2018-06-26 20:00 UTC (permalink / raw)
  To: Kees Cook; +Cc: intel-gfx

== Series Details ==

Series: Makefile: globally enable VLA warning
URL   : https://patchwork.freedesktop.org/series/45421/
State : failure

== Summary ==

= CI Bug Log - changes from CI_DRM_4381_full -> Patchwork_9427_full =

== Summary - FAILURE ==

  Serious unknown changes coming with Patchwork_9427_full absolutely need to be
  verified manually.
  
  If you think the reported changes have nothing to do with the changes
  introduced in Patchwork_9427_full, please notify your bug team to allow them
  to document this new failure mode, which will reduce false positives in CI.

  

== Possible new issues ==

  Here are the unknown changes that may have been introduced in Patchwork_9427_full:

  === IGT changes ===

    ==== Possible regressions ====

    igt@drv_selftest@live_execlists:
      shard-glk:          PASS -> DMESG-FAIL

    igt@drv_selftest@live_guc:
      shard-glk:          PASS -> DMESG-WARN

    
    ==== Warnings ====

    igt@gem_exec_schedule@deep-bsd2:
      shard-kbl:          PASS -> SKIP

    igt@gem_exec_schedule@deep-vebox:
      shard-kbl:          SKIP -> PASS +3

    igt@gem_linear_blits@interruptible:
      shard-apl:          SKIP -> PASS

    
== Known issues ==

  Here are the changes found in Patchwork_9427_full that come from known issues:

  === IGT changes ===

    ==== Issues hit ====

    igt@drv_selftest@live_gtt:
      shard-kbl:          PASS -> INCOMPLETE (fdo#103665) +1
      shard-glk:          PASS -> FAIL (fdo#105347)
      shard-apl:          PASS -> INCOMPLETE (fdo#103927)

    igt@drv_selftest@live_hangcheck:
      shard-glk:          PASS -> DMESG-FAIL (fdo#106560, fdo#106947)

    igt@kms_flip@2x-flip-vs-expired-vblank:
      shard-glk:          PASS -> FAIL (fdo#105363)

    igt@kms_flip@plain-flip-fb-recreate:
      shard-glk:          PASS -> FAIL (fdo#100368)

    igt@kms_flip_tiling@flip-to-y-tiled:
      shard-glk:          PASS -> FAIL (fdo#104724)

    igt@kms_rotation_crc@cursor-rotation-180:
      shard-hsw:          PASS -> FAIL (fdo#104724, fdo#103925)

    
    ==== Possible fixes ====

    igt@gem_exec_await@wide-contexts:
      shard-glk:          FAIL (fdo#105900) -> PASS

    igt@kms_cursor_legacy@2x-long-cursor-vs-flip-atomic:
      shard-hsw:          FAIL (fdo#105767) -> PASS

    igt@kms_cursor_legacy@2x-nonblocking-modeset-vs-cursor-atomic:
      shard-glk:          FAIL (fdo#105454, fdo#106509) -> PASS

    igt@kms_flip@2x-plain-flip-fb-recreate:
      shard-glk:          FAIL (fdo#100368) -> PASS

    igt@kms_flip@flip-vs-expired-vblank-interruptible:
      shard-glk:          FAIL (fdo#102887, fdo#105363) -> PASS

    igt@kms_setmode@basic:
      shard-apl:          FAIL (fdo#99912) -> PASS
      shard-kbl:          FAIL (fdo#99912) -> PASS

    
  fdo#100368 https://bugs.freedesktop.org/show_bug.cgi?id=100368
  fdo#102887 https://bugs.freedesktop.org/show_bug.cgi?id=102887
  fdo#103665 https://bugs.freedesktop.org/show_bug.cgi?id=103665
  fdo#103925 https://bugs.freedesktop.org/show_bug.cgi?id=103925
  fdo#103927 https://bugs.freedesktop.org/show_bug.cgi?id=103927
  fdo#104724 https://bugs.freedesktop.org/show_bug.cgi?id=104724
  fdo#105347 https://bugs.freedesktop.org/show_bug.cgi?id=105347
  fdo#105363 https://bugs.freedesktop.org/show_bug.cgi?id=105363
  fdo#105454 https://bugs.freedesktop.org/show_bug.cgi?id=105454
  fdo#105767 https://bugs.freedesktop.org/show_bug.cgi?id=105767
  fdo#105900 https://bugs.freedesktop.org/show_bug.cgi?id=105900
  fdo#106509 https://bugs.freedesktop.org/show_bug.cgi?id=106509
  fdo#106560 https://bugs.freedesktop.org/show_bug.cgi?id=106560
  fdo#106947 https://bugs.freedesktop.org/show_bug.cgi?id=106947
  fdo#99912 https://bugs.freedesktop.org/show_bug.cgi?id=99912


== Participating hosts (5 -> 5) ==

  No changes in participating hosts


== Build changes ==

    * Linux: CI_DRM_4381 -> Patchwork_9427

  CI_DRM_4381: ed0d219201c3fd3eb430b712d6ceb51b423daefc @ git://anongit.freedesktop.org/gfx-ci/linux
  IGT_4530: 0e98bf69f146eb72fe3a7c3b19a049b5786f0ca3 @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
  Patchwork_9427: e40c09ebdd8985f81970f02ada37dc18072c44ee @ git://anongit.freedesktop.org/gfx-ci/linux
  piglit_4509: fdc5a4ca11124ab8413c7988896eec4c97336694 @ git://anongit.freedesktop.org/piglit

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_9427/shards.html
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [RFC][PATCH] Makefile: globally enable VLA warning
  2018-06-26 17:40 ` Kees Cook
@ 2018-06-26 20:21   ` Joe Perches
  -1 siblings, 0 replies; 10+ messages in thread
From: Joe Perches @ 2018-06-26 20:21 UTC (permalink / raw)
  To: Kees Cook, linux-kernel
  Cc: Gustavo A. R. Silva, Masahiro Yamada, Michal Marek,
	Andrew Morton, Palmer Dabbelt, Matt Redfearn,
	Sebastian Andrzej Siewior, David Airlie, linux-kbuild, intel-gfx,
	dri-devel, Linus Torvalds

On Tue, 2018-06-26 at 10:40 -0700, Kees Cook wrote:
> This is the patch I've got prepared now that fixes for all VLAs have been
> sent to maintainers (some are still under review/adjustment, but there
> aren't any unexplored cases left). My intention would be to have this land
> at the end of the next merge window after all the pending VLA patches
> have landed. I just wanted to get any feedback here, since it touches
> a couple areas in the process and I didn't want anyone to be surprised. :)
[]
> diff --git a/Makefile b/Makefile
[]
> @@ -778,6 +778,9 @@ NOSTDINC_FLAGS += -nostdinc -isystem $(shell $(CC) -print-file-name=include)
>  # warn about C99 declaration after statement
>  KBUILD_CFLAGS += $(call cc-option,-Wdeclaration-after-statement,)
>  
> +# VLAs should not be used anywhere in the kernel
> +KBUILD_CFLAGS += $(call cc-option,-Wvla)

I'd probably spell out what a VLA is here.
# VLAs (Variable Length Arrays) should not be used anywhere in the kernel

Beyond that, seems sensible, thanks.

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [RFC][PATCH] Makefile: globally enable VLA warning
@ 2018-06-26 20:21   ` Joe Perches
  0 siblings, 0 replies; 10+ messages in thread
From: Joe Perches @ 2018-06-26 20:21 UTC (permalink / raw)
  To: Kees Cook, linux-kernel
  Cc: Michal Marek, Matt Redfearn, David Airlie,
	Sebastian Andrzej Siewior, Gustavo A. R. Silva, dri-devel,
	Masahiro Yamada, Palmer Dabbelt, Andrew Morton, Linus Torvalds,
	intel-gfx, linux-kbuild

On Tue, 2018-06-26 at 10:40 -0700, Kees Cook wrote:
> This is the patch I've got prepared now that fixes for all VLAs have been
> sent to maintainers (some are still under review/adjustment, but there
> aren't any unexplored cases left). My intention would be to have this land
> at the end of the next merge window after all the pending VLA patches
> have landed. I just wanted to get any feedback here, since it touches
> a couple areas in the process and I didn't want anyone to be surprised. :)
[]
> diff --git a/Makefile b/Makefile
[]
> @@ -778,6 +778,9 @@ NOSTDINC_FLAGS += -nostdinc -isystem $(shell $(CC) -print-file-name=include)
>  # warn about C99 declaration after statement
>  KBUILD_CFLAGS += $(call cc-option,-Wdeclaration-after-statement,)
>  
> +# VLAs should not be used anywhere in the kernel
> +KBUILD_CFLAGS += $(call cc-option,-Wvla)

I'd probably spell out what a VLA is here.
# VLAs (Variable Length Arrays) should not be used anywhere in the kernel

Beyond that, seems sensible, thanks.
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [RFC][PATCH] Makefile: globally enable VLA warning
  2018-06-26 20:21   ` Joe Perches
  (?)
@ 2018-06-26 22:02     ` Kees Cook
  -1 siblings, 0 replies; 10+ messages in thread
From: Kees Cook @ 2018-06-26 22:02 UTC (permalink / raw)
  To: Joe Perches
  Cc: LKML, Gustavo A. R. Silva, Masahiro Yamada, Michal Marek,
	Andrew Morton, Palmer Dabbelt, Sebastian Andrzej Siewior,
	David Airlie, linux-kbuild, intel-gfx,
	Maling list - DRI developers, Linus Torvalds

On Tue, Jun 26, 2018 at 1:21 PM, Joe Perches <joe@perches.com> wrote:
> On Tue, 2018-06-26 at 10:40 -0700, Kees Cook wrote:
>> This is the patch I've got prepared now that fixes for all VLAs have been
>> sent to maintainers (some are still under review/adjustment, but there
>> aren't any unexplored cases left). My intention would be to have this land
>> at the end of the next merge window after all the pending VLA patches
>> have landed. I just wanted to get any feedback here, since it touches
>> a couple areas in the process and I didn't want anyone to be surprised. :)
> []
>> diff --git a/Makefile b/Makefile
> []
>> @@ -778,6 +778,9 @@ NOSTDINC_FLAGS += -nostdinc -isystem $(shell $(CC) -print-file-name=include)
>>  # warn about C99 declaration after statement
>>  KBUILD_CFLAGS += $(call cc-option,-Wdeclaration-after-statement,)
>>
>> +# VLAs should not be used anywhere in the kernel
>> +KBUILD_CFLAGS += $(call cc-option,-Wvla)
>
> I'd probably spell out what a VLA is here.
> # VLAs (Variable Length Arrays) should not be used anywhere in the kernel
>
> Beyond that, seems sensible, thanks.

Ah yes, good idea. I've made that change locally now. Thanks!

-Kees

-- 
Kees Cook
Pixel Security

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [RFC][PATCH] Makefile: globally enable VLA warning
@ 2018-06-26 22:02     ` Kees Cook
  0 siblings, 0 replies; 10+ messages in thread
From: Kees Cook @ 2018-06-26 22:02 UTC (permalink / raw)
  To: Joe Perches
  Cc: LKML, Gustavo A. R. Silva, Masahiro Yamada, Michal Marek,
	Andrew Morton, Palmer Dabbelt, Sebastian Andrzej Siewior,
	David Airlie, linux-kbuild, intel-gfx,
	Maling list - DRI developers, Linus Torvalds

On Tue, Jun 26, 2018 at 1:21 PM, Joe Perches <joe@perches.com> wrote:
> On Tue, 2018-06-26 at 10:40 -0700, Kees Cook wrote:
>> This is the patch I've got prepared now that fixes for all VLAs have been
>> sent to maintainers (some are still under review/adjustment, but there
>> aren't any unexplored cases left). My intention would be to have this land
>> at the end of the next merge window after all the pending VLA patches
>> have landed. I just wanted to get any feedback here, since it touches
>> a couple areas in the process and I didn't want anyone to be surprised. :)
> []
>> diff --git a/Makefile b/Makefile
> []
>> @@ -778,6 +778,9 @@ NOSTDINC_FLAGS += -nostdinc -isystem $(shell $(CC) -print-file-name=include)
>>  # warn about C99 declaration after statement
>>  KBUILD_CFLAGS += $(call cc-option,-Wdeclaration-after-statement,)
>>
>> +# VLAs should not be used anywhere in the kernel
>> +KBUILD_CFLAGS += $(call cc-option,-Wvla)
>
> I'd probably spell out what a VLA is here.
> # VLAs (Variable Length Arrays) should not be used anywhere in the kernel
>
> Beyond that, seems sensible, thanks.

Ah yes, good idea. I've made that change locally now. Thanks!

-Kees

-- 
Kees Cook
Pixel Security

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [RFC][PATCH] Makefile: globally enable VLA warning
@ 2018-06-26 22:02     ` Kees Cook
  0 siblings, 0 replies; 10+ messages in thread
From: Kees Cook @ 2018-06-26 22:02 UTC (permalink / raw)
  To: Joe Perches
  Cc: Michal Marek, Gustavo A. R. Silva, David Airlie,
	Sebastian Andrzej Siewior, linux-kbuild, LKML,
	Maling list - DRI developers, Masahiro Yamada, Palmer Dabbelt,
	Andrew Morton, Linus Torvalds, intel-gfx

On Tue, Jun 26, 2018 at 1:21 PM, Joe Perches <joe@perches.com> wrote:
> On Tue, 2018-06-26 at 10:40 -0700, Kees Cook wrote:
>> This is the patch I've got prepared now that fixes for all VLAs have been
>> sent to maintainers (some are still under review/adjustment, but there
>> aren't any unexplored cases left). My intention would be to have this land
>> at the end of the next merge window after all the pending VLA patches
>> have landed. I just wanted to get any feedback here, since it touches
>> a couple areas in the process and I didn't want anyone to be surprised. :)
> []
>> diff --git a/Makefile b/Makefile
> []
>> @@ -778,6 +778,9 @@ NOSTDINC_FLAGS += -nostdinc -isystem $(shell $(CC) -print-file-name=include)
>>  # warn about C99 declaration after statement
>>  KBUILD_CFLAGS += $(call cc-option,-Wdeclaration-after-statement,)
>>
>> +# VLAs should not be used anywhere in the kernel
>> +KBUILD_CFLAGS += $(call cc-option,-Wvla)
>
> I'd probably spell out what a VLA is here.
> # VLAs (Variable Length Arrays) should not be used anywhere in the kernel
>
> Beyond that, seems sensible, thanks.

Ah yes, good idea. I've made that change locally now. Thanks!

-Kees

-- 
Kees Cook
Pixel Security
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2018-06-26 22:02 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-06-26 17:40 [RFC][PATCH] Makefile: globally enable VLA warning Kees Cook
2018-06-26 17:40 ` Kees Cook
2018-06-26 18:03 ` ✗ Fi.CI.SPARSE: warning for " Patchwork
2018-06-26 18:21 ` ✓ Fi.CI.BAT: success " Patchwork
2018-06-26 20:00 ` ✗ Fi.CI.IGT: failure " Patchwork
2018-06-26 20:21 ` [RFC][PATCH] " Joe Perches
2018-06-26 20:21   ` Joe Perches
2018-06-26 22:02   ` Kees Cook
2018-06-26 22:02     ` Kees Cook
2018-06-26 22:02     ` Kees Cook

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.