path: root/lib/Kconfig.kasan
diff options
authorAndrey Ryabinin <>2019-03-05 15:41:20 -0800
committerLinus Torvalds <>2019-03-05 21:07:13 -0800
commit7771bdbbfd3d6f204631b6fd9e1bbc30cd15918e (patch)
tree1f715a5317669f6473d1d4ddb4f5bf761e918e71 /lib/Kconfig.kasan
parent46612b751c4941c5c0472ddf04027e877ae5990f (diff)
kasan: remove use after scope bugs detection.
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]<> Link: Signed-off-by: Andrey Ryabinin <> Acked-by: Will Deacon <> [arm64] Cc: Qian Cai <> Cc: Alexander Potapenko <> Cc: Dmitry Vyukov <> Cc: Catalin Marinas <> Signed-off-by: Andrew Morton <> Signed-off-by: Linus Torvalds <>
Diffstat (limited to 'lib/Kconfig.kasan')
1 files changed, 0 insertions, 10 deletions
diff --git a/lib/Kconfig.kasan b/lib/Kconfig.kasan
index 9737059ec58b..9950b660e62d 100644
--- a/lib/Kconfig.kasan
+++ b/lib/Kconfig.kasan
@@ -78,16 +78,6 @@ config KASAN_SW_TAGS
- bool "KASAN: extra checks"
- help
- This enables further checks in generic KASAN, for now it only
- includes the address-use-after-scope check that can lead to
- excessive kernel stack usage, frame size warnings and longer
- compile time.
- See
prompt "Instrumentation type"
depends on KASAN