]> git.baikalelectronics.ru Git - kernel.git/commit
arm64: when walking onto the task stack, check sp & fp are in current->stack
authorJames Morse <james.morse@arm.com>
Thu, 10 Dec 2015 10:22:40 +0000 (10:22 +0000)
committerWill Deacon <will.deacon@arm.com>
Thu, 10 Dec 2015 12:08:09 +0000 (12:08 +0000)
commit5d9407c67ddfb4862028c4f43b9c480c447e7cb8
treed8b18acfe73ce9bfaaae71927c41c4b44b088388
parent93a65ef0989835fbf515043be1b381531c4d127f
arm64: when walking onto the task stack, check sp & fp are in current->stack

When unwind_frame() reaches the bottom of the irq_stack, the last fp
points to the original task stack. unwind_frame() uses
IRQ_STACK_TO_TASK_STACK() to find the sp value. If either values is
wrong, we may end up walking a corrupt stack.

Check these values are sane by testing if they are both on the stack
pointed to by current->stack.

Signed-off-by: James Morse <james.morse@arm.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
arch/arm64/kernel/stacktrace.c