From: Warner Losh <imp@bsdimp.com>
To: Richard Henderson <richard.henderson@linaro.org>
Cc: Philippe Mathieu-Daude <f4bug@amsat.org>,
QEMU Developers <qemu-devel@nongnu.org>,
Laurent Vivier <laurent@vivier.eu>
Subject: Re: [RFC 2/4] linux-user/signal.c: Create a common rewind_if_in_safe_syscall
Date: Mon, 8 Nov 2021 09:39:46 -0700 [thread overview]
Message-ID: <CANCZdfq5SbUE8Wq8MKsHHJdWuu++suZNuL490E7gqEjGHY+V0g@mail.gmail.com> (raw)
In-Reply-To: <fa216460-3fa2-a5bc-f974-ea2c8cf6430e@linaro.org>
[-- Attachment #1: Type: text/plain, Size: 1516 bytes --]
On Mon, Nov 8, 2021 at 8:07 AM Richard Henderson <
richard.henderson@linaro.org> wrote:
> On 11/8/21 3:37 AM, 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: Richard Henderson <richard.henderson@linaro.org>
>
> Although I think we can fairly safely drop HAVE_SAFE_SYSCALL. It is
> required for proper
> operation. As with host-signal.h, really.
>
Yes. The only possible use I can see for it is to allow people to bring up
new platforms more easily by deferring the signal-safe system call details
until later in that process.
Warner
[-- Attachment #2: Type: text/html, Size: 2166 bytes --]
next prev parent reply other threads:[~2021-11-08 16:41 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-11-08 2:37 [RFC 0/4] linux-user: simplify safe signal handling Warner Losh
2021-11-08 2:37 ` [RFC 1/4] linux-user: Add host_signal_set_pc to set pc in mcontext Warner Losh
2021-11-08 15:03 ` Richard Henderson
2021-11-10 15:43 ` Philippe Mathieu-Daudé
2021-11-08 2:37 ` [RFC 2/4] linux-user/signal.c: Create a common rewind_if_in_safe_syscall Warner Losh
2021-11-08 15:07 ` Richard Henderson
2021-11-08 16:39 ` Warner Losh [this message]
2021-11-10 16:20 ` Warner Losh
2021-11-10 16:31 ` Richard Henderson
2021-11-10 15:44 ` Philippe Mathieu-Daudé
2021-11-08 2:37 ` [RFC 3/4] linux-user/safe-syscall.inc.S: Move to common-user Warner Losh
2021-11-08 2:37 ` [RFC 4/4] common-user: Allow return codes to be adjusted after sytsem call Warner Losh
2021-11-08 15:10 ` Richard Henderson
2021-11-08 18:49 ` Warner Losh
2021-11-09 8:11 ` Richard Henderson
2021-11-10 2:10 ` Warner Losh
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CANCZdfq5SbUE8Wq8MKsHHJdWuu++suZNuL490E7gqEjGHY+V0g@mail.gmail.com \
--to=imp@bsdimp.com \
--cc=f4bug@amsat.org \
--cc=laurent@vivier.eu \
--cc=qemu-devel@nongnu.org \
--cc=richard.henderson@linaro.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).