From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932603AbbJPQrD (ORCPT ); Fri, 16 Oct 2015 12:47:03 -0400 Received: from mga03.intel.com ([134.134.136.65]:27557 "EHLO mga03.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753920AbbJPQrB (ORCPT ); Fri, 16 Oct 2015 12:47:01 -0400 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.17,689,1437462000"; d="scan'208";a="665841032" Date: Fri, 16 Oct 2015 09:47:00 -0700 From: Andi Kleen To: Andrey Ryabinin Cc: linux-kernel@vger.kernel.org, Ingo Molnar , Andrew Morton , Fengguang Wu , Mauro Carvalho Chehab , Kozlov Sergey , kbuild-all@01.org, linux-media@vger.kernel.org, Abylay Ospan Subject: Re: [PATCH] Disable -Wframe-larger-than warnings with KASAN=y Message-ID: <20151016164700.GC15102@tassilo.jf.intel.com> References: <20151005110923.GA16831@wfg-t540p.sh.intel.com> <1445011330-22698-1-git-send-email-aryabinin@virtuozzo.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <1445011330-22698-1-git-send-email-aryabinin@virtuozzo.com> User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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