[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: [PATCH 07/21] linux-user/hexagon: Implement setup_sigtramp
From: |
Taylor Simpson |
Subject: |
RE: [PATCH 07/21] linux-user/hexagon: Implement setup_sigtramp |
Date: |
Wed, 16 Jun 2021 08:07:44 +0000 |
> -----Original Message-----
> From: Richard Henderson <richard.henderson@linaro.org>
> Sent: Tuesday, June 15, 2021 7:12 PM
> To: qemu-devel@nongnu.org
> Cc: laurent@vivier.eu; alex.bennee@linaro.org; Taylor Simpson
> <tsimpson@quicinc.com>
> Subject: [PATCH 07/21] linux-user/hexagon: Implement setup_sigtramp
>
> Continue to initialize the words on the stack, as documented.
> However, use the off-stack trampoline.
>
> Cc: Taylor Simpson <tsimpson@quicinc.com>
> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
>
> diff --git a/linux-user/hexagon/signal.c b/linux-user/hexagon/signal.c index
> 85eab5e943..bd0f9b1c85 100644
> --- a/linux-user/hexagon/signal.c
> +++ b/linux-user/hexagon/signal.c
> @@ -161,6 +161,11 @@ void setup_rt_frame(int sig, struct target_sigaction
> *ka,
>
> setup_ucontext(&frame->uc, env, set);
> tswap_siginfo(&frame->info, info);
> + /*
> + * The on-stack signal trampoline is no longer executed;
> + * however, the libgcc signal frame unwinding code checks
> + * for the presence of these two numeric magic values.
> + */
Hexagon uses musl, not libgcc. So, I'm not sure if this is needed. The
signals.c test passes for me without this change. Are you seeing it fail?
> +void setup_sigtramp(abi_ulong sigtramp_page) {
> + uint32_t *tramp = lock_user(VERIFY_WRITE, sigtramp_page, 4 * 2, 0);
> + assert(tramp != NULL);
> +
> + default_rt_sigreturn = sigtramp_page;
> + install_sigtramp(tramp);
> +
> + unlock_user(tramp, sigtramp_page, 4 * 2); }
Put the closing curly on a new line.
Thanks,
Taylor
[PATCH 08/21] linux-user/hppa: Document non-use of setup_sigtramp, Richard Henderson, 2021/06/15
[PATCH 10/21] linux-user/m68k: Implement setup_sigtramp, Richard Henderson, 2021/06/15
[PATCH 11/21] linux-user/microblaze: Implement setup_sigtramp, Richard Henderson, 2021/06/15