mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Nikolay Borisov <n.borisov.lkml@gmail.com>
To: Randy Dunlap <rdunlap@infradead.org>, linux-kbuild@vger.kernel.org
Cc: LKML <linux-kernel@vger.kernel.org>,
	yann.morin.1998@free.fr, mmarek@suse.com
Subject: Re: default 0 if KASAN expression not working in kbuild
Date: Fri, 16 Dec 2016 09:50:35 +0200	[thread overview]
Message-ID: <a7a212c3-02f6-ce32-07fc-f073b2080ff8@gmail.com> (raw)
In-Reply-To: <18825051-61d0-e8a9-544a-4f7d89f30b3c@infradead.org>



On 15.12.2016 23:32, Randy Dunlap wrote:
> On 12/15/16 10:09, Nikolay Borisov wrote:
>> Hello,
>>
>> I was doing some kasan-related debugging and when I enabled it I started
>> getting warnings for large stackframes. So CONFIG_FRAME_WARN has :
>>
>> int "Warn for stack frames larger than (needs gcc 4.4)"
>>     range 0 8192
>>     default 0 if KASAN
>>     default 2048 if GCC_PLUGIN_LATENT_ENTROPY
>>     default 1024 if !64BIT
>>     default 2048 if 64BIT
>>
>> This means that frame_warns should effectively be disabled when kasan is
>> enabled. However in my case this is not the situation.
>> http://sprunge.us/FiGf here is the config file. It does have
>> CONFIG_KASAN=y and CONFIG_FRAME_WARN=1024 . And even this is erroneous
>> since it's a 64bit kernel, so it should be 2k. I haven't manually set
>> the limit to 1k either.
> 
> Yeah, it set FRAME_WARN=1024 for me also.
> 
> It seems to be dependent on order of kconfig symbols in
> lib/Kconfig.debug.
> 
> If I move the line:
>   source "lib/Kconfig.kasan"
> to just after this line:
>   menu "Compile-time checks and compiler options"
> it seems to work for me.
> 
> Can you test the patch below?

This patch has another problem that if I move the source line then I no
longer get the kasan option in Memory Debugging section, furthermore the
frame_warn wasn't changed either.


> 

  reply	other threads:[~2016-12-16  7:50 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-12-15 18:09 Nikolay Borisov
2016-12-15 21:32 ` Randy Dunlap
2016-12-16  7:50   ` Nikolay Borisov [this message]
2016-12-16  7:53     ` Nikolay Borisov
2016-12-19 10:57 ` Michal Marek

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=a7a212c3-02f6-ce32-07fc-f073b2080ff8@gmail.com \
    --to=n.borisov.lkml@gmail.com \
    --cc=linux-kbuild@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mmarek@suse.com \
    --cc=rdunlap@infradead.org \
    --cc=yann.morin.1998@free.fr \
    /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®