summaryrefslogtreecommitdiff
path: root/lib/Kconfig.kasan
diff options
context:
space:
mode:
authorPaul Heidekrüger <paul.heidekrueger@tum.de>2023-11-09 18:51:00 +0300
committerAndrew Morton <akpm@linux-foundation.org>2023-12-11 03:51:40 +0300
commit83a6fdd6c27d4f6f51fa1092805676b24e0f8827 (patch)
treee09dd10b8e32bbc4e11b46ccb3b75d672dd6c00a /lib/Kconfig.kasan
parent932b59e3beaefefb1a0bd65f1bb3f9e2000d7315 (diff)
downloadlinux-83a6fdd6c27d4f6f51fa1092805676b24e0f8827.tar.xz
kasan: default to inline instrumentation
KASan inline instrumentation can yield up to a 2x performance gain at the cost of a larger binary. Make inline instrumentation the default, as suggested in the bug report below. When an architecture does not support inline instrumentation, it should set ARCH_DISABLE_KASAN_INLINE, as done by PowerPC, for instance. Link: https://lkml.kernel.org/r/20231109155101.186028-1-paul.heidekrueger@tum.de Signed-off-by: Paul Heidekrüger <paul.heidekrueger@tum.de> Reported-by: Andrey Konovalov <andreyknvl@gmail.com> Reviewed-by: Marco Elver <elver@google.com> Closes: https://bugzilla.kernel.org/show_bug.cgi?id=203495 Acked-by: Andrey Konovalov <andreyknvl@gmail.com> Cc: Dmitry Vyukov <dvyukov@google.com> Cc: Alexander Potapenko <glider@google.com> Cc: Andrey Ryabinin <ryabinin.a.a@gmail.com> Cc: Vincenzo Frascino <vincenzo.frascino@arm.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Diffstat (limited to 'lib/Kconfig.kasan')
-rw-r--r--lib/Kconfig.kasan2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Kconfig.kasan b/lib/Kconfig.kasan
index fdca89c05745..935eda08b1e1 100644
--- a/lib/Kconfig.kasan
+++ b/lib/Kconfig.kasan
@@ -134,7 +134,7 @@ endchoice
choice
prompt "Instrumentation type"
depends on KASAN_GENERIC || KASAN_SW_TAGS
- default KASAN_OUTLINE
+ default KASAN_INLINE if !ARCH_DISABLE_KASAN_INLINE
config KASAN_OUTLINE
bool "Outline instrumentation"