mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Andi Kleen <ak@linux.intel.com>
To: Andrey Ryabinin <aryabinin@virtuozzo.com>
Cc: linux-kernel@vger.kernel.org, Ingo Molnar <mingo@kernel.org>,
	Andrew Morton <akpm@linux-foundation.org>,
	Fengguang Wu <fengguang.wu@intel.com>,
	Mauro Carvalho Chehab <m.chehab@samsung.com>,
	Kozlov Sergey <serjk@netup.ru>,
	kbuild-all@01.org, linux-media@vger.kernel.org,
	Abylay Ospan <aospan@netup.ru>
Subject: Re: [PATCH] Disable -Wframe-larger-than warnings with KASAN=y
Date: Fri, 16 Oct 2015 09:47:00 -0700	[thread overview]
Message-ID: <20151016164700.GC15102@tassilo.jf.intel.com> (raw)
In-Reply-To: <1445011330-22698-1-git-send-email-aryabinin@virtuozzo.com>

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

  parent reply	other threads:[~2015-10-16 16:47 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CAK3bHNWkeakZP0cEi+U=GjmPa0jN9qWC4seyS6+ih8inzvmbXQ@mail.gmail.com>
2015-10-05 11:09 ` [kbuild-all] drivers/media/dvb-frontends/cxd2841er.c:2393:1: warning: the frame size of 2992 bytes is larger than 2048 bytes Fengguang Wu
2015-10-05 12:10   ` Andrey Ryabinin
2015-10-16 16:02   ` [PATCH] Disable -Wframe-larger-than warnings with KASAN=y Andrey Ryabinin
2015-10-16 16:05     ` Abylay Ospan
2015-10-16 16:47     ` Andi Kleen [this message]
2015-10-16 17:19       ` Andrey Ryabinin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20151016164700.GC15102@tassilo.jf.intel.com \
    --to=ak@linux.intel.com \
    --cc=akpm@linux-foundation.org \
    --cc=aospan@netup.ru \
    --cc=aryabinin@virtuozzo.com \
    --cc=fengguang.wu@intel.com \
    --cc=kbuild-all@01.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=m.chehab@samsung.com \
    --cc=mingo@kernel.org \
    --cc=serjk@netup.ru \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®