qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Richard Henderson <richard.henderson@linaro.org>
To: Peter Maydell <peter.maydell@linaro.org>,
	qemu-arm@nongnu.org, qemu-devel@nongnu.org
Cc: Laurent Vivier <laurent@vivier.eu>
Subject: Re: [PATCH for-6.2 3/7] linux-user/arm: Use force_sig() to deliver fpa11 emulation SIGFPE
Date: Sun, 15 Aug 2021 10:00:10 -1000	[thread overview]
Message-ID: <616f6454-5e43-a98f-0769-b242c377c050@linaro.org> (raw)
In-Reply-To: <20210813131809.28655-4-peter.maydell@linaro.org>

On 8/13/21 3:18 AM, Peter Maydell wrote:
> In the Arm target code, when the fpa11 emulation code tells us we
> need to send the guest a SIGFPE, we do this with queue_signal(), but
> we are using the wrong si_type, and we aren't setting the _sifields
> union members corresponding to either the si_type we are using or the
> si_type we should be using.
> 
> As the existing comment notes, the kernel code for this calls the old
> send_sig() function to deliver the signal.  This eventually results
> in the kernel's signal handling code fabricating a siginfo_t with a
> SI_KERNEL code and a zero pid and uid.  For QEMU this means we need
> to use QEMU_SI_KILL.  We already have a function for that:
> force_sig() sets up the whole target_siginfo_t the way we need it.
> 
> Signed-off-by: Peter Maydell<peter.maydell@linaro.org>
> ---
>   linux-user/arm/cpu_loop.c | 11 ++++-------
>   1 file changed, 4 insertions(+), 7 deletions(-)

Reviewed-by: Richard Henderson <richard.henderson@linaro.org>

r~


  reply	other threads:[~2021-08-15 20:02 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-13 13:18 [PATCH for-6.2 0/7] linux-user: Clean up siginfo_t handling for arm, aarch64 Peter Maydell
2021-08-13 13:18 ` [PATCH for-6.2 1/7] linux-user/aarch64: Set siginfo_t addr field for SIGTRAP signals Peter Maydell
2021-08-15 19:51   ` Richard Henderson
2021-08-13 13:18 ` [PATCH for-6.2 2/7] linux-user/arm: " Peter Maydell
2021-08-15 19:53   ` Richard Henderson
2021-08-13 13:18 ` [PATCH for-6.2 3/7] linux-user/arm: Use force_sig() to deliver fpa11 emulation SIGFPE Peter Maydell
2021-08-15 20:00   ` Richard Henderson [this message]
2021-08-13 13:18 ` [PATCH for-6.2 4/7] linux-user: Zero out target_siginfo_t in force_sig() Peter Maydell
2021-08-15 20:00   ` Richard Henderson
2021-08-13 13:18 ` [PATCH for-6.2 5/7] linux-user: Provide new force_sig_fault() function Peter Maydell
2021-08-15 20:10   ` Richard Henderson
2021-08-16  9:03     ` Peter Maydell
2021-08-16 17:27       ` Richard Henderson
2021-08-13 13:18 ` [PATCH for-6.2 6/7] linux-user/arm: Use force_sig_fault() Peter Maydell
2021-08-15 20:25   ` Richard Henderson
2021-08-13 13:18 ` [PATCH for-6.2 7/7] linux-user/aarch64: " Peter Maydell
2021-08-15 20:29   ` Richard Henderson
2021-09-23 13:12 ` [PATCH for-6.2 0/7] linux-user: Clean up siginfo_t handling for arm, aarch64 Laurent Vivier

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=616f6454-5e43-a98f-0769-b242c377c050@linaro.org \
    --to=richard.henderson@linaro.org \
    --cc=laurent@vivier.eu \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-arm@nongnu.org \
    --cc=qemu-devel@nongnu.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).