Skip to contentSkip to conversation

lib: fortify_kunit: build without structleak plugin

PATCH Anders Roxell 2 participants 2 messages Nov 28, 2022 – Dec 1, 2022 2 messages not in the archive

lore
Share & tools
lore
#2 lore raw
In reply to a message not in the archive
Quoted 8 lines · Kees Cook
Quoted 4 lines · Anders Roxell

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

lib/fortify_kunit.c:140:1: error: the frame size of 2368 bytes is larger than 2048 bytes [-Werror=frame-larger-than=]

Under what config

I saw this with a arm64 allmodconfig build [1],

Quoted 1 line

and compiler version do you see these warnings?

Toolchain
aarch64-linux-gnu-gcc (Debian 11.3.0-6) 11.3.0

Cheers,
Anders
[1] http://ix.io/4h6w

Quoted 28 lines

-Kees

Quoted 15 lines

Turn off the structleak plugin checks for fortify_kunit.

---
lib/Makefile | 1 +

1 file changed, 1 insertion(+)
lib/Makefile +0 -0
index bdb1552cbe9c..aab32082564a 100644
@@ -382,6 +382,7 @@ obj-$(CONFIG_OVERFLOW_KUNIT_TEST) += overflow_kunit.o
 CFLAGS_stackinit_kunit.o += $(call cc-disable-warning, switch-unreachable)
Quoted 6 lines

obj-$(CONFIG_STACKINIT_KUNIT_TEST) += stackinit_kunit.o CFLAGS_fortify_kunit.o += $(call cc-disable-warning, unsequenced) +CFLAGS_fortify_kunit.o += $(DISABLE_STRUCTLEAK_PLUGIN) obj-$(CONFIG_FORTIFY_KUNIT_TEST) += fortify_kunit.o obj-$(CONFIG_STRSCPY_KUNIT_TEST) += strscpy_kunit.o obj-$(CONFIG_SIPHASH_KUNIT_TEST) += siphash_kunit.o

--
Kees Cook

#3 lore raw
Quoted 7 lines · Anders Roxell
Quoted 6 lines · Kees Cook
Quoted 4 lines · Anders Roxell

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

lib/fortify_kunit.c:140:1: error: the frame size of 2368 bytes is larger than 2048 bytes [-Werror=frame-larger-than=]

(It seems like lkml never got this email? Or at least I didn't find it on lore, so "b4" was unhappy...)

Quoted 8 lines
Quoted 1 line

Under what config

I saw this with a arm64 allmodconfig build [1],

Quoted 1 line

and compiler version do you see these warnings?

Toolchain
aarch64-linux-gnu-gcc (Debian 11.3.0-6) 11.3.0

Thanks! I've applied this to my tree.

Signature · 1 line
Kees Cook