qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH v3] accel/tcg: Clear PAGE_WRITE before translation


From: Richard Henderson
Subject: Re: [PATCH v3] accel/tcg: Clear PAGE_WRITE before translation
Date: Mon, 16 Aug 2021 08:23:23 -1000
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.11.0

On 8/5/21 10:48 AM, Ilya Leoshkevich wrote:
translate_insn() implementations fetch instruction bytes piecemeal,
which can cause qemu-user to generate inconsistent translations if
another thread modifies them concurrently [1].

Fix by making pages containing translated instruction non-writable
right before loading instruction bytes from them.

[1] https://lists.nongnu.org/archive/html/qemu-devel/2021-08/msg00644.html

Signed-off-by: Ilya Leoshkevich <iii@linux.ibm.com>
---

v2: https://lists.nongnu.org/archive/html/qemu-devel/2021-08/msg00819.html
v2 -> v3: Move translator_ld*_swap() functions from translator.h into
           translator.c for a better size trade-off (Richard).

Thanks, queued.

I've split apart the patch so that we add the argument (and make all of the other changes to target/) before actually changing the mapping.

r~



reply via email to

[Prev in Thread] Current Thread [Next in Thread]