mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 10:41:38 -04:00
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] http://lkml.kernel.org/r/<[email protected]> Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: Andrey Ryabinin <[email protected]> Acked-by: Will Deacon <[email protected]> [arm64] Cc: Qian Cai <[email protected]> Cc: Alexander Potapenko <[email protected]> Cc: Dmitry Vyukov <[email protected]> Cc: Catalin Marinas <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
This commit is contained in:
parent
46612b751c
commit
7771bdbbfd
9 changed files with 0 additions and 73 deletions
|
|
@ -78,16 +78,6 @@ config KASAN_SW_TAGS
|
|||
|
||||
endchoice
|
||||
|
||||
config KASAN_EXTRA
|
||||
bool "KASAN: extra checks"
|
||||
depends on KASAN_GENERIC && DEBUG_KERNEL && !COMPILE_TEST
|
||||
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 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81715
|
||||
|
||||
choice
|
||||
prompt "Instrumentation type"
|
||||
depends on KASAN
|
||||
|
|
|
|||
Loading…
Reference in a new issue