qemu/linux-user/or1k
Florian Hofhammer 9097087147 linux-user: make syscall emulation interruptible
The syscall emulation code previously wasn't interruptible via
cpu_loop_exit(), as this construct relies on a longjmp target that is not
live anymore in the syscall handling code. Consequently, longjmp() would
operate on a (potentially overwritten) stale jump buffer. This patch adds an additional
setjmp and the necessary handling around it to make longjmp() (and by
proxy cpu_loop_exit() safe to call even within a syscall context.

Reviewed-by: Warner Losh <imp@bsdimp.com>
Reviewed-by: Pierrick Bouvier <pierrick.bouvier@linaro.org>
Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
Signed-off-by: Florian Hofhammer <florian.hofhammer@epfl.ch>
Link: https://lore.kernel.org/qemu-devel/20260305-setpc-v5-v7-3-4c3adba52403@epfl.ch
Signed-off-by: Pierrick Bouvier <pierrick.bouvier@linaro.org>
2026-03-05 10:54:09 -08:00
..
cpu_loop.c linux-user: make syscall emulation interruptible 2026-03-05 10:54:09 -08:00
elfload.c target/or1k: Rename from openrisc 2026-02-09 20:51:52 +01:00
meson.build target/or1k: Rename from openrisc 2026-02-09 20:51:52 +01:00
signal.c target/or1k: Rename from openrisc 2026-02-09 20:51:52 +01:00
sockbits.h target/or1k: Rename from openrisc 2026-02-09 20:51:52 +01:00
syscall.tbl target/or1k: Rename from openrisc 2026-02-09 20:51:52 +01:00
syscallhdr.sh target/or1k: Rename from openrisc 2026-02-09 20:51:52 +01:00
target_cpu.h target/or1k: Rename from openrisc 2026-02-09 20:51:52 +01:00
target_elf.h target/or1k: Rename from openrisc 2026-02-09 20:51:52 +01:00
target_errno_defs.h target/or1k: Rename from openrisc 2026-02-09 20:51:52 +01:00
target_fcntl.h target/or1k: Rename from openrisc 2026-02-09 20:51:52 +01:00
target_mman.h target/or1k: Rename from openrisc 2026-02-09 20:51:52 +01:00
target_prctl.h target/or1k: Rename from openrisc 2026-02-09 20:51:52 +01:00
target_proc.h target/or1k: Rename from openrisc 2026-02-09 20:51:52 +01:00
target_ptrace.h target/or1k: Rename from openrisc 2026-02-09 20:51:52 +01:00
target_resource.h target/or1k: Rename from openrisc 2026-02-09 20:51:52 +01:00
target_signal.h target/or1k: Rename from openrisc 2026-02-09 20:51:52 +01:00
target_structs.h target/or1k: Rename from openrisc 2026-02-09 20:51:52 +01:00
target_syscall.h target/or1k: Rename from openrisc 2026-02-09 20:51:52 +01:00
termbits.h target/or1k: Rename from openrisc 2026-02-09 20:51:52 +01:00