linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/2] kernel: kcsan: kcsan_test: build without structleak plugin
@ 2022-11-28 10:43 Anders Roxell
  2022-11-28 14:27 ` Marco Elver
  0 siblings, 1 reply; 2+ messages in thread
From: Anders Roxell @ 2022-11-28 10:43 UTC (permalink / raw)
  To: elver
  Cc: kasan-dev, linux-kernel, akpm, keescook, davidgow, Jason,
	Anders Roxell, Arnd Bergmann

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.

Suggested-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Anders Roxell <anders.roxell@linaro.org>
---
 kernel/kcsan/Makefile | 1 +
 1 file changed, 1 insertion(+)

diff --git a/kernel/kcsan/Makefile b/kernel/kcsan/Makefile
index 4f35d1bced6a..8cf70f068d92 100644
--- a/kernel/kcsan/Makefile
+++ b/kernel/kcsan/Makefile
@@ -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


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

* Re: [PATCH 1/2] kernel: kcsan: kcsan_test: build without structleak plugin
  2022-11-28 10:43 [PATCH 1/2] kernel: kcsan: kcsan_test: build without structleak plugin Anders Roxell
@ 2022-11-28 14:27 ` Marco Elver
  0 siblings, 0 replies; 2+ messages in thread
From: Marco Elver @ 2022-11-28 14:27 UTC (permalink / raw)
  To: Anders Roxell
  Cc: kasan-dev, linux-kernel, akpm, keescook, davidgow, Jason, Arnd Bergmann

On Mon, 28 Nov 2022 at 11:44, Anders Roxell <anders.roxell@linaro.org> wrote:
>
> 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.
>
> Suggested-by: Arnd Bergmann <arnd@arndb.de>
> Signed-off-by: Anders Roxell <anders.roxell@linaro.org>

Acked-by: Marco Elver <elver@google.com>

> ---
>  kernel/kcsan/Makefile | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/kernel/kcsan/Makefile b/kernel/kcsan/Makefile
> index 4f35d1bced6a..8cf70f068d92 100644
> --- a/kernel/kcsan/Makefile
> +++ b/kernel/kcsan/Makefile
> @@ -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
>

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

end of thread, other threads:[~2022-11-28 14:28 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-11-28 10:43 [PATCH 1/2] kernel: kcsan: kcsan_test: build without structleak plugin Anders Roxell
2022-11-28 14:27 ` Marco Elver

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).