Re: [PATCH v2 4/8] selftests/mm: fix usage of FORCE_READ() in cow tests

David Hildenbrand (Red Hat)
2026-01-19T10:50:20Z

On 1/7/26 17:48, Kevin Brodsky wrote:
> Commit 5bbc2b785e63 ("selftests/mm: fix FORCE_READ to read input
> value correctly") modified FORCE_READ() to take a value instead of a
> pointer. It also changed most of the call sites accordingly, but
> missed many of them in cow.c. In those cases, we ended up with the
> pointer itself being read, not the memory it points to.
>
> No failure occurred as a result, so it looks like the tests work
> just fine without faulting in. However, the huge_zeropage tests
> explicitly check that pages are populated, so those became skipped.

Right, that's nasty! Thanks!

For all cases, we could probably just fail if the memory is not
populated after FORCE_READ().

Would you have time to prepare a patch for that?

Acked-by: David Hildenbrand (Red Hat) <david@kernel.org>

--
Cheers

David