From: Richard Henderson <richard.henderson@linaro.org>
To: Peter Maydell <peter.maydell@linaro.org>, qemu-devel@nongnu.org
Cc: Riku Voipio <riku.voipio@iki.fi>,
Laurent Vivier <laurent@vivier.eu>,
patches@linaro.org
Subject: Re: [Qemu-devel] [PATCH for-4.1] linux-user: Make sigaltstack stacks per-thread
Date: Thu, 25 Jul 2019 07:33:31 -0700 [thread overview]
Message-ID: <4a4fbeee-e389-81a8-0264-355a8e8af2bf@linaro.org> (raw)
In-Reply-To: <20190725131645.19501-1-peter.maydell@linaro.org>
On 7/25/19 6:16 AM, Peter Maydell wrote:
> The alternate signal stack set up by the sigaltstack syscall is
> supposed to be per-thread. We were incorrectly implementing it as
> process-wide. This causes problems for guest binaries that rely on
> this. Notably the Go runtime does, and so we were seeing crashes
> caused by races where two guest threads might incorrectly both
> execute on the same stack simultaneously.
>
> Replace the global target_sigaltstack_used with a field
> sigaltstack_used in the TaskState, and make all the references to the
> old global instead get a pointer to the TaskState and use the field.
>
> Fixes: https://bugs.launchpad.net/qemu/+bug/1696773
> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
> ---
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
r~
next prev parent reply other threads:[~2019-07-25 14:33 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-07-25 13:16 [Qemu-devel] [PATCH for-4.1] linux-user: Make sigaltstack stacks per-thread Peter Maydell
2019-07-25 13:34 ` Laurent Vivier
2019-07-25 14:33 ` Richard Henderson [this message]
2019-07-26 17:17 ` Laurent Vivier
2019-07-26 17:21 ` Peter Maydell
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=4a4fbeee-e389-81a8-0264-355a8e8af2bf@linaro.org \
--to=richard.henderson@linaro.org \
--cc=laurent@vivier.eu \
--cc=patches@linaro.org \
--cc=peter.maydell@linaro.org \
--cc=qemu-devel@nongnu.org \
--cc=riku.voipio@iki.fi \
/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).