diff options
author | Richard Henderson <richard.henderson@linaro.org> | 2021-04-25 19:53:11 -0700 |
---|---|---|
committer | Laurent Vivier <laurent@vivier.eu> | 2021-05-15 21:43:23 +0200 |
commit | 56384cf3adaeb15bab479be328605e301ae253f2 (patch) | |
tree | 21e7e2d6cd96a0b2da2879ea30488b6e39845356 /linux-user/xtensa | |
parent | 92bad948367c4b8a58f6bb81b45750f1d583f274 (diff) | |
download | qemu-56384cf3adaeb15bab479be328605e301ae253f2.zip qemu-56384cf3adaeb15bab479be328605e301ae253f2.tar.gz qemu-56384cf3adaeb15bab479be328605e301ae253f2.tar.bz2 |
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/xtensa')
-rw-r--r-- | linux-user/xtensa/signal.c | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/linux-user/xtensa/signal.c b/linux-user/xtensa/signal.c index 590f031..22ec6cd 100644 --- a/linux-user/xtensa/signal.c +++ b/linux-user/xtensa/signal.c @@ -253,12 +253,8 @@ long do_rt_sigreturn(CPUXtensaState *env) set_sigmask(&set); restore_sigcontext(env, frame); + target_restore_altstack(&frame->uc.tuc_stack, get_sp_from_cpustate(env)); - if (do_sigaltstack(frame_addr + - offsetof(struct target_rt_sigframe, uc.tuc_stack), - 0, get_sp_from_cpustate(env)) == -TARGET_EFAULT) { - goto badframe; - } unlock_user_struct(frame, frame_addr, 0); return -TARGET_QEMU_ESIGRETURN; |