Skip to content

Commit 5abf698

Browse files
roxellkees
authored andcommitted
lib: fortify_kunit: build without structleak plugin
Building allmodconfig with aarch64-linux-gnu-gcc (Debian 11.3.0-6), fortify_kunit with strucleak plugin enabled makes the stack frame size to grow too large: lib/fortify_kunit.c:140:1: error: the frame size of 2368 bytes is larger than 2048 bytes [-Werror=frame-larger-than=] Turn off the structleak plugin checks for fortify_kunit. Suggested-by: Arnd Bergmann <[email protected]> Signed-off-by: Anders Roxell <[email protected]> Signed-off-by: Kees Cook <[email protected]>
1 parent 8b05aa2 commit 5abf698

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

lib/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -379,6 +379,7 @@ obj-$(CONFIG_OVERFLOW_KUNIT_TEST) += overflow_kunit.o
379379
CFLAGS_stackinit_kunit.o += $(call cc-disable-warning, switch-unreachable)
380380
obj-$(CONFIG_STACKINIT_KUNIT_TEST) += stackinit_kunit.o
381381
CFLAGS_fortify_kunit.o += $(call cc-disable-warning, unsequenced)
382+
CFLAGS_fortify_kunit.o += $(DISABLE_STRUCTLEAK_PLUGIN)
382383
obj-$(CONFIG_FORTIFY_KUNIT_TEST) += fortify_kunit.o
383384
obj-$(CONFIG_STRSCPY_KUNIT_TEST) += strscpy_kunit.o
384385
obj-$(CONFIG_SIPHASH_KUNIT_TEST) += siphash_kunit.o

0 commit comments

Comments
 (0)