All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] arm64/mm: Identify user instruction aborts
@ 2019-05-05  4:15 Anshuman Khandual
  2019-06-04 13:58 ` Catalin Marinas
  0 siblings, 1 reply; 2+ messages in thread
From: Anshuman Khandual @ 2019-05-05  4:15 UTC (permalink / raw)
  To: linux-arm-kernel
  Cc: Mark Rutland, Catalin Marinas, Will Deacon, Anshuman Khandual

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 <anshuman.khandual@arm.com>
Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: Will Deacon <will.deacon@arm.com>
Cc: Mark Rutland <mark.rutland@arm.com>
---
 arch/arm64/mm/fault.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/arch/arm64/mm/fault.c b/arch/arm64/mm/fault.c
index 1a7e92a..b641449 100644
--- a/arch/arm64/mm/fault.c
+++ b/arch/arm64/mm/fault.c
@@ -463,6 +463,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;
-- 
2.7.4


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] arm64/mm: Identify user instruction aborts
  2019-05-05  4:15 [PATCH] arm64/mm: Identify user instruction aborts Anshuman Khandual
@ 2019-06-04 13:58 ` Catalin Marinas
  0 siblings, 0 replies; 2+ messages in thread
From: Catalin Marinas @ 2019-06-04 13:58 UTC (permalink / raw)
  To: Anshuman Khandual; +Cc: Mark Rutland, Will Deacon, linux-arm-kernel

On Sun, May 05, 2019 at 09:45:12AM +0530, Anshuman Khandual wrote:
> 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 <anshuman.khandual@arm.com>
> Cc: Catalin Marinas <catalin.marinas@arm.com>
> Cc: Will Deacon <will.deacon@arm.com>
> Cc: Mark Rutland <mark.rutland@arm.com>

Queued for 5.3. Thanks.

-- 
Catalin

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2019-06-04 13:58 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-05-05  4:15 [PATCH] arm64/mm: Identify user instruction aborts Anshuman Khandual
2019-06-04 13:58 ` Catalin Marinas

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.