mirror of
https://gitlab.com/qemu-project/qemu.git
synced 2026-08-26 22:23:12 -04:00
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> |
||
|---|---|---|
| .. | ||
| cpu_loop.c | ||
| elfload.c | ||
| meson.build | ||
| signal.c | ||
| sockbits.h | ||
| syscall.tbl | ||
| syscallhdr.sh | ||
| target_cpu.h | ||
| target_elf.h | ||
| target_errno_defs.h | ||
| target_fcntl.h | ||
| target_mman.h | ||
| target_prctl.h | ||
| target_proc.h | ||
| target_ptrace.h | ||
| target_resource.h | ||
| target_signal.h | ||
| target_structs.h | ||
| target_syscall.h | ||
| termbits.h | ||