arm64: mm: don't print out page table entries on EL0 faults
authorKristina Martsenko <kristina.martsenko@arm.com>
Fri, 9 Jun 2017 15:35:53 +0000 (16:35 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 8 May 2019 05:19:07 +0000 (07:19 +0200)
commitee254b4d2912ea566e95f605c50b5265e585522a
tree97e9c61023afaa592f14aa3882b6d76be8fb0389
parent9cec5be38780b94fdeebfa9b9803c90327ed9656
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 <mark.rutland@arm.com>
Signed-off-by: Kristina Martsenko <kristina.martsenko@arm.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Andrey Konovalov <andreyknvl@google.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
arch/arm64/mm/fault.c