qemu-e2k/linux-user/hppa
Peter Maydell 5bfce0b74f linux-user: Make sigaltstack stacks per-thread
The alternate signal stack set up by the sigaltstack syscall is
supposed to be per-thread.  We were incorrectly implementing it as
process-wide.  This causes problems for guest binaries that rely on
this.  Notably the Go runtime does, and so we were seeing crashes
caused by races where two guest threads might incorrectly both
execute on the same stack simultaneously.

Replace the global target_sigaltstack_used with a field
sigaltstack_used in the TaskState, and make all the references to the
old global instead get a pointer to the TaskState and use the field.

Fixes: https://bugs.launchpad.net/qemu/+bug/1696773
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Tested-by: Laurent Vivier <laurent@vivier.eu>
Reviewed-by: Laurent Vivier <laurent@vivier.eu>
Message-Id: <20190725131645.19501-1-peter.maydell@linaro.org>
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
2019-07-26 19:24:33 +02:00
..
cpu_loop.c target/hppa: Use env_cpu, env_archcpu 2019-06-10 07:03:34 -07:00
signal.c linux-user: Make sigaltstack stacks per-thread 2019-07-26 19:24:33 +02:00
sockbits.h Supply missing header guards 2019-06-12 13:20:21 +02:00
syscall_nr.h Supply missing header guards 2019-06-12 13:20:21 +02:00
target_cpu.h linux-user: move get_sp_from_cpustate() to target_cpu.h 2018-06-04 01:30:44 +02:00
target_elf.h linux-user: Move CPU type name selection to a function 2018-02-25 17:27:41 +01:00
target_fcntl.h linux-user: move hppa fcntl definitions to hppa/target_fcntl.h 2018-06-04 01:30:44 +02:00
target_signal.h linux-user: move hppa signal definitions to hppa/target_signal.h 2018-06-04 01:30:44 +02:00
target_structs.h linux-user: Add HPPA target_structs.h 2017-01-23 09:52:39 -08:00
target_syscall.h linux-user: define correct UTS machine name for hppa 2017-02-06 18:24:40 -08:00
termbits.h Supply missing header guards 2019-06-12 13:20:21 +02:00