[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH for-8.1] accel/tcg: Take mmap_lock in load_atomic16_or_exit
From: |
Alex Bennée |
Subject: |
Re: [PATCH for-8.1] accel/tcg: Take mmap_lock in load_atomic16_or_exit |
Date: |
Mon, 17 Jul 2023 19:57:29 +0100 |
User-agent: |
mu4e 1.11.9; emacs 29.0.92 |
Richard Henderson <richard.henderson@linaro.org> writes:
> 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.
doh...
>
>
> r~
--
Alex Bennée
Virtualisation Tech Lead @ Linaro