zephyr/arch
Jaxson Han a7a8a64e9c arch32: Fix incorrect exc_exit sequence
The incorrect sequence will cause the thread cannot be aborted in the
ISR context. The following test case failed:
tests/kernel/fatal/exception/kernel.common.stack_sentinel.

The stack sentinel detects the stack overflow as normal during a timer
ISR exit. Note that, currently, the stack overflow detection is behind
the context switch checking, and then the detection will call svc to
raise a fatal error resulting in increasing the nested counter(+1). At
this point, it needs a context switch to finally abort the thread.
However, after the fatal error handling, the program cannot do a context
switch either during the svc exit[1], or during the timer ISR exit[2].

[1] is because the svc context is in an interrupt nested state (the
nested counter is 2).
[2] is because the current point (after svc context pop out) is right
behind the switch checking.

Signed-off-by: Jaxson Han <jaxson.han@arm.com>
2022-03-21 07:31:29 -04:00
..
arc everywhere: fix typos 2022-03-18 13:24:08 -04:00
arm arch32: Fix incorrect exc_exit sequence 2022-03-21 07:31:29 -04:00
arm64 arm64: simplify the code around the call to z_get_next_switch_handle() 2022-03-18 13:32:49 -04:00
common all: Deprecate UTIL_LISTIFY and replace with LISTIFY 2022-03-08 11:03:30 +01:00
mips kconfig: Rename the TEST_EXTRA stack size option to align with the rest 2022-02-22 08:23:05 -05:00
nios2 core: z_data_copy does not depend on CONFIG_XIP 2022-02-22 10:22:53 +01:00
posix everywhere: fix typos 2022-03-18 13:24:08 -04:00
riscv riscv: make arch_is_user_context() SMP compatible 2022-03-21 07:28:05 -04:00
sparc everywhere: fix typos 2022-03-18 13:24:08 -04:00
x86 everywhere: fix typos 2022-03-18 13:24:08 -04:00
xtensa everywhere: fix typos 2022-03-18 13:24:08 -04:00
CMakeLists.txt cmake: fix include directories to work with out-of-tree arch 2020-08-05 08:06:07 -04:00
Kconfig riscv: implement arch_switch() 2022-03-21 07:28:05 -04:00