qemu/contrib/plugins
Akihiko Odaki 1063693e1c contrib/plugins: Use GRWLock in execlog
execlog had the following comment:
> As we could have multiple threads trying to do this we need to
> serialise the expansion under a lock. Threads accessing already
> created entries can continue without issue even if the ptr array
> gets reallocated during resize.

However, when the ptr array gets reallocated, the other threads may have
a stale reference to the old buffer. This results in use-after-free.

Use GRWLock to properly fix this issue.

Fixes: 3d7caf145e ("contrib/plugins: add execlog to log instruction execution and memory access")
Signed-off-by: Akihiko Odaki <akihiko.odaki@daynix.com>
Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
Message-Id: <20230912224107.29669-5-akihiko.odaki@daynix.com>
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Message-Id: <20231009164104.369749-12-alex.bennee@linaro.org>
2023-10-11 08:46:33 +01:00
..
cache.c * only build util/async-teardown.c when system build is requested 2023-09-07 10:29:06 -04:00
drcov.c contrib/plugins/drcov: Fix string format 2023-09-07 12:54:17 +02:00
execlog.c contrib/plugins: Use GRWLock in execlog 2023-10-11 08:46:33 +01:00
hotblocks.c plugins: fix memory leak while parsing options 2023-07-03 12:51:58 +01:00
hotpages.c plugins: fix memory leak while parsing options 2023-07-03 12:51:58 +01:00
howvec.c contrib/plugins/howvec: Fix string format 2023-09-07 12:54:17 +02:00
hwprofile.c plugins: fix memory leak while parsing options 2023-07-03 12:51:58 +01:00
lockstep.c * only build util/async-teardown.c when system build is requested 2023-09-07 10:29:06 -04:00
Makefile contrib/plugins: use an independent makefile 2023-09-07 13:32:35 +02:00