Software tag-based mode
modulename: tags.ko
configname: CONFIG_KASAN_SW_TAGS
KASAN mode
└─>Software tag-based mode
In linux kernel since version 4.14.326 (release Date: 2023-09-23)
Enables software tag-based KASAN mode.
This mode requires Top Byte Ignore support by the CPU and therefore
is only supported for arm64.
This mode requires Clang version 7.0.0 or later.
This mode consumes about 1/16th of available memory at kernel start
and introduces an overhead of ~20% for the rest of the allocations.
This mode may potentially introduce problems relating to pointer
casting and comparison, as it embeds tags into the top byte of each
pointer.
For better error detection enable CONFIG_STACKTRACE.
Currently CONFIG_KASAN_SW_TAGS doesn't work with CONFIG_DEBUG_SLAB
(the resulting kernel does not boot).
This mode requires Top Byte Ignore support by the CPU and therefore
is only supported for arm64.
This mode requires Clang version 7.0.0 or later.
This mode consumes about 1/16th of available memory at kernel start
and introduces an overhead of ~20% for the rest of the allocations.
This mode may potentially introduce problems relating to pointer
casting and comparison, as it embeds tags into the top byte of each
pointer.
For better error detection enable CONFIG_STACKTRACE.
Currently CONFIG_KASAN_SW_TAGS doesn't work with CONFIG_DEBUG_SLAB
(the resulting kernel does not boot).
source code:
depends
CONFIG_CC_HAS_KASAN_SW_TAGSCONFIG_HAVE_ARCH_KASAN_SW_TAGS
CONFIG_SLUB
CONFIG_SYSFS or CONFIG_SLAB
NOT CONFIG_DEBUG_SLAB