From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756940AbcLPHur (ORCPT ); Fri, 16 Dec 2016 02:50:47 -0500 Received: from mail-wm0-f66.google.com ([74.125.82.66]:36033 "EHLO mail-wm0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752428AbcLPHuj (ORCPT ); Fri, 16 Dec 2016 02:50:39 -0500 Subject: Re: default 0 if KASAN expression not working in kbuild To: Randy Dunlap , linux-kbuild@vger.kernel.org References: <18825051-61d0-e8a9-544a-4f7d89f30b3c@infradead.org> Cc: LKML , yann.morin.1998@free.fr, mmarek@suse.com From: Nikolay Borisov Message-ID: Date: Fri, 16 Dec 2016 09:50:35 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.5.1 MIME-Version: 1.0 In-Reply-To: <18825051-61d0-e8a9-544a-4f7d89f30b3c@infradead.org> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.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. >