linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Andrey Konovalov <andreyknvl@google.com>
To: Arnd Bergmann <arnd@kernel.org>
Cc: Walter Wu <walter-zh.wu@mediatek.com>,
	Arnd Bergmann <arnd@arndb.de>,
	 Andrey Ryabinin <aryabinin@virtuozzo.com>,
	Alexander Potapenko <glider@google.com>,
	 Dmitry Vyukov <dvyukov@google.com>,
	Andrew Morton <akpm@linux-foundation.org>,
	 Nathan Chancellor <natechancellor@gmail.com>,
	kasan-dev <kasan-dev@googlegroups.com>,
	 Linux Memory Management List <linux-mm@kvack.org>,
	LKML <linux-kernel@vger.kernel.org>,
	 Linux ARM <linux-arm-kernel@lists.infradead.org>,
	 wsd_upstream <wsd_upstream@mediatek.com>,
	 "moderated list:ARM/Mediatek SoC..."
	<linux-mediatek@lists.infradead.org>
Subject: Re: [PATCH v3] kasan: remove redundant config option
Date: Mon, 11 Jan 2021 18:40:07 +0100	[thread overview]
Message-ID: <CAAeHK+zB0=eBgrWTxcUK8GkxmUAn-W44NWDFE4zEB79CxVpwXg@mail.gmail.com> (raw)
In-Reply-To: <CAK8P3a3FakV-Y9xkoy_fpYKBNkMvcO7DPOQC8R7ku7yPcgDw3g@mail.gmail.com>

On Fri, Jan 8, 2021 at 9:31 PM Arnd Bergmann <arnd@kernel.org> wrote:
>
> 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>

Got it, thanks!

> 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?

Not sure :(

I've filed this on KASAN bugzilla to not forget:
https://bugzilla.kernel.org/show_bug.cgi?id=211139


  reply	other threads:[~2021-01-11 17:40 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-08  4:09 Walter Wu
2021-01-08  4:16 ` Nathan Chancellor
2021-01-08 18:56 ` Andrey Konovalov
2021-01-08 20:30   ` Arnd Bergmann
2021-01-11 17:40     ` Andrey Konovalov [this message]
2021-01-11 17:49 ` Andrey Konovalov
2021-01-11 18:59   ` Nathan Chancellor
2021-01-11 19:03     ` Andrey Konovalov
2021-01-11 19:11       ` Nathan Chancellor
2021-01-11 19:30         ` Andrey Konovalov
2021-01-11 19:30 ` Andrey Konovalov

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='CAAeHK+zB0=eBgrWTxcUK8GkxmUAn-W44NWDFE4zEB79CxVpwXg@mail.gmail.com' \
    --to=andreyknvl@google.com \
    --cc=akpm@linux-foundation.org \
    --cc=arnd@arndb.de \
    --cc=arnd@kernel.org \
    --cc=aryabinin@virtuozzo.com \
    --cc=dvyukov@google.com \
    --cc=glider@google.com \
    --cc=kasan-dev@googlegroups.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mediatek@lists.infradead.org \
    --cc=linux-mm@kvack.org \
    --cc=natechancellor@gmail.com \
    --cc=walter-zh.wu@mediatek.com \
    --cc=wsd_upstream@mediatek.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