mempool: Test COW vs malloc_init race
authorMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Sun, 17 Mar 2024 20:31:11 +0000 (16:31 -0400)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Mon, 18 Mar 2024 02:34:30 +0000 (22:34 -0400)
commit2a6740bcb954bf4141c99778cd7309a037e6cd3e
treee179a6bd9705955c9f7eda805ae8c59586c14684
parentfbe558043e3c3ef60cafc442d655abbe33bcdb52
mempool: Test COW vs malloc_init race

Test that the entire malloc init value is visible in CPU mappings. If
the COW page copy race vs init happens while init is in the middle of
storing to the newly allocated area, iteration on all CPUs comparing the
visible content to the init value is responsible for detecting and
mitigating uninitialized or partially initialized init value from the
point of view of a CPU. Validate that this scheme has the intended
effect wrt a concurrent COW caused by storing to a nearby per-cpu area
on the same page.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Change-Id: Iebde10eb61e80cc0d8eb0ebc89925f4a2ad9de9c
.gitignore
tests/Makefile.am
tests/mempool_cow_race_test.c [new file with mode: 0644]
tests/mempool_cow_race_test_cxx.cpp [new file with mode: 0644]
This page took 0.024784 seconds and 4 git commands to generate.