Bug 203495 - KASAN: make inline instrumentation the default mode
Summary: KASAN: make inline instrumentation the default mode
Status: NEW
Alias: None
Product: Memory Management
Classification: Unclassified
Component: Sanitizers (show other bugs)
Hardware: All Linux
: P1 normal
Assignee: MM/Sanitizers virtual assignee
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-05-03 15:59 UTC by Andrey Konovalov
Modified: 2023-11-09 13:53 UTC (History)
3 users (show)

See Also:
Kernel Version: upstream
Subsystem:
Regression: No
Bisected commit-id:


Attachments

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!

Note You need to log in before you can comment on or make changes to this bug.