qemu/linux-user
Peter Maydell c3ab5df2f5 linux-user/sparc: Don't zero high half of PC, NPC, PSR in sigreturn
The function do_sigreturn() tries to store the PC, NPC and PSR in
uint32_t local variables, which implicitly drops the high half of
these fields for 64-bit guests.

The usual effect was that a guest which used signals would crash on
return from a signal unless it was lucky enough to take it while the
PC was in the low 4GB of the address space.  In particular, Debian
/bin/dash and /bin/bash would segfault after executing external
commands.

Use abi_ulong, which is the type these fields all have in the
__siginfo_t struct.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20201105212314.9628-4-peter.maydell@linaro.org>
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
2020-11-10 07:54:22 +01:00
..
aarch64 target-arm queue: 2020-10-29 11:40:04 +00:00
alpha linux-user: update syscall.tbl to Linux 5.9-rc7 2020-10-26 11:39:23 +01:00
arm linux-user: update syscall.tbl to Linux 5.9-rc7 2020-10-26 11:39:23 +01:00
cris linux-user/: fix some comment spelling errors 2020-09-17 20:39:22 +02:00
generic linux-user: Add generic 'termbits.h' for some archs 2020-08-27 12:29:50 +02:00
host linux-user/: fix some comment spelling errors 2020-09-17 20:39:22 +02:00
hppa linux-user: update syscall.tbl to Linux 5.9-rc7 2020-10-26 11:39:23 +01:00
i386 linux-user: update syscall.tbl to Linux 5.9-rc7 2020-10-26 11:39:23 +01:00
m68k linux-user: update syscall.tbl to Linux 5.9-rc7 2020-10-26 11:39:23 +01:00
microblaze linux-user: update syscall.tbl to Linux 5.9-rc7 2020-10-26 11:39:23 +01:00
mips linux-user/mips/cpu_loop: silence the compiler warnings 2020-11-04 22:21:50 +01:00
mips64 linux-user: update syscall.tbl to Linux 5.9-rc7 2020-10-26 11:39:23 +01:00
nios2 linux-user: update syscall_nr.h to Linux 5.9-rc7 2020-10-26 11:39:23 +01:00
openrisc linux-user: update syscall_nr.h to Linux 5.9-rc7 2020-10-26 11:39:23 +01:00
ppc linux-user: update syscall.tbl to Linux 5.9-rc7 2020-10-26 11:39:23 +01:00
riscv linux-user: update syscall_nr.h to Linux 5.9-rc7 2020-10-26 11:39:23 +01:00
s390x linux-user: update syscall.tbl to Linux 5.9-rc7 2020-10-26 11:39:23 +01:00
sh4 linux-user: update syscall.tbl to Linux 5.9-rc7 2020-10-26 11:39:23 +01:00
sparc linux-user/sparc: Don't zero high half of PC, NPC, PSR in sigreturn 2020-11-10 07:54:22 +01:00
sparc64 linux-user: update syscall.tbl to Linux 5.9-rc7 2020-10-26 11:39:23 +01:00
tilegx linux-user: Add generic 'termbits.h' for some archs 2020-08-27 12:29:50 +02:00
x86_64 linux-user: update syscall.tbl to Linux 5.9-rc7 2020-10-26 11:39:23 +01:00
xtensa linux-user: update syscall.tbl to Linux 5.9-rc7 2020-10-26 11:39:23 +01:00
cpu_loop-common.h cpu: Replace ENV_GET_CPU with env_cpu 2019-06-10 07:03:34 -07:00
elfload.c linux-user: Check copy_from_user() return value in vma_dump_size() 2020-11-04 22:28:05 +01:00
errno_defs.h Supply missing header guards 2019-06-12 13:20:21 +02:00
exit.c build: move TARGET_GPROF to config-host.mak 2020-02-12 16:29:27 +01:00
fd-trans.c linux-user: add netlink RTM_SETLINK command 2020-07-13 21:26:33 +02:00
fd-trans.h linux-user: move TargetFdTrans functions to their own file 2018-09-25 22:36:47 +02:00
flat.h linux-user/: fix some comment spelling errors 2020-09-17 20:39:22 +02:00
flatload.c linux-user/: fix some comment spelling errors 2020-09-17 20:39:22 +02:00
ioctls.h linux-user: Add support for btrfs ioctls used to scrub a filesystem 2020-09-03 01:09:35 +02:00
linux_loop.h linux-user: Add loop control ioctls 2016-07-19 15:22:33 +03:00
linuxload.c avoid TABs in files that only contain a few 2019-01-11 15:46:56 +01:00
main.c linux-user: Ensure mmap_min_addr is non-zero 2020-07-27 22:02:40 +02:00
meson.build meson: linux-user 2020-08-21 06:30:38 -04:00
mmap.c linux-user: Set PAGE_TARGET_1 for TARGET_PROT_BTI 2020-10-27 10:44:02 +00:00
qemu.h linux-user/elfload: Parse NT_GNU_PROPERTY_TYPE_0 notes 2020-10-27 10:44:02 +00:00
safe-syscall.S linux-user: Provide safe_syscall for fixing races between signals and syscalls 2016-05-27 14:49:51 +03:00
signal-common.h linux-user: Make sigaltstack stacks per-thread 2019-07-26 19:24:33 +02:00
signal.c qemu/atomic.h: rename atomic_ to qatomic_ 2020-09-23 16:07:44 +01:00
socket.h Supply missing header guards 2019-06-12 13:20:21 +02:00
strace.c linux-user: Add strace support for printing OFD fcntl operations 2020-09-01 11:47:12 +02:00
strace.list linux-user: Add strace support for printing arguments of some clock and time functions 2020-08-27 12:29:50 +02:00
syscall_defs.h linux-user: Set PAGE_TARGET_1 for TARGET_PROT_BTI 2020-10-27 10:44:02 +00:00
syscall_types.h linux-user: Add support for btrfs ioctls used to scrub a filesystem 2020-09-03 01:09:35 +02:00
syscall.c linux-user/syscall: Fix missing target_to_host_timespec64() check 2020-11-04 22:27:03 +01:00
target_flat.h Supply missing header guards 2019-06-12 13:20:21 +02:00
trace-events linux-user: fix use of SIGRTMIN 2020-02-12 18:56:41 +01:00
trace.h trace: switch position of headers to what Meson requires 2020-08-21 06:18:24 -04:00
uaccess.c avoid TABs in files that only contain a few 2019-01-11 15:46:56 +01:00
uname.c cpu: Replace ENV_GET_CPU with env_cpu 2019-06-10 07:03:34 -07:00
uname.h Clean up decorations and whitespace around header guards 2016-07-12 16:20:46 +02:00
vm86.c linux-user: Use `qemu_log' for non-strace logging 2020-02-19 11:17:40 +01:00