summaryrefslogtreecommitdiff
path: root/ipc
diff options
context:
space:
mode:
authorJon Medhurst <tixy@linaro.org>2017-03-02 13:04:09 +0000
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2017-12-25 14:22:10 +0100
commita23a447e47ccb333a392e9e132c231be0d5953db (patch)
treef28c7436b99c3df8b5cdc23a102015c30a1c298d /ipc
parent3f7855a522228787e2f73c279d7c0a3a6d3a2323 (diff)
arm: kprobes: Align stack to 8-bytes in test code
[ Upstream commit 974310d047f3c7788a51d10c8d255eebdb1fa857 ] kprobes test cases need to have a stack that is aligned to an 8-byte boundary because they call other functions (and the ARM ABI mandates that alignment) and because test cases include 64-bit accesses to the stack. Unfortunately, GCC doesn't ensure this alignment for inline assembler and for the code in question seems to always misalign it by pushing just the LR register onto the stack. We therefore need to explicitly perform stack alignment at the start of each test case. Without this fix, some test cases will generate alignment faults on systems where alignment is enforced. Even if the kernel is configured to handle these faults in software, triggering them is ugly. It also exposes limitations in the fault handling code which doesn't cope with writes to the stack. E.g. when handling this instruction strd r6, [sp, #-64]! the fault handling code will write to a stack location below the SP value at the point the fault occurred, which coincides with where the exception handler has pushed the saved register context. This results in corruption of those registers. Signed-off-by: Jon Medhurst <tixy@linaro.org> Signed-off-by: Sasha Levin <alexander.levin@verizon.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'ipc')
0 files changed, 0 insertions, 0 deletions