diff options
| author | Ilya Leoshkevich <iii@linux.ibm.com> | 2022-12-23 13:02:52 +0100 |
|---|---|---|
| committer | Richard Henderson <richard.henderson@linaro.org> | 2023-01-05 11:41:29 -0800 |
| commit | d4846c33ebe04d2141dcc613b5558d2f1d8077af (patch) | |
| tree | e539661999b555bf68097bf561189f059a5afa9f /tests/tcg/multiarch/munmap-pthread.c | |
| parent | e630c0126c561b7db26790e8288c4fe9b61ae8dc (diff) | |
| download | focaccia-qemu-d4846c33ebe04d2141dcc613b5558d2f1d8077af.tar.gz focaccia-qemu-d4846c33ebe04d2141dcc613b5558d2f1d8077af.zip | |
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>
Diffstat (limited to 'tests/tcg/multiarch/munmap-pthread.c')
| -rw-r--r-- | tests/tcg/multiarch/munmap-pthread.c | 16 |
1 files changed, 1 insertions, 15 deletions
diff --git a/tests/tcg/multiarch/munmap-pthread.c b/tests/tcg/multiarch/munmap-pthread.c index d7143b00d5..1c79005846 100644 --- a/tests/tcg/multiarch/munmap-pthread.c +++ b/tests/tcg/multiarch/munmap-pthread.c @@ -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) { |