aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorXiang Zheng <zhengxiang9@huawei.com>2019-10-29 20:41:31 +0800
committerCatalin Marinas <catalin.marinas@arm.com>2019-10-29 15:41:14 +0000
commite44ec4a35dbdf3f3fe772f176fab3b8be7e02b0f (patch)
tree94d602bcbbcc9091dc123b54b24bd6b9d169ad4c /arch
parentarm64: psci: Reduce the waiting time for cpu_psci_cpu_kill() (diff)
downloadlinux-dev-e44ec4a35dbdf3f3fe772f176fab3b8be7e02b0f.tar.xz
linux-dev-e44ec4a35dbdf3f3fe772f176fab3b8be7e02b0f.zip
arm64: print additional fault message when executing non-exec memory
When attempting to executing non-executable memory, the fault message shows: Unable to handle kernel read from unreadable memory at virtual address ffff802dac469000 This may confuse someone, so add a new fault message for instruction abort. Acked-by: Will Deacon <will@kernel.org> Signed-off-by: Xiang Zheng <zhengxiang9@huawei.com> Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
Diffstat (limited to 'arch')
-rw-r--r--arch/arm64/mm/fault.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/arch/arm64/mm/fault.c b/arch/arm64/mm/fault.c
index 855f2a7954e6..d46a2bb90f54 100644
--- a/arch/arm64/mm/fault.c
+++ b/arch/arm64/mm/fault.c
@@ -314,6 +314,8 @@ static void __do_kernel_fault(unsigned long addr, unsigned int esr,
if (is_el1_permission_fault(addr, esr, regs)) {
if (esr & ESR_ELx_WNR)
msg = "write to read-only memory";
+ else if (is_el1_instruction_abort(esr))
+ msg = "execute from non-executable memory";
else
msg = "read from unreadable memory";
} else if (addr < PAGE_SIZE) {