lkml.org 
[lkml]   [2019]   [Jan]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] kasan: Remove use after scope bugs detection.
On Fri, Jan 11, 2019 at 09:58:42PM +0300, Andrey Ryabinin wrote:
> Use after scope bugs detector seems to be almost entirely useless
> for the linux kernel. It exists over two years, but I've seen only
> one valid bug so far [1]. And the bug was fixed before it has been
> reported. There were some other use-after-scope reports, but they
> were false-positives due to different reasons like incompatibility
> with structleak plugin.
>
> This feature significantly increases stack usage, especially with
> GCC < 9 version, and causes a 32K stack overflow. It probably
> adds performance penalty too.
>
> Given all that, let's remove use-after-scope detector entirely.
>
> While preparing this patch I've noticed that we mistakenly enable
> use-after-scope detection for clang compiler regardless of
> CONFIG_KASAN_EXTRA setting. This is also fixed now.
>
> [1] http://lkml.kernel.org/r/<20171129052106.rhgbjhhis53hkgfn@wfg-t540p.sh.intel.com>
>
> Signed-off-by: Andrey Ryabinin <aryabinin@virtuozzo.com>
> Cc: Qian Cai <cai@lca.pw>
> Cc: Alexander Potapenko <glider@google.com>
> Cc: Dmitry Vyukov <dvyukov@google.com>
> Cc: Catalin Marinas <catalin.marinas@arm.com>
> Cc: Will Deacon <will.deacon@arm.com>
> ---
> arch/arm64/include/asm/memory.h | 4 ----
> lib/Kconfig.debug | 1 -
> lib/Kconfig.kasan | 10 ----------
> lib/test_kasan.c | 24 ------------------------
> mm/kasan/generic.c | 19 -------------------
> mm/kasan/generic_report.c | 3 ---
> mm/kasan/kasan.h | 3 ---
> scripts/Makefile.kasan | 5 -----
> scripts/gcc-plugins/Kconfig | 4 ----
> 9 files changed, 73 deletions(-)

For the arm64 part:

Acked-by: Will Deacon <will.deacon@arm.com>

but I defer to you and Dmitry as to whether or not you go ahead with this.

Will

\
 
 \ /
  Last update: 2019-01-16 17:48    [W:0.518 / U:0.036 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site