qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Richard Henderson <richard.henderson@linaro.org>
To: "Alex Bennée" <alex.bennee@linaro.org>
Cc: qemu-devel@nongnu.org
Subject: Re: [PATCH for-8.1] accel/tcg: Take mmap_lock in load_atomic16_or_exit
Date: Mon, 17 Jul 2023 16:07:51 +0100	[thread overview]
Message-ID: <10893737-8628-672d-af7d-7d959d1773f5@linaro.org> (raw)
In-Reply-To: <878rbeyg5m.fsf@linaro.org>

On 7/17/23 11:40, Alex Bennée wrote:
> 
> Richard Henderson <richard.henderson@linaro.org> writes:
> 
>> For user-only, the probe for page writability may race with another
>> thread's mprotect.  Take the mmap_lock around the operation.  This
>> is still faster than the start/end_exclusive fallback.
> 
> Did we have a bug report or replication for this?

See the comment:

> +         * We must take mmap_lock so that the query remains valid until
> +         * the write is complete -- tests/tcg/multiarch/munmap-pthread.c
> +         * is an example that can race.


r~


  reply	other threads:[~2023-07-17 18:26 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-07-16 17:01 [PATCH for-8.1] accel/tcg: Take mmap_lock in load_atomic16_or_exit Richard Henderson
2023-07-17 10:12 ` Peter Maydell
2023-07-17 15:07   ` Richard Henderson
2023-07-20 12:17     ` Peter Maydell
2023-07-17 10:40 ` Alex Bennée
2023-07-17 15:07   ` Richard Henderson [this message]
2023-07-17 18:57     ` Alex Bennée

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=10893737-8628-672d-af7d-7d959d1773f5@linaro.org \
    --to=richard.henderson@linaro.org \
    --cc=alex.bennee@linaro.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).