Re: [PATCH v2 13/14] x86: runtime_const used for KASAN_SHADOW_END

From: Andrey Konovalov
Date: Mon Mar 24 2025 - 18:03:02 EST


On Mon, Mar 24, 2025 at 11:50 AM Maciej Wieczor-Retman
<maciej.wieczor-retman@xxxxxxxxx> wrote:
>
> >So I assume that if outline mode works, inline mode should be fine as far as
> >kernel is concerned? If so perhaps it will be more time efficient to post v3 of
> >this series (once I'm done with kasan_non_canonical_hook() edge cases and
> >unpoisoning per-cpu vms[areas] with the same tag) and work on the clang side
> >later / in the meantime.

Generally, yes.

The inline mode also might require adding some __no_sanitize_address
annotations. Typically for lower-level function that get messed up by
the inline instrumentation. But the annotations previously added for
the Generic mode would work for SW_TAGS as well, unless SW_TAGS
instrumentation touches some other low-level code.

> Oh, I guess I also need to add a patch to handle the int3 (X86_TRAP_BP) so
> kasan reports show up in inline mode.

Ah, yes, for SW_TAGS, need an appropriate handler here.