Re: [PATCH 5/6] selftests/liveupdate: add test for operations on a preserved memfd

From: Mike Rapoport

Date: Wed Mar 18 2026 - 03:38:25 EST


On Mon, Mar 09, 2026 at 11:54:38AM +0000, Pratyush Yadav wrote:
> From: "Pratyush Yadav (Google)" <pratyush@xxxxxxxxxx>
>
> Once a memfd is preserved, certain operations are not allowed to
> succeed since they might make the state of the memfd inconsistent with
> the serialized state. Among these operations are truncating or growing
> the memfd. Writes and reads to already existing memfd should succeed.
>
> Add a test that makes sure a preserved memfd does not allow growing or
> shrinking, but does allow reads and writes to existing memory to go
> thorough.
>
> Signed-off-by: Pratyush Yadav <ptyadav@xxxxxxxxx>
> Signed-off-by: Pratyush Yadav (Google) <pratyush@xxxxxxxxxx>

Reviewed-by: Mike Rapoport (Microsoft) <rppt@xxxxxxxxxx>

--
Sincerely yours,
Mike.