]> git.baikalelectronics.ru Git - kernel.git/commit
arm64: mte: Document that user PSTATE.TCO is ignored by kernel uaccess
authorCatalin Marinas <catalin.marinas@arm.com>
Wed, 28 Oct 2020 14:55:24 +0000 (14:55 +0000)
committerWill Deacon <will@kernel.org>
Wed, 28 Oct 2020 17:50:39 +0000 (17:50 +0000)
commite2ffffd5828af1de02d031c03ceb542b35b8457c
treea6ffc55d94c20666a7551b9b8a5132872ff39c4d
parenta728204b640ef46b8d0d82966f1400202457883e
arm64: mte: Document that user PSTATE.TCO is ignored by kernel uaccess

On exception entry, the kernel explicitly resets the PSTATE.TCO (tag
check override) so that any kernel memory accesses will be checked (the
bit is restored on exception return). This has the side-effect that the
uaccess routines will not honour the PSTATE.TCO that may have been set
by the user prior to a syscall.

There is no issue in practice since PSTATE.TCO is expected to be used
only for brief periods in specific routines (e.g. garbage collection).
To control the tag checking mode of the uaccess routines, the user will
have to invoke a corresponding prctl() call.

Document the kernel behaviour w.r.t. PSTATE.TCO accordingly.

Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
Fixes: 145ba3fdcff2 ("arm64: mte: Add Memory Tagging Extension documentation")
Reviewed-by: Vincenzo Frascino <vincenzo.frascino@arm.com>
Cc: Will Deacon <will@kernel.org>
Cc: Szabolcs Nagy <szabolcs.nagy@arm.com>
Signed-off-by: Will Deacon <will@kernel.org>
Documentation/arm64/memory-tagging-extension.rst