[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20151016164700.GC15102@tassilo.jf.intel.com>
Date: Fri, 16 Oct 2015 09:47:00 -0700
From: Andi Kleen <ak@...ux.intel.com>
To: Andrey Ryabinin <aryabinin@...tuozzo.com>
Cc: linux-kernel@...r.kernel.org, Ingo Molnar <mingo@...nel.org>,
Andrew Morton <akpm@...ux-foundation.org>,
Fengguang Wu <fengguang.wu@...el.com>,
Mauro Carvalho Chehab <m.chehab@...sung.com>,
Kozlov Sergey <serjk@...up.ru>, kbuild-all@...org,
linux-media@...r.kernel.org, Abylay Ospan <aospan@...up.ru>
Subject: Re: [PATCH] Disable -Wframe-larger-than warnings with KASAN=y
On Fri, Oct 16, 2015 at 07:02:10PM +0300, Andrey Ryabinin wrote:
> 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.
If KASAN is really bloating the stack that much you may need to consider
increasing the stack size with KASAN on. We have 16K now, but even that
may not be enough if you more than double it.
Otherwise it may just crash with KASAN on in more complex setups.
-Andi
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists