]> git.ipfire.org Git - thirdparty/qemu.git/commit
linux-user: Emulate /proc/self/maps under mmap_lock
authorIlya Leoshkevich <iii@linux.ibm.com>
Mon, 14 Oct 2024 20:34:21 +0000 (22:34 +0200)
committerMichael Tokarev <mjt@tls.msk.ru>
Fri, 25 Oct 2024 13:47:26 +0000 (16:47 +0300)
commit356d3ecec0feef1be7a2b2db37d1f3f99a0562be
tree1606ba4933ea1d3a2f9a5381e7ef3cc678a9fdde
parent3a41aa8226bdaa709121515faea6e0e5ad1efa39
linux-user: Emulate /proc/self/maps under mmap_lock

If one thread modifies the mappings and another thread prints them,
a situation may occur that the printer thread sees a guest mapping
without a corresponding host mapping, leading to a crash in
open_self_maps_2().

Cc: qemu-stable@nongnu.org
Fixes: 7b7a3366e142 ("linux-user: Use walk_memory_regions for open_self_maps")
Signed-off-by: Ilya Leoshkevich <iii@linux.ibm.com>
Reviewed-by: Laurent Vivier <laurent@vivier.eu>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-ID: <20241014203441.387560-1-iii@linux.ibm.com>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
(cherry picked from commit bbd5630a75e70a0f1bcf04de74c94aa94a145628)
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
linux-user/syscall.c