Commit e44ec4a3 authored by Xiang Zheng's avatar Xiang Zheng Committed by Catalin Marinas

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: default avatarWill Deacon <will@kernel.org>
Signed-off-by: default avatarXiang Zheng <zhengxiang9@huawei.com>
Signed-off-by: default avatarCatalin Marinas <catalin.marinas@arm.com>
parent bfcef4ab
...@@ -314,6 +314,8 @@ static void __do_kernel_fault(unsigned long addr, unsigned int esr, ...@@ -314,6 +314,8 @@ static void __do_kernel_fault(unsigned long addr, unsigned int esr,
if (is_el1_permission_fault(addr, esr, regs)) { if (is_el1_permission_fault(addr, esr, regs)) {
if (esr & ESR_ELx_WNR) if (esr & ESR_ELx_WNR)
msg = "write to read-only memory"; msg = "write to read-only memory";
else if (is_el1_instruction_abort(esr))
msg = "execute from non-executable memory";
else else
msg = "read from unreadable memory"; msg = "read from unreadable memory";
} else if (addr < PAGE_SIZE) { } else if (addr < PAGE_SIZE) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment