Commit 363eeef5 authored by Andrey Ryabinin's avatar Andrey Ryabinin Committed by Xie XiuQi
Browse files

kasan: remove use after scope bugs detection.

mainline inclusion
from mainline-v5.0
commit 7771bdbb
category: bugfix
bugzilla: 10979
CVE: NA

------------------------------------------------

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>

Link: http://lkml.kernel.org/r/20190111185842.13978-1-aryabinin@virtuozzo.com


Signed-off-by: default avatarAndrey Ryabinin <aryabinin@virtuozzo.com>
Acked-by: Will Deacon <will.deacon@arm.com>		[arm64]
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>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarStephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: default avatarzhong jiang <zhongjiang@huawei.com>
Reviewed-by: default avatarJing Xiangfeng <jingxiangfeng@huawei.com>
Signed-off-by: default avatarYang Yingliang <yangyingliang@huawei.com>
parent 8eb04a7a
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment