kernel-hacking-2024-linux-s.../Documentation
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
..
ABI kernel hardening fixes for v6.2-rc1 2022-12-23 12:00:24 -08:00
accel
accounting
admin-guide IOMMU Updates for Linux v6.2 2022-12-19 08:34:39 -06:00
arc
arm
arm64 arm64: errata: Workaround possible Cortex-A715 [ESR|FAR]_ELx corruption 2023-01-06 17:14:55 +00:00
block
bpf
cdrom
core-api
cpu-freq
crypto
dev-tools
devicetree More sound updates for 6.2-rc1 2022-12-23 11:15:48 -08:00
doc-guide
driver-api dmaengine updates for v6.2 2022-12-19 08:54:17 -06:00
fault-injection
fb
features
filesystems ntfs3 for 6.2 2022-12-21 10:18:17 -08:00
firmware-guide
firmware_class
fpga
gpu
hid
hwmon
i2c
ia64
iio
images
infiniband
input
isdn
kbuild
kernel-hacking
leds
litmus-tests
livepatch
locking
loongarch
m68k
maintainer
mhi
mips
misc-devices
mm
netlabel
networking Documentation: devlink: add missing toc entry for etas_es58x devlink doc 2022-12-19 16:08:27 +01:00
nios2
nvdimm
openrisc
parisc
PCI
pcmcia
peci
power
powerpc
process Kbuild updates for v6.2 2022-12-19 12:33:32 -06:00
RCU
riscv
rust
s390
scheduler
scsi
security
sh
sound
sparc
sphinx
sphinx-static
spi
staging
target
timers
tools
trace Trace probes updates for 6.2: 2022-12-21 18:57:24 -08:00
translations
usb
userspace-api
virt ARM64: 2022-12-15 11:12:21 -08:00
w1
watchdog
x86
xtensa
.gitignore
arch.rst
atomic_bitops.txt
atomic_t.txt
Changes
CodingStyle
conf.py
docutils.conf
dontdiff
index.rst
Kconfig
Makefile
memory-barriers.txt
SubmittingPatches
subsystem-apis.rst