altos/stm: Validate current task SP in interrupt by looking at PSP
authorKeith Packard <keithp@keithp.com>
Sat, 26 Mar 2016 22:54:24 +0000 (15:54 -0700)
committerKeith Packard <keithp@keithp.com>
Sat, 26 Mar 2016 23:07:20 +0000 (16:07 -0700)
commit4fa71ecf168e275b24534a5a20e3dd4e178c7bbd
treed3d042dbb8a3dff4d3133959db64dd6d90055c0d
parent6a9546413d6a236c010e806b50506d870961d074
altos/stm: Validate current task SP in interrupt by looking at PSP

We use a separate stack pointer for task code, which means we can
verify that it is in range in any interrupt handler. This adds checks
for the task stack (under #ifdef DEBUG) that run in ao_wakeup as well
as at every timer interrupt.

Signed-off-by: Keith Packard <keithp@keithp.com>
src/kernel/ao_task.c
src/kernel/ao_task.h
src/stm/ao_arch_funcs.h
src/stm/ao_timer.c