Skip to contentSkip to conversation

kernel: kcsan: kcsan_test: build without structleak plugin

PATCH In review Anders Roxell 2 participants 2 messages Nov 28, 2022 KCSAN

lore
Share & tools
lore
#0 lore raw

PATCH 1/2 kernel: kcsan: kcsan_test: build without structleak plugin

Building kcsan_test with strucleak plugin enabled makes the stack frame size to grow.

kernel/kcsan/kcsan_test.c:704:1: error: the frame size of 3296 bytes is larger than 2048 bytes [-Werror=frame-larger-than=]

Turn off the structleak plugin checks for kcsan_test.

---
 kernel/kcsan/Makefile | 1 +
 1 file changed, 1 insertion(+)
kernel/kcsan/Makefile +1 -0
index 4f35d1bced6a..8cf70f068d92 100644
@@ -17,4 +17,5 @@ KCSAN_INSTRUMENT_BARRIERS_selftest.o := y
 obj-$(CONFIG_KCSAN_SELFTEST) += selftest.o
 
 CFLAGS_kcsan_test.o := $(CFLAGS_KCSAN) -g -fno-omit-frame-pointer
+CFLAGS_kcsan_test.o += $(DISABLE_STRUCTLEAK_PLUGIN)
 obj-$(CONFIG_KCSAN_KUNIT_TEST) += kcsan_test.o
Signature · 1 line
2.35.1
maintainer Acked-by on v1 1/2
#1 lore raw
Quoted 10 lines · Anders Roxell

Building kcsan_test with strucleak plugin enabled makes the stack frame size to grow.

kernel/kcsan/kcsan_test.c:704:1: error: the frame size of 3296 bytes is larger than 2048 bytes [-Werror=frame-larger-than=]

Turn off the structleak plugin checks for kcsan_test.

Quoted 17 lines
---
 kernel/kcsan/Makefile | 1 +
 1 file changed, 1 insertion(+)
kernel/kcsan/Makefile +1 -1
index 4f35d1bced6a..8cf70f068d92 100644
@@ -17,4 +17,5 @@ KCSAN_INSTRUMENT_BARRIERS_selftest.o := y
 obj-$(CONFIG_KCSAN_SELFTEST) += selftest.o
 
 CFLAGS_kcsan_test.o := $(CFLAGS_KCSAN) -g -fno-omit-frame-pointer
+CFLAGS_kcsan_test.o += $(DISABLE_STRUCTLEAK_PLUGIN)
 obj-$(CONFIG_KCSAN_KUNIT_TEST) += kcsan_test.o
--

2.35.1