From: Andrey Ryabinin Date: Thu, 22 Oct 2015 20:32:24 +0000 (-0700) Subject: lib/Kconfig.debug: disable -Wframe-larger-than warnings with KASAN=y X-Git-Tag: submit/tizen/20170203.054341~3 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=refs%2Fchanges%2F16%2F110816%2F1;p=platform%2Fkernel%2Flinux-exynos.git lib/Kconfig.debug: disable -Wframe-larger-than warnings with KASAN=y When the kernel compiled with KASAN=y, GCC adds redzones for each variable on stack. This enlarges function's stack frame and causes: 'warning: the frame size of X bytes is larger than Y bytes' The worst case I've seen for now is following: ../net/wireless/nl80211.c: In function `nl80211_send_wiphy': ../net/wireless/nl80211.c:1731:1: warning: the frame size of 5448 bytes is larger than 2048 bytes [-Wframe-larger-than=] That kind of warning becomes useless with KASAN=y. It doesn't necessarily indicate that there is some problem in the code, thus we should turn it off. (The KASAN=y stack size in increased from 16k to 32k for this reason) Signed-off-by: Andrey Ryabinin Reported-by: Fengguang Wu Acked-by: Abylay Ospan Cc: Andi Kleen Cc: Ingo Molnar Cc: Mauro Carvalho Chehab Cc: Kozlov Sergey Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [Backport from mainline to remove build warning from KASAN option with GCC 6] Signed-off-by: Seung-Woo Kim Change-Id: I765080564f7b312fd48988b2f70aaa6f9b2eb71c --- diff --git a/lib/Kconfig.debug b/lib/Kconfig.debug index 1bc4922f4a33..ef4a68c60a8a 100644 --- a/lib/Kconfig.debug +++ b/lib/Kconfig.debug @@ -197,6 +197,7 @@ config ENABLE_MUST_CHECK config FRAME_WARN int "Warn for stack frames larger than (needs gcc 4.4)" range 0 8192 + default 0 if KASAN default 1024 if !64BIT default 2048 if 64BIT help