From: Anshuman Khandual Date: Sun, 5 May 2019 04:15:12 +0000 (+0530) Subject: arm64/mm: Identify user instruction aborts X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=01de1776f62e6437ccd207181ec503e8a56e6128;p=openwrt%2Fstaging%2Fblogic.git arm64/mm: Identify user instruction aborts We don't currently set the FAULT_FLAG_INSTRUCTION mm flag for EL0 instruction aborts. This has no functional impact, as we don't override arch_vma_access_permitted(), and the default implementation always returns true. However, it would be helpful to provide the flag so that it can be consumed by tracepoints such as dax_pmd_fault. This patch sets the FAULT_FLAG_INSTRUCTION flag for EL0 instruction aborts. Signed-off-by: Anshuman Khandual Cc: Will Deacon Cc: Mark Rutland Signed-off-by: Catalin Marinas --- diff --git a/arch/arm64/mm/fault.c b/arch/arm64/mm/fault.c index a30818ed9c60..392386a693fe 100644 --- a/arch/arm64/mm/fault.c +++ b/arch/arm64/mm/fault.c @@ -464,6 +464,7 @@ static int __kprobes do_page_fault(unsigned long addr, unsigned int esr, if (is_el0_instruction_abort(esr)) { vm_flags = VM_EXEC; + mm_flags |= FAULT_FLAG_INSTRUCTION; } else if ((esr & ESR_ELx_WNR) && !(esr & ESR_ELx_CM)) { vm_flags = VM_WRITE; mm_flags |= FAULT_FLAG_WRITE;