mirror of
https://github.com/apache/nuttx.git
synced 2026-09-06 08:56:32 +00:00
arm_dispatch_syscall in armv7-m clobbered r11 with 'mov r11, sp' and the user-space callee-saved register value leaked back through the exception frame when SYS_syscall_return restored the context, resulting in corrupted parameters on subsequent syscalls and system hangs in protected builds. In armv6-m, r4 was used to load g_stublookup (Thumb-1 cannot use ip for indexed addressing) but was not restored before SYS_syscall_return, causing the same class of register corruption. Fix with minimal changes: - armv7-m: remove 'mov r11, sp' to stop clobbering user r11 - armv6-m: restore r4 from the stack frame before SYS_syscall_return Signed-off-by: buxiasen <buxiasen@xiaomi.com> |
||
|---|---|---|
| .. | ||
| arm | ||
| arm64 | ||
| avr | ||
| ceva | ||
| dummy | ||
| hc | ||
| mips | ||
| misoc | ||
| or1k | ||
| renesas | ||
| risc-v | ||
| sim | ||
| sparc | ||
| tricore | ||
| x86 | ||
| x86_64 | ||
| xtensa | ||
| z16 | ||
| z80 | ||
| CMakeLists.txt | ||
| Kconfig | ||