Re: [PATCH for-8.1] accel/tcg: Take mmap_lock in load_atomic16_or_exit

2023-07-20 Thread Peter Maydell
On Mon, 17 Jul 2023 at 19:25, Richard Henderson wrote: > > On 7/17/23 11:12, Peter Maydell wrote: > > On Sun, 16 Jul 2023 at 18:03, Richard Henderson > > wrote: > >> > >> For user-only, the probe for page writability may race with another > >> thread's mprotect. Take the mmap_lock around the

Re: [PATCH for-8.1] accel/tcg: Take mmap_lock in load_atomic16_or_exit

2023-07-17 Thread Alex Bennée
Richard Henderson writes: > On 7/17/23 11:40, Alex Bennée wrote: >> Richard Henderson 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

Re: [PATCH for-8.1] accel/tcg: Take mmap_lock in load_atomic16_or_exit

2023-07-17 Thread Richard Henderson
On 7/17/23 11:40, Alex Bennée wrote: Richard Henderson 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

Re: [PATCH for-8.1] accel/tcg: Take mmap_lock in load_atomic16_or_exit

2023-07-17 Thread Richard Henderson
On 7/17/23 11:12, Peter Maydell wrote: On Sun, 16 Jul 2023 at 18:03, Richard Henderson wrote: 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. Remove

Re: [PATCH for-8.1] accel/tcg: Take mmap_lock in load_atomic16_or_exit

2023-07-17 Thread Alex Bennée
Richard Henderson 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? > > Remove the

Re: [PATCH for-8.1] accel/tcg: Take mmap_lock in load_atomic16_or_exit

2023-07-17 Thread Peter Maydell
On Sun, 16 Jul 2023 at 18:03, Richard Henderson wrote: > > 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. > > Remove the write probe in

[PATCH for-8.1] accel/tcg: Take mmap_lock in load_atomic16_or_exit

2023-07-16 Thread Richard Henderson
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. Remove the write probe in load_atomic8_or_exit. There we don't have the same machinery for testing the