arm64: mte: Add asynchronous mode support
authorVincenzo Frascino <vincenzo.frascino@arm.com>
Mon, 15 Mar 2021 13:20:11 +0000 (13:20 +0000)
committerCatalin Marinas <catalin.marinas@arm.com>
Sun, 11 Apr 2021 09:55:30 +0000 (10:55 +0100)
commitf3b7deef8dcaf84fd659108ae300626ea5420f87
tree78e07172909ac4406713dbd9e31b182e475ac759
parent1e28eed17697bcf343c6743f0028cc3b5dd88bf0
arm64: mte: Add asynchronous mode support

MTE provides an asynchronous mode for detecting tag exceptions. In
particular instead of triggering a fault the arm64 core updates a
register which is checked by the kernel after the asynchronous tag
check fault has occurred.

Add support for MTE asynchronous mode.

The exception handling mechanism will be added with a future patch.

Note: KASAN HW activates async mode via kasan.mode kernel parameter.
The default mode is set to synchronous.
The code that verifies the status of TFSR_EL1 will be added with a
future patch.

Cc: Will Deacon <will@kernel.org>
Reviewed-by: Catalin Marinas <catalin.marinas@arm.com>
Reviewed-by: Andrey Konovalov <andreyknvl@google.com>
Acked-by: Andrey Konovalov <andreyknvl@google.com>
Tested-by: Andrey Konovalov <andreyknvl@google.com>
Signed-off-by: Vincenzo Frascino <vincenzo.frascino@arm.com>
Link: https://lore.kernel.org/r/20210315132019.33202-2-vincenzo.frascino@arm.com
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
arch/arm64/include/asm/memory.h
arch/arm64/include/asm/mte-kasan.h
arch/arm64/kernel/mte.c