xemu/linux-user
Alex Bennée f7e68c9c99 tcg/plugins: implement a qemu_plugin_user_exit helper
In user-mode emulation there is a small race between preexit_cleanup
and exit_group() which means we may end up calling instrumented
instructions before the kernel reaps child threads. To solve this we
implement a new helper which ensures the callbacks are flushed along
with any translations before we let the host do it's a thing.

While we are at it make the documentation of
qemu_plugin_register_atexit_cb clearer as to what the user can expect.

Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Reviewed-by: Mahmoud Mandour <ma.mandourr@gmail.com>
Acked-by: Warner Losh <imp@bsdimp.com>
Message-Id: <20210720232703.10650-21-alex.bennee@linaro.org>
2021-07-23 17:22:16 +01:00
..
aarch64 linux-user: update syscall_nr.h to Linux v5.13 2021-07-13 13:59:59 +02:00
alpha linux-user: update syscall.tbl to Linux v5.13 2021-07-13 13:59:59 +02:00
arm linux-user: update syscall.tbl to Linux v5.13 2021-07-13 13:59:59 +02:00
cris linux-user: Extract target errno to 'target_errno_defs.h' 2021-07-12 21:53:35 +02:00
generic linux-user: Extract target errno to 'target_errno_defs.h' 2021-07-12 21:53:35 +02:00
hexagon linux-user: update syscall_nr.h to Linux v5.13 2021-07-13 13:59:59 +02:00
host linux-user/: fix some comment spelling errors 2020-09-17 20:39:22 +02:00
hppa qemu/atomic: Add aligned_{int64,uint64}_t types 2021-07-21 07:45:38 -10:00
i386 linux-user: update syscall.tbl to Linux v5.13 2021-07-13 13:59:59 +02:00
m68k linux-user: update syscall.tbl to Linux v5.13 2021-07-13 13:59:59 +02:00
microblaze linux-user: update syscall.tbl to Linux v5.13 2021-07-13 13:59:59 +02:00
mips linux-user: update syscall.tbl to Linux v5.13 2021-07-13 13:59:59 +02:00
mips64 linux-user: update syscall.tbl to Linux v5.13 2021-07-13 13:59:59 +02:00
nios2 linux-user: update syscall_nr.h to Linux v5.13 2021-07-13 13:59:59 +02:00
openrisc linux-user: update syscall_nr.h to Linux v5.13 2021-07-13 13:59:59 +02:00
ppc linux-user: update syscall.tbl to Linux v5.13 2021-07-13 13:59:59 +02:00
riscv linux-user: update syscall_nr.h to Linux v5.13 2021-07-13 13:59:59 +02:00
s390x linux-user: update syscall.tbl to Linux v5.13 2021-07-13 13:59:59 +02:00
sh4 linux-user: update syscall.tbl to Linux v5.13 2021-07-13 13:59:59 +02:00
sparc linux-user: update syscall.tbl to Linux v5.13 2021-07-13 13:59:59 +02:00
x86_64 linux-user: update syscall.tbl to Linux v5.13 2021-07-13 13:59:59 +02:00
xtensa linux-user: update syscall.tbl to Linux v5.13 2021-07-13 13:59:59 +02:00
cpu_loop-common.h cpu: Replace ENV_GET_CPU with env_cpu 2019-06-10 07:03:34 -07:00
elfload.c linux-user/elfload: Implement ELF_HWCAP for RISC-V 2021-07-07 21:14:47 +02:00
errnos.c.inc linux-user: Simplify host <-> target errno conversion using macros 2021-07-12 21:53:35 +02:00
exit.c tcg/plugins: implement a qemu_plugin_user_exit helper 2021-07-23 17:22:16 +01:00
fd-trans.c fd-trans: Fix race condition on reallocation of the translation table. 2021-07-12 21:54:46 +02:00
fd-trans.h fd-trans: Fix race condition on reallocation of the translation table. 2021-07-12 21:54:46 +02:00
flat.h linux-user/: fix some comment spelling errors 2020-09-17 20:39:22 +02:00
flatload.c exec: Use cpu_untagged_addr in g2h; split out g2h_untagged 2021-02-16 11:04:53 +00:00
ioctls.h linux-user: Conditionalize TUNSETVNETLE 2021-01-07 05:09:06 -10:00
linux_loop.h linux-user: Add loop control ioctls 2016-07-19 15:22:33 +03:00
linuxload.c linux-user: Fix style problems in linuxload.c 2021-07-07 21:22:35 +02:00
main.c fd-trans: Fix race condition on reallocation of the translation table. 2021-07-12 21:54:46 +02:00
meson.build linux-user/sparc: Merge sparc64/ into sparc/ 2021-05-15 21:43:23 +02:00
mmap.c linux-user: Set CF_PARALLEL when mapping shared memory 2021-06-15 08:28:56 +02:00
qemu.h linux-user: Pass CPUArchState to do_sigaltstack 2021-05-15 21:43:23 +02:00
safe-syscall.S linux-user: Extract target errno to 'target_errno_defs.h' 2021-07-12 21:53:35 +02:00
semihost.c Do not include cpu.h if it's not really necessary 2021-05-02 17:24:51 +02:00
signal-common.h linux-user: Pass CPUArchState to target_restore_altstack 2021-05-15 21:43:23 +02:00
signal.c linux-user: Let sigaction query SIGKILL/SIGSTOP 2021-06-20 16:21:01 +02:00
socket.h Supply missing header guards 2019-06-12 13:20:21 +02:00
strace.c linux-user: Add strace support for printing arguments of llseek 2021-05-15 21:41:47 +02:00
strace.list linux-user: Add copy_file_range to strace.list 2021-05-18 07:09:58 +02:00
syscall_defs.h linux-user: Extract target errno to 'target_errno_defs.h' 2021-07-12 21:53:35 +02:00
syscall_types.h linux-user: Add support for btrfs ioctls used to scrub a filesystem 2020-09-03 01:09:35 +02:00
syscall.c linux-user/syscall: Remove ERRNO_TABLE_SIZE check 2021-07-12 21:53:35 +02:00
target_flat.h Supply missing header guards 2019-06-12 13:20:21 +02:00
trace-events linux-user/trace-events: fix minor typo in format string 2021-06-17 16:09:11 +02:00
trace.h trace: switch position of headers to what Meson requires 2020-08-21 06:18:24 -04:00
uaccess.c linux-user: Use signed lengths in uaccess.c 2021-04-07 18:55:27 +02:00
uname.c cpu: Replace ENV_GET_CPU with env_cpu 2019-06-10 07:03:34 -07:00
uname.h Clean up decorations and whitespace around header guards 2016-07-12 16:20:46 +02:00
vm86.c linux-user: Use `qemu_log' for non-strace logging 2020-02-19 11:17:40 +01:00