From: Andrey Ryabinin <aryabinin@virtuozzo.com>
To: Arnd Bergmann <arnd@arndb.de>
Cc: Andrey Konovalov <andreyknvl@google.com>,
Masahiro Yamada <yamada.masahiro@socionext.com>,
Michal Marek <michal.lkml@markovi.net>,
Andrew Morton <akpm@linux-foundation.org>,
Dmitry Vyukov <dvyukov@google.com>,
Nick Desaulniers <ndesaulniers@google.com>,
Mark Brown <broonie@kernel.org>, Qian Cai <cai@lca.pw>,
Alexander Potapenko <glider@google.com>,
Martin Schwidefsky <schwidefsky@de.ibm.com>,
Christoph Lameter <cl@linux.com>,
LKML <linux-kernel@vger.kernel.org>,
Linux Kbuild mailing list <linux-kbuild@vger.kernel.org>,
kasan-dev <kasan-dev@googlegroups.com>
Subject: Re: [PATCH] kasan: turn off asan-stack for clang-8 and earlier
Date: Thu, 21 Feb 2019 19:14:30 +0300 [thread overview]
Message-ID: <8e29f564-88e1-90b0-948c-d2fb52db29b9@virtuozzo.com> (raw)
In-Reply-To: <CAK8P3a0UXcQKgoGYT0gVQynZLpL-ozK6EtA0Q4CaiGYDmxf8ZA@mail.gmail.com>
On 2/21/19 6:19 PM, Arnd Bergmann wrote:
> On Thu, Feb 21, 2019 at 11:06 AM Andrey Ryabinin
> <aryabinin@virtuozzo.com> wrote:
>> On 2/20/19 8:35 PM, Arnd Bergmann wrote:
>>> On Wed, Feb 20, 2019 at 6:00 PM Andrey Ryabinin <aryabinin@virtuozzo.com> wrote:
>>>> On 2/20/19 5:51 PM, Arnd Bergmann wrote:
>
>>> Maybe bringing it back would be a compromise? That way it's hidden from
>>> all the build testing bots (because of the !CONFIG_COMPILE_TEST dependency),
>>> but anyone who really wants it can still have the option, and set
>>> CONFIG_FRAME_WARN
>>> to whichever value they like.
>>>
>>
>>
>> I think there is much simpler solution:
>>
>> ---
>> lib/Kconfig.kasan | 2 ++
>> 1 file changed, 2 insertions(+)
>>
>> diff --git a/lib/Kconfig.kasan b/lib/Kconfig.kasan
>> index 219cddc913ac..6cd035f06cee 100644
>> --- a/lib/Kconfig.kasan
>> +++ b/lib/Kconfig.kasan
>> @@ -105,6 +105,8 @@ endchoice
>>
>> config KASAN_STACK
>> int
>> + range 0 1
>> + prompt "Enable stack instrumentation (unsafe)" if CC_IS_CLANG && (CLANG_VERSION < 90000)
>> default 0 if CC_IS_CLANG && (CLANG_VERSION < 90000)
>> default 1
>> help
>> --
>>
>>
>> AFAIK, randconfig is not able to randomize int config options, so it will be disabled for build robots,
>> but users still will be able to enable it.
>
> Right, this will work, but I find it a bit awkward to require users to
> enter 0 or 1.
>
> My assumption is that build bots turn on CONFIG_COMPILE_TEST, so
> having a bool option that depends on COMPILE_TEST would be more
> conventional. We can debate whether it should also depend on
> CONFIG_EXPERT or not. Something like
>
> config KASAN_STACK
> bool "Enable stack instrumentation (unsafe)" if CC_IS_CLANG
> && !COMPILE_TEST
> default CC_IS_GCC || (CLANG_VERSION >= 90000)
>
> And then a simpler Makefile logic (could also be done in Kconfig) to turn
> that bool symbol into an integer argument for asan-stack=
>
Sounds good.
prev parent reply other threads:[~2019-02-21 16:14 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-02-19 21:49 Arnd Bergmann
2019-02-19 22:17 ` Qian Cai
2019-02-19 22:43 ` Nick Desaulniers
2019-02-20 0:33 ` Kostya Serebryany
2019-02-20 1:25 ` Qian Cai
2019-02-20 6:44 ` Dmitry Vyukov
2019-02-20 9:19 ` Arnd Bergmann
2019-02-20 14:44 ` Andrey Konovalov
2019-02-20 14:51 ` Arnd Bergmann
2019-02-20 17:00 ` Andrey Ryabinin
2019-02-20 17:35 ` Arnd Bergmann
2019-02-20 18:07 ` Nick Desaulniers
2019-02-20 18:44 ` Mark Brown
2019-02-20 20:02 ` Nick Desaulniers
2019-02-20 21:13 ` Arnd Bergmann
2019-02-20 21:40 ` Arnd Bergmann
2019-02-20 22:12 ` Kostya Serebryany
2019-02-20 23:46 ` Kostya Serebryany
2019-02-21 17:19 ` Arnd Bergmann
2019-02-21 10:06 ` Andrey Ryabinin
2019-02-21 15:19 ` Arnd Bergmann
2019-02-21 16:14 ` Andrey Ryabinin [this message]
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=8e29f564-88e1-90b0-948c-d2fb52db29b9@virtuozzo.com \
--to=aryabinin@virtuozzo.com \
--cc=akpm@linux-foundation.org \
--cc=andreyknvl@google.com \
--cc=arnd@arndb.de \
--cc=broonie@kernel.org \
--cc=cai@lca.pw \
--cc=cl@linux.com \
--cc=dvyukov@google.com \
--cc=glider@google.com \
--cc=kasan-dev@googlegroups.com \
--cc=linux-kbuild@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=michal.lkml@markovi.net \
--cc=ndesaulniers@google.com \
--cc=schwidefsky@de.ibm.com \
--cc=yamada.masahiro@socionext.com \
/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®