nuttx/arch
raiden00pl dcca9a4735 arch/intel64: don't touch the outgoing stack after releasing the csection
up_switch_context() and up_exit() released the critical section and then
kept using the outgoing task's stack: a call/ret through
nxsched_switch_context() and the call into x86_64_fullcontextrestore().
Once the lock is released the outgoing task can be woken and run by
another CPU on that same stack, so those accesses race with it.

Release the critical section as the last step and enter
x86_64_fullcontextrestore() with a jmp so nothing is read from or
written to the outgoing stack after the release.

Assisted-by: Claude Code
Signed-off-by: raiden00pl <raiden00@railab.me>
2026-09-15 11:39:05 -03:00
..
arm arch/arm/imx9, arch/arm64/imx9: Release eDMA lock before callbacks 2026-09-15 08:41:58 -03:00
arm64 arch/arm/imx9, arch/arm64/imx9: Release eDMA lock before callbacks 2026-09-15 08:41:58 -03:00
avr arch, boards, cmake: Build C++ ELF modules without __cxa_atexit. 2026-09-04 15:44:24 -03:00
ceva arch/atomic: remove up_testset in spinlock 2026-09-08 08:58:54 +08:00
dummy
hc tools: fix stale archive members surviving a Kconfig-driven CSRCS change 2026-07-28 21:26:03 -03:00
mips arch, boards, cmake: Build C++ ELF modules without __cxa_atexit. 2026-09-04 15:44:24 -03:00
misoc arch, boards, cmake: Build C++ ELF modules without __cxa_atexit. 2026-09-04 15:44:24 -03:00
or1k arch, boards, cmake: Build C++ ELF modules without __cxa_atexit. 2026-09-04 15:44:24 -03:00
renesas nuttx/libc: refine the atomic related Kconfig 2026-08-24 13:20:45 +08:00
risc-v arch/risc-v/include/irq.h: fix vector context allocated size 2026-09-15 16:10:23 +08:00
sim arch/sim: Add runtime HCI socket target option 2026-09-13 18:31:59 -03:00
sparc arch/atomic: remove up_testset in spinlock 2026-09-08 08:58:54 +08:00
tricore arch/atomic: remove up_testset in spinlock 2026-09-08 08:58:54 +08:00
x86 arch, boards, cmake: Build C++ ELF modules without __cxa_atexit. 2026-09-04 15:44:24 -03:00
x86_64 arch/intel64: don't touch the outgoing stack after releasing the csection 2026-09-15 11:39:05 -03:00
xtensa xtensa: Support BUILD_KERNEL. 2026-09-10 23:28:43 +08:00
z16 tools: fix stale archive members surviving a Kconfig-driven CSRCS change 2026-07-28 21:26:03 -03:00
z80
CMakeLists.txt cmake: Use NUTTX(_DIR/_BIN_DIR) instead CMAKE(_SRC_DIR/_BIN_DIR) 2026-08-09 11:13:08 -03:00
Kconfig binfmt, arch/arm: Add the CONFIG_FDPIC option and the ABI header. 2026-09-08 16:31:16 -03:00