Re: [PATCH] tests/tcg/multiarch: add vma-pthread.c

2022-12-24 Thread Richard Henderson
On 12/23/22 04:02, Ilya Leoshkevich wrote: +static void *thread_write(void *arg) +{ +struct context *ctx = arg; +struct timespec *ts; +size_t i, j; +int ret; + +for (i = 0; ctx->mutator_count; i++) { +j = (i & PAGE_IDX_MASK) | PAGE_IDX_W_MASK; +/* Write

Re: [PATCH] tests/tcg/multiarch: add vma-pthread.c

2022-12-23 Thread Ilya Leoshkevich
On Fri, 2022-12-23 at 13:02 +0100, Ilya Leoshkevich wrote: > Add a test that locklessly changes and exercises page protection bits > from various threads. This helps catch race conditions in the VMA > handling. > > Signed-off-by: Ilya Leoshkevich > --- >  tests/tcg/multiarch/Makefile.target  |  

[PATCH] tests/tcg/multiarch: add vma-pthread.c

2022-12-23 Thread Ilya Leoshkevich
Add a test that locklessly changes and exercises page protection bits from various threads. This helps catch race conditions in the VMA handling. Signed-off-by: Ilya Leoshkevich --- tests/tcg/multiarch/Makefile.target | 3 + tests/tcg/multiarch/munmap-pthread.c | 16 +--