summaryrefslogtreecommitdiffstats
path: root/linux-user/ppc
diff options
context:
space:
mode:
authorRichard Henderson2021-04-26 04:53:11 +0200
committerLaurent Vivier2021-05-15 21:43:23 +0200
commit56384cf3adaeb15bab479be328605e301ae253f2 (patch)
tree21e7e2d6cd96a0b2da2879ea30488b6e39845356 /linux-user/ppc
parentlinux-user: Split out target_restore_altstack (diff)
downloadqemu-56384cf3adaeb15bab479be328605e301ae253f2.tar.gz
qemu-56384cf3adaeb15bab479be328605e301ae253f2.tar.xz
qemu-56384cf3adaeb15bab479be328605e301ae253f2.zip
linux-user: Use target_restore_altstack in all sigreturn
Note that target_restore_altstack uses the host memory pointer that we have already verified, so TARGET_EFAULT is not a possible return value. Note that using -EFAULT was a bug. Signed-off-by: Richard Henderson <richard.henderson@linaro.org> Message-Id: <20210426025334.1168495-3-richard.henderson@linaro.org> Signed-off-by: Laurent Vivier <laurent@vivier.eu>
Diffstat (limited to 'linux-user/ppc')
-rw-r--r--linux-user/ppc/signal.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/linux-user/ppc/signal.c b/linux-user/ppc/signal.c
index bad38f8ed9..b44d5ce73c 100644
--- a/linux-user/ppc/signal.c
+++ b/linux-user/ppc/signal.c
@@ -655,9 +655,7 @@ long do_rt_sigreturn(CPUPPCState *env)
if (do_setcontext(&rt_sf->uc, env, 1))
goto sigsegv;
- do_sigaltstack(rt_sf_addr
- + offsetof(struct target_rt_sigframe, uc.tuc_stack),
- 0, env->gpr[1]);
+ target_restore_altstack(&rt_sf->uc.tuc_stack, env->gpr[1]);
unlock_user_struct(rt_sf, rt_sf_addr, 1);
return -TARGET_QEMU_ESIGRETURN;