mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-05 08:43:55 -06:00
tests/tcg/multiarch: add vma-pthread.c
Add a test that locklessly changes and exercises page protection bits from various threads. This helps catch race conditions in the VMA handling. Acked-by: Alex Bennée <alex.bennee@linaro.org> Signed-off-by: Ilya Leoshkevich <iii@linux.ibm.com> Message-Id: <20221223120252.513319-1-iii@linux.ibm.com> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
This commit is contained in:
parent
e630c0126c
commit
d4846c33eb
4 changed files with 236 additions and 15 deletions
|
@ -7,21 +7,7 @@
|
|||
#include <sys/mman.h>
|
||||
#include <unistd.h>
|
||||
|
||||
static const char nop_func[] = {
|
||||
#if defined(__aarch64__)
|
||||
0xc0, 0x03, 0x5f, 0xd6, /* ret */
|
||||
#elif defined(__alpha__)
|
||||
0x01, 0x80, 0xFA, 0x6B, /* ret */
|
||||
#elif defined(__arm__)
|
||||
0x1e, 0xff, 0x2f, 0xe1, /* bx lr */
|
||||
#elif defined(__riscv)
|
||||
0x67, 0x80, 0x00, 0x00, /* ret */
|
||||
#elif defined(__s390__)
|
||||
0x07, 0xfe, /* br %r14 */
|
||||
#elif defined(__i386__) || defined(__x86_64__)
|
||||
0xc3, /* ret */
|
||||
#endif
|
||||
};
|
||||
#include "nop_func.h"
|
||||
|
||||
static void *thread_mmap_munmap(void *arg)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue