[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 17/21] linux-user/s390x: Implement setup_sigtramp
From: |
Philippe Mathieu-Daudé |
Subject: |
Re: [PATCH 17/21] linux-user/s390x: Implement setup_sigtramp |
Date: |
Wed, 16 Jun 2021 18:52:37 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.10.1 |
On 6/16/21 3:12 AM, Richard Henderson wrote:
> Create and record the two signal trampolines.
> Use them when the guest does not use SA_RESTORER.
>
> Cc: qemu-s390x@nongnu.org
> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
> ---
> linux-user/s390x/target_signal.h | 2 ++
> linux-user/s390x/signal.c | 24 ++++++++++++++++--------
> 2 files changed, 18 insertions(+), 8 deletions(-)
> +void setup_sigtramp(abi_ulong sigtramp_page)
> +{
> + uint16_t *tramp = lock_user(VERIFY_WRITE, sigtramp_page, 4, 0);
4 -> 2 + 2 seems clearer (applies to some other targets in this series).
> + assert(tramp != NULL);
> +
> + default_sigreturn = sigtramp_page;
> + __put_user(S390_SYSCALL_OPCODE | TARGET_NR_sigreturn, &tramp[0]);
> +
> + default_rt_sigreturn = sigtramp_page + 2;
> + __put_user(S390_SYSCALL_OPCODE | TARGET_NR_rt_sigreturn, &tramp[1]);
> +
> + unlock_user(tramp, sigtramp_page, 4);
Ditto, otherwise:
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
> +}
>