]> git.baikalelectronics.ru Git - kernel.git/commit
arm64: add MTE supported check to thread switching and syscall entry/exit
authorPeter Collingbourne <pcc@google.com>
Wed, 15 Sep 2021 19:03:35 +0000 (12:03 -0700)
committerCatalin Marinas <catalin.marinas@arm.com>
Tue, 21 Sep 2021 11:17:30 +0000 (12:17 +0100)
commited7d1b9a7856013c16bfd676613fcb292628d9c0
treebc716ac5b48029dcdb82f57361d50b35e417ae4d
parent9e9732f9e44f7e9f8a485e21a24924b0be3d6aff
arm64: add MTE supported check to thread switching and syscall entry/exit

This lets us avoid doing unnecessary work on hardware that does not
support MTE, and will allow us to freely use MTE instructions in the
code called by mte_thread_switch().

Since this would mean that we do a redundant check in
mte_check_tfsr_el1(), remove it and add two checks now required in its
callers. This also avoids an unnecessary DSB+ISB sequence on the syscall
exit path for hardware not supporting MTE.

Fixes: 973e912875ff ("arm64: mte: Enable async tag check fault")
Cc: <stable@vger.kernel.org> # 5.13.x
Signed-off-by: Peter Collingbourne <pcc@google.com>
Link: https://linux-review.googlesource.com/id/I02fd000d1ef2c86c7d2952a7f099b254ec227a5d
Link: https://lore.kernel.org/r/20210915190336.398390-1-pcc@google.com
[catalin.marinas@arm.com: adjust the commit log slightly]
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
arch/arm64/include/asm/mte.h
arch/arm64/kernel/mte.c