Skip to content

Commit

Permalink
kasan: default to inline instrumentation
Browse files Browse the repository at this point in the history
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/[email protected]
Signed-off-by: Paul Heidekrüger <[email protected]>
Reported-by: Andrey Konovalov <[email protected]>
Reviewed-by: Marco Elver <[email protected]>
Closes: https://bugzilla.kernel.org/show_bug.cgi?id=203495
Acked-by: Andrey Konovalov <[email protected]>
Cc: Dmitry Vyukov <[email protected]>
Cc: Alexander Potapenko <[email protected]>
Cc: Andrey Ryabinin <[email protected]>
Cc: Vincenzo Frascino <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
  • Loading branch information
paulhdk authored and akpm00 committed Dec 11, 2023
1 parent 932b59e commit 83a6fdd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/Kconfig.kasan
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

0 comments on commit 83a6fdd

Please sign in to comment.