summaryrefslogtreecommitdiffstats
path: root/drivers/acpi
diff options
context:
space:
mode:
authorJames Morse2019-07-22 17:11:48 +0200
committerWill Deacon2019-07-22 17:22:34 +0200
commit40ca0ce56d4bb889dc43b455c55398468115569a (patch)
tree7a9676958df8994374788b5f1fa92502e0e6192e /drivers/acpi
parentarm64: Force SSBS on context switch (diff)
downloadkernel-qcow2-linux-40ca0ce56d4bb889dc43b455c55398468115569a.tar.gz
kernel-qcow2-linux-40ca0ce56d4bb889dc43b455c55398468115569a.tar.xz
kernel-qcow2-linux-40ca0ce56d4bb889dc43b455c55398468115569a.zip
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 'drivers/acpi')
0 files changed, 0 insertions, 0 deletions