qemu/linux-user
Jose Ricardo Ziviani 26920a2961 linux-user: fill target sigcontext struct accordingly
A segfault is noticed when an emulated program uses any of ucontext
regs fields. Risu detected this issue in the following operation when
handling a signal:
  ucontext_t *uc = (ucontext_t*)uc;
  uc->uc_mcontext.regs->nip += 4;

but this works fine:
  uc->uc_mcontext.gp_regs[PT_NIP] += 4;

This patch set regs to a valid location as well as other sigcontext
fields.

Signed-off-by: Jose Ricardo Ziviani <joserz@linux.vnet.ibm.com>
Reviewed-by: Laurent Vivier <laurent@vivier.eu>
Message-Id: <1485900317-3256-1-git-send-email-joserz@linux.vnet.ibm.com>
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
2017-02-16 15:29:30 +01:00
..
aarch64
alpha linux-user: Handle ERFKILL and EHWPOISON 2017-01-22 18:14:10 -08:00
arm
cris
host linux-user: Fix s390x safe-syscall for z900 2017-02-14 17:18:03 +01:00
hppa linux-user: define correct UTS machine name for hppa 2017-02-06 18:24:40 -08:00
i386
m68k linux-user: Update m68k syscall definitions to match Linux 4.6 2017-02-16 15:29:26 +01:00
microblaze
mips linux-user: Handle ERFKILL and EHWPOISON 2017-01-22 18:14:10 -08:00
mips64 linux-user: Handle ERFKILL and EHWPOISON 2017-01-22 18:14:10 -08:00
nios2 nios2: Add usermode binaries emulation 2017-01-24 13:10:35 -08:00
openrisc linux-user: Honor CLONE_SETTLS for openrisc 2017-02-14 08:14:59 +11:00
ppc
s390x
sh4 linux-user: Update sh4 syscall definitions to match Linux 4.8 2017-02-16 15:29:16 +01:00
sparc
sparc64
tilegx
unicore32
x86_64
elfload.c target/openrisc: Keep SR_F in a separate variable 2017-02-14 08:14:59 +11:00
errno_defs.h linux-user: Handle ERFKILL and EHWPOISON 2017-01-22 18:14:10 -08:00
flat.h
flatload.c
ioctls.h linux-user: Add SIOCGPGRP, SIOCGSTAMP, SIOCGSTAMPNS 2017-01-22 18:14:10 -08:00
linux_loop.h
linuxload.c
m68k-sim.c
main.c target/openrisc: Keep SR_F in a separate variable 2017-02-14 08:14:59 +11:00
Makefile.objs
mmap.c linux-user: fix tcg/mmap test 2017-02-16 15:29:30 +01:00
qemu.h
safe-syscall.S
signal.c linux-user: fill target sigcontext struct accordingly 2017-02-16 15:29:30 +01:00
socket.h linux-user: Add HPPA socket.h definitions 2017-01-23 09:52:39 -08:00
strace.c linux-user: remove ifdef __USER_MISC 2017-02-14 17:18:03 +01:00
strace.list
syscall_defs.h nios2: Add usermode binaries emulation 2017-01-24 13:10:35 -08:00
syscall_types.h linux-user: Add SIOCGPGRP, SIOCGSTAMP, SIOCGSTAMPNS 2017-01-22 18:14:10 -08:00
syscall.c linux-user: fix settime old value location 2017-02-16 15:29:30 +01:00
target_flat.h
trace-events
uaccess.c
uname.c
uname.h
vm86.c