summaryrefslogtreecommitdiffstats
path: root/block
diff options
context:
space:
mode:
authorJames Morse <james.morse@arm.com>2019-07-22 16:11:48 +0100
committerWill Deacon <will@kernel.org>2019-07-22 16:22:34 +0100
commit40ca0ce56d4bb889dc43b455c55398468115569a (patch)
tree7a9676958df8994374788b5f1fa92502e0e6192e /block
parentcbdf8a189a66001c36007bf0f5c975d0376c5c3a (diff)
downloadlinux-40ca0ce56d4bb889dc43b455c55398468115569a.tar.bz2
arm64: entry: SP Alignment Fault doesn't write to FAR_EL1
Comparing the arm-arm's pseudocode for AArch64.PCAlignmentFault() with AArch64.SPAlignmentFault() shows that SP faults don't copy the faulty-SP to FAR_EL1, but this is where we read from, and the address we provide to user-space with the BUS_ADRALN signal. For user-space this value will be UNKNOWN due to the previous ERET to user-space. If the last value is preserved, on systems with KASLR or KPTI this will be the user-space link-register left in FAR_EL1 by tramp_exit(). Fix this to retrieve the original sp_el0 value, and pass this to do_sp_pc_fault(). SP alignment faults from EL1 will cause us to take the fault again when trying to store the pt_regs. This eventually takes us to the overflow stack. Remove the ESR_ELx_EC_SP_ALIGN check as we will never make it this far. Fixes: 60ffc30d5652 ("arm64: Exception handling") Signed-off-by: James Morse <james.morse@arm.com> [will: change label name and fleshed out comment] Signed-off-by: Will Deacon <will@kernel.org>
Diffstat (limited to 'block')
0 files changed, 0 insertions, 0 deletions