[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [RFC 2/4] linux-user/signal.c: Create a common rewind_if_in_safe_sys
From: |
Philippe Mathieu-Daudé |
Subject: |
Re: [RFC 2/4] linux-user/signal.c: Create a common rewind_if_in_safe_syscall |
Date: |
Wed, 10 Nov 2021 16:44:41 +0100 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.2.0 |
On 11/8/21 03:37, Warner Losh wrote:
> All instances of rewind_if_in_safe_syscall are the same, differing only
> in how the instruction point is fetched from the ucontext and the size
> of the registers. Use host_signal_pc and new host_signal_set_pc
> interfaces to fetch the pointer to the PC and adjust if needed. Delete
> all the old copies of rewind_if_in_safe_syscall.
>
> Signed-off-by: Warner Losh <imp@bsdimp.com>
> ---
> linux-user/host/aarch64/hostdep.h | 20 --------------------
> linux-user/host/arm/hostdep.h | 20 --------------------
> linux-user/host/i386/hostdep.h | 20 --------------------
> linux-user/host/ppc64/hostdep.h | 20 --------------------
> linux-user/host/riscv/hostdep.h | 20 --------------------
> linux-user/host/s390x/hostdep.h | 20 --------------------
> linux-user/host/x86_64/hostdep.h | 20 --------------------
> linux-user/signal.c | 18 +++++++++++++++++-
> 8 files changed, 17 insertions(+), 141 deletions(-)
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
[RFC 3/4] linux-user/safe-syscall.inc.S: Move to common-user, Warner Losh, 2021/11/07
[RFC 1/4] linux-user: Add host_signal_set_pc to set pc in mcontext, Warner Losh, 2021/11/07
[RFC 4/4] common-user: Allow return codes to be adjusted after sytsem call, Warner Losh, 2021/11/07