[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAK8P3a0z7Y-uLgc8pWrdt712ic4R2nLbceg_zTCAC=ctG9LK9Q@mail.gmail.com>
Date: Wed, 20 Feb 2019 22:40:29 +0100
From: Arnd Bergmann <arnd@...db.de>
To: Nick Desaulniers <ndesaulniers@...gle.com>
Cc: Mark Brown <broonie@...nel.org>,
Kostya Serebryany <kcc@...gle.com>,
Evgenii Stepanov <eugenis@...gle.com>,
Andrey Ryabinin <aryabinin@...tuozzo.com>,
Andrey Konovalov <andreyknvl@...gle.com>,
Masahiro Yamada <yamada.masahiro@...ionext.com>,
Michal Marek <michal.lkml@...kovi.net>,
Andrew Morton <akpm@...ux-foundation.org>,
Dmitry Vyukov <dvyukov@...gle.com>, Qian Cai <cai@....pw>,
Alexander Potapenko <glider@...gle.com>,
Martin Schwidefsky <schwidefsky@...ibm.com>,
Christoph Lameter <cl@...ux.com>,
LKML <linux-kernel@...r.kernel.org>,
Linux Kbuild mailing list <linux-kbuild@...r.kernel.org>,
kasan-dev <kasan-dev@...glegroups.com>
Subject: Re: [PATCH] kasan: turn off asan-stack for clang-8 and earlier
On Wed, Feb 20, 2019 at 10:13 PM Arnd Bergmann <arnd@...db.de> wrote:
>
> In the example in https://bugs.llvm.org/show_bug.cgi?id=38809#c12
> (https://godbolt.org/z/ylsGSQ) there is no inlining, yet clang uses
> over ten times as much stack space as gcc, for reasons I still
> can't explain. My assumption right now is that the underlying bug
> causes most of the problems with excessive stack usage in
> allmodconfig kernels.
Here is an even more minimal example:
struct s { int i[5]; } f(void);
void g(void) { f(); f();}
https://godbolt.org/z/d_KWkh
It's clear that clang does /something/ here when asan-stack=1 is
set, but I fail to see what it is, or why that is necessary.
The output of clang with asan-stack=0 is the expected
code, and basically identical to what gcc produces with or
without asan-stack.
Arnd
Powered by blists - more mailing lists