We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 08e4044 commit df8fc4eCopy full SHA for df8fc4e
Makefile
@@ -1026,6 +1026,12 @@ KBUILD_CFLAGS += -Wno-pointer-sign
1026
# globally built with -Wcast-function-type.
1027
KBUILD_CFLAGS += $(call cc-option, -Wcast-function-type)
1028
1029
+# To gain proper coverage for CONFIG_UBSAN_BOUNDS and CONFIG_FORTIFY_SOURCE,
1030
+# the kernel uses only C99 flexible arrays for dynamically sized trailing
1031
+# arrays. Enforce this for everything that may examine structure sizes and
1032
+# perform bounds checking.
1033
+KBUILD_CFLAGS += $(call cc-option, -fstrict-flex-arrays=3)
1034
+
1035
# disable stringop warnings in gcc 8+
1036
KBUILD_CFLAGS += $(call cc-disable-warning, stringop-truncation)
1037
0 commit comments