Re: [PATCH RFC v2 04/21] kasan: unpoison stack only with CONFIG_KASAN_STACK

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Nov 16, 2020 at 1:42 PM Vincenzo Frascino
<vincenzo.frascino@xxxxxxx> 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




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux