From: Kristina Martsenko Date: Fri, 9 Jun 2017 15:35:53 +0000 (+0100) Subject: arm64: mm: don't print out page table entries on EL0 faults X-Git-Tag: v4.9.174~43 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=ee254b4d2912ea566e95f605c50b5265e585522a;p=platform%2Fkernel%2Flinux-amlogic.git arm64: mm: don't print out page table entries on EL0 faults commit bf396c09c2447a787d02af34cf167e953f85fa42 upstream. When we take a fault from EL0 that can't be handled, we print out the page table entries associated with the faulting address. This allows userspace to print out any current page table entries, including kernel (TTBR1) entries. Exposing kernel mappings like this could pose a security risk, so don't print out page table information on EL0 faults. (But still print it out for EL1 faults.) This also follows the same behaviour as x86, printing out page table entries on kernel mode faults but not user mode faults. Acked-by: Mark Rutland Signed-off-by: Kristina Martsenko Signed-off-by: Will Deacon Signed-off-by: Andrey Konovalov Signed-off-by: Greg Kroah-Hartman --- diff --git a/arch/arm64/mm/fault.c b/arch/arm64/mm/fault.c index 03ebc89..575c11a 100644 --- a/arch/arm64/mm/fault.c +++ b/arch/arm64/mm/fault.c @@ -231,7 +231,6 @@ static void __do_user_fault(struct task_struct *tsk, unsigned long addr, pr_info("%s[%d]: unhandled %s (%d) at 0x%08lx, esr 0x%03x\n", tsk->comm, task_pid_nr(tsk), inf->name, sig, addr, esr); - show_pte(addr); show_regs(regs); }