Re: [PATCH 2/4] kselftest: vm: Fix mdwe's mmap_FIXED test case

From: Florent Revest
Date: Thu May 04 2023 - 13:13:43 EST


On Thu, May 4, 2023 at 7:10 PM Florent Revest <revest@xxxxxxxxxxxx> wrote:
>
> I checked with the original author, the mmap_FIXED test case wasn't
> properly tested and fails. Currently, it maps two consecutive (non
> overlapping) pages and expects the second mapping to be denied by MDWE
> but these two pages have nothing to do with each other so MDWE is
> actually out of the picture here.
>
> What the test actually intended to do was to remap a virtual address
> using MAP_FIXED. However, this operation unmaps the existing mapping and
> creates a new one so the va is backed by a new page and MDWE is again
> out of the picture, all remappings should succeed.
>
> This patch keeps the test case to make it clear that this situation is
> expected to work.
>
> Signed-off-by: Florent Revest <revest@xxxxxxxxxxxx>

Ah, snap, I hit send to fast and forgot to add:

Fixes: 4cf1fe34fd18 ("kselftest: vm: add tests for memory-deny-write-execute")

I will do it in the next iteration (surely there'll be other things to
fix... :))