Bug 203495

Summary: KASAN: make inline instrumentation the default mode
Product: Memory Management Reporter: Andrey Konovalov (andreyknvl)
Component: SanitizersAssignee: MM/Sanitizers virtual assignee (mm_sanitizers)
Status: RESOLVED CODE_FIX    
Severity: normal CC: dvyukov, kasan-dev, paul.heidekrueger
Priority: P1    
Hardware: All   
OS: Linux   
Kernel Version: upstream Subsystem:
Regression: No Bisected commit-id:

Description Andrey Konovalov 2019-05-03 15:59:31 UTC
Currently the default instrumentation mode is outline. Switch to inline as the default mode, but make sure that older compilers (the ones that don't support inline instrumentation, both GCC and Clang) automatically switch to the outline mode (via $(cc-option, ...) in Kconfig.kasan?).
Comment 1 Paul Heidekrüger 2023-11-09 12:46:40 UTC
AFAICT, the versions of GCC and clang which are supported by the kernel all support inline instrumentation by now. So, there would be no need to make a distinction. Or am I missing something?

Would you still welcome a patch making inline instrumentation the default?
Comment 2 Dmitry Vyukov 2023-11-09 13:01:25 UTC
Outline instrumentation leads to smaller code size, and IIRC some arches support only outline. But making inline the default sounds good.
Comment 3 Paul Heidekrüger 2023-11-09 13:53:40 UTC
On PowerPC, inline instrumentation will be disabled if PPC_RADIX_MMU is set. But Kconfig will already take care of disabling inline instrumentation in that case. That's the only arch I could find where this is relevant. 

I'll be submitting a patch then. Thanks!