lkml.org 
[lkml]   [2021]   [Jan]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    From
    Date
    SubjectRe: [PATCH v3] kasan: remove redundant config option
    On Fri, Jan 8, 2021 at 7:56 PM Andrey Konovalov <andreyknvl@google.com> wrote:
    > On Fri, Jan 8, 2021 at 5:09 AM Walter Wu <walter-zh.wu@mediatek.com> wrote:

    > > @@ -2,6 +2,12 @@
    > > CFLAGS_KASAN_NOSANITIZE := -fno-builtin
    > > KASAN_SHADOW_OFFSET ?= $(CONFIG_KASAN_SHADOW_OFFSET)
    > >
    > > +ifdef CONFIG_KASAN_STACK
    > > + stack_enable := 1
    > > +else
    > > + stack_enable := 0
    > > +endif
    > > +
    >
    > AFAIR, Arnd wanted to avoid having KASAN_STACK to be enabled by
    > default when compiling with Clang, since Clang instrumentation leads
    > to very large kernel stacks, which, in turn, lead to compile-time
    > warnings. What I don't remember is why there are two configs.
    >
    > Arnd, is that correct? What was the reason behind having two configs?

    I think I just considered it cleaner than defining the extra variable in the
    Makefile at the time, as this was the only place that referenced
    CONFIG_KASAN_STACK.

    The '#if CONFIG_KASAN_STACK' (rather than #ifdef) that got added
    later do make my version more confusing though, so I agree that
    Walter's second patch improves it.

    Acked-by: Arnd Bergmann <arnd@arndb.de>

    On a related note: do you have any hope that clang will ever fix
    https://bugs.llvm.org/show_bug.cgi?id=38809 and KASAN_STACK
    can be enabled by default on clang without risking stack
    overflows?

    Arnd

    \
     
     \ /
      Last update: 2021-01-08 21:33    [W:4.121 / U:0.176 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site