lkml.org 
[lkml]   [2020]   [Nov]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH RFC v2 04/21] kasan: unpoison stack only with CONFIG_KASAN_STACK
On Mon, Nov 16, 2020 at 1:42 PM Vincenzo Frascino
<vincenzo.frascino@arm.com> wrote:
>
> >>>>
> >>>> Not sure why we did this instead of the following, but okay.
> >>>>
> >>>> config KASAN_STACK
> >>>> - int
> >>>> - default 1 if KASAN_STACK_ENABLE || CC_IS_GCC
> >>>> - default 0
> >>>> + bool
> >>>> + default y if KASAN_STACK_ENABLE || CC_IS_GCC
> >>>> + default n
> >>>
> >>> I wondered the same, but then looking at scripts/Makefile.kasan I
> >>> think it's because we directly pass it to the compiler:
> >>> ...
> >>> $(call cc-param,asan-stack=$(CONFIG_KASAN_STACK)) \
> >>> ...
> >>
> >> Try this instead:
> >>
> >> $(call cc-param,asan-stack=$(if $(CONFIG_KASAN_STACK),1,0)) \
> >
> >
> > We could have just 1 config instead of 2 as well.
> > For gcc we could do no prompt and default value y, and for clang --
> > prompt and default value n. I think it should do what we need.
> >
>
> I agree with Catalin's proposal since it should simplify things.
>
> Nit: 'default n' is the default hence I do not think it should be required
> explicitly.

Fixing this sounds like a good idea, but perhaps not as a part of this
series, to not overinflate it even further.

I've filed a bug for this: https://bugzilla.kernel.org/show_bug.cgi?id=210221

\
 
 \ /
  Last update: 2020-11-16 14:55    [W:0.059 / U:0.688 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site