For SW_TAGS KASAN, the instrumentation allows to control whether we can proceed after a crash was detected. This is done by passing the -recover flag to the compiler. Disabling recovery allows to generate more compact code. Unfortunately, disabling recovery does not work for the kernel as is. KASAN reporting is disabled in some contexts (for example when the allocator accesses slab object metadata; this is controlled by current->kasan_depth). All these accesses are detected by the tool, even though the reports for them are not printed. If the recovery is disabled, KASAN will not be able to proceed after the first of such accesses. Investigate the possibility of disabling recovery, or update the comment at [1] to say that it is impossible to disable. [1] https://elixir.bootlin.com/linux/v5.17/source/arch/arm64/kernel/traps.c#L1032