linux-mainline/Documentation/arm64
Anshuman Khandual 5db568e748 arm64: errata: Workaround possible Cortex-A715 [ESR|FAR]_ELx corruption
If a Cortex-A715 cpu sees a page mapping permissions change from executable
to non-executable, it may corrupt the ESR_ELx and FAR_ELx registers, on the
next instruction abort caused by permission fault.

Only user-space does executable to non-executable permission transition via
mprotect() system call which calls ptep_modify_prot_start() and ptep_modify
_prot_commit() helpers, while changing the page mapping. The platform code
can override these helpers via __HAVE_ARCH_PTEP_MODIFY_PROT_TRANSACTION.

Work around the problem via doing a break-before-make TLB invalidation, for
all executable user space mappings, that go through mprotect() system call.
This overrides ptep_modify_prot_start() and ptep_modify_prot_commit(), via
defining HAVE_ARCH_PTEP_MODIFY_PROT_TRANSACTION on the platform thus giving
an opportunity to intercept user space exec mappings, and do the necessary
TLB invalidation. Similar interceptions are also implemented for HugeTLB.

Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: Will Deacon <will@kernel.org>
Cc: Jonathan Corbet <corbet@lwn.net>
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: linux-arm-kernel@lists.infradead.org
Cc: linux-doc@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Reviewed-by: Catalin Marinas <catalin.marinas@arm.com>
Signed-off-by: Anshuman Khandual <anshuman.khandual@arm.com>
Link: https://lore.kernel.org/r/20230102061651.34745-1-anshuman.khandual@arm.com
Signed-off-by: Will Deacon <will@kernel.org>
2023-01-06 17:14:55 +00:00
..
acpi_object_usage.rst ACPI: Enable FPDT on arm64 2022-11-14 18:02:59 +00:00
amu.rst
arm-acpi.rst
asymmetric-32bit.rst
booting.rst Merge branch 'for-next/trivial' into for-next/core 2022-12-06 11:33:29 +00:00
cpu-feature-registers.rst arm64: cpufeature: Fix the visibility of compat hwcaps 2022-11-03 18:04:56 +00:00
elf_hwcaps.rst arm64/hwcap: Add support for SVE 2.1 2022-11-09 17:54:53 +00:00
features.rst
hugetlbpage.rst
index.rst
kasan-offsets.sh
legacy_instructions.rst
memory-tagging-extension.rst
memory.rst
perf.rst
pointer-authentication.rst
silicon-errata.rst arm64: errata: Workaround possible Cortex-A715 [ESR|FAR]_ELx corruption 2023-01-06 17:14:55 +00:00
sme.rst
sve.rst arm64/hwcap: Add support for SVE 2.1 2022-11-09 17:54:53 +00:00
tagged-address-abi.rst
tagged-pointers.rst