]> git.baikalelectronics.ru Git - kernel.git/commit
arm64: mte: Handle synchronous and asynchronous tag check faults
authorVincenzo Frascino <vincenzo.frascino@arm.com>
Mon, 16 Sep 2019 10:51:17 +0000 (11:51 +0100)
committerCatalin Marinas <catalin.marinas@arm.com>
Fri, 4 Sep 2020 11:46:06 +0000 (12:46 +0100)
commitd91ce53b44ba9c1874d814f0c3073ccadf7167e0
tree7f8a21f46e15ffc6958c46a202ab8d578b23fb9c
parent06b0859e25aab9a95cd1f6244a456fbef4efc245
arm64: mte: Handle synchronous and asynchronous tag check faults

The Memory Tagging Extension has two modes of notifying a tag check
fault at EL0, configurable through the SCTLR_EL1.TCF0 field:

1. Synchronous raising of a Data Abort exception with DFSC 17.
2. Asynchronous setting of a cumulative bit in TFSRE0_EL1.

Add the exception handler for the synchronous exception and handling of
the asynchronous TFSRE0_EL1.TF0 bit setting via a new TIF flag in
do_notify_resume().

On a tag check failure in user-space, whether synchronous or
asynchronous, a SIGSEGV will be raised on the faulting thread.

Signed-off-by: Vincenzo Frascino <vincenzo.frascino@arm.com>
Co-developed-by: Catalin Marinas <catalin.marinas@arm.com>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
Cc: Will Deacon <will@kernel.org>
arch/arm64/include/asm/mte.h [new file with mode: 0644]
arch/arm64/include/asm/thread_info.h
arch/arm64/kernel/Makefile
arch/arm64/kernel/entry.S
arch/arm64/kernel/mte.c [new file with mode: 0644]
arch/arm64/kernel/process.c
arch/arm64/kernel/signal.c
arch/arm64/kernel/syscall.c
arch/arm64/mm/fault.c