[PATCH v8 1/2] kasan/hw-tags: introduce kasan.write_only option
Andrey Ryabinin
ryabinin.a.a at gmail.com
Thu Sep 18 07:47:33 PDT 2025
On 9/17/25 12:27 AM, Yeoreum Yun wrote:
> Since Armv8.9, FEATURE_MTE_STORE_ONLY feature is introduced to restrict
> raise of tag check fault on store operation only.
> Introduce KASAN write only mode based on this feature.
>
> KASAN write only mode restricts KASAN checks operation for write only and
> omits the checks for fetch/read operations when accessing memory.
> So it might be used not only debugging enviroment but also normal
> enviroment to check memory safty.
>
> This features can be controlled with "kasan.write_only" arguments.
> When "kasan.write_only=on", KASAN checks write operation only otherwise
> KASAN checks all operations.
>
> This changes the MTE_STORE_ONLY feature as BOOT_CPU_FEATURE like
> ARM64_MTE_ASYMM so that makes it initialise in kasan_init_hw_tags()
> with other function together.
>
> Signed-off-by: Yeoreum Yun <yeoreum.yun at arm.com>
> Reviewed-by: Catalin Marinas <catalin.marinas at arm.com>
Reviewed-by: Andrey Ryabinin <ryabinin.a.a at gmail.com>
More information about the linux-arm-kernel
mailing list