FROMLIST: arm64: Handle faults caused by inadvertent user access with PAN enabled
authorCatalin Marinas <catalin.marinas@arm.com>
Fri, 1 Jul 2016 17:22:39 +0000 (18:22 +0100)
committerSami Tolvanen <samitolvanen@google.com>
Thu, 29 Sep 2016 17:52:56 +0000 (10:52 -0700)
commit5dc2b7c7bb33138270ff9494be6cf334bd3d20e1
treeb4b3a4cda7deb43d0fa1e461e1bd82e63bd3f541
parent5775ca34829caf0664c8ccc02fd0e93cb6022e0f
FROMLIST: arm64: Handle faults caused by inadvertent user access with PAN enabled

When TTBR0_EL1 is set to the reserved page, an erroneous kernel access
to user space would generate a translation fault. This patch adds the
checks for the software-set PSR_PAN_BIT to emulate a permission fault
and report it accordingly.

This patch also updates the description of the synchronous external
aborts on translation table walks.

Cc: Will Deacon <will.deacon@arm.com>
Cc: James Morse <james.morse@arm.com>
Cc: Kees Cook <keescook@chromium.org>
Cc: Mark Rutland <mark.rutland@arm.com>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
Change-Id: I623113fc8bf6d5f023aeec7a0640b62a25ef8420
(cherry picked from commit be3db9340c8011d22f06715339b66bcbbd4893bd)
Signed-off-by: Sami Tolvanen <samitolvanen@google.com>
arch/arm64/mm/fault.c