Skip to content

mm: memfd_luo: fixes for folio flag preservation

Pratyush Yadav linux-mm lkml stable 1 version Applied

Status from this message: [merged mm-hotfixes-stable] mm-memfd_luo-always-dirty-all-folios.patch removed from -mm tree

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest2 patches 6 repliesApplied 2/2

Patches in v1 All 2 applied

#Subject and filesSizeRepliesApplied
1/2mm: memfd_luo: always make all folios uptodatemm/memfd_luo.c+23 -23 repliesApplied
2/2mm: memfd_luo: always dirty all foliosmm/memfd_luo.c+21 -53 repliesApplied

Reviews trailers per patch

All 2 patches have a Reviewed-by or Acked-by.

PatchMike Rapoport (Microsoft)
1/2R-b
2/2R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [PATCH 0/2] mm: memfd_luo: fixes for folio flag preservation

From: "Pratyush Yadav (Google)" <[email protected]>

Hi,

This series contains a couple fixes for flag preservation for memfd live update.

The first patch fixes memfd preservation when fallocate() was used to pre-allocate some pages. For these memfds, all the writes to fallocated pages touched after preserve were lost.

The second patch fixes dirty flag tracking. If the dirty flag is not tracked correctly, the next kernel might incorrectly reclaim some folios under memory pressure, losing user data. This is a theoretical bug that I observed when reading the code, and haven't been able to reproduce it.

Regards,
Pratyush Yadav

Pratyush Yadav (Google) (2):
mm: memfd_luo: always make all folios uptodate
mm: memfd_luo: always dirty all folios

 mm/memfd_luo.c | 49 +++++++++++++++++++++++++++++++++++++++++++------
 1 file changed, 43 insertions(+), 6 deletions(-)

base-commit: 8bf22c33e7a172fbc72464f4cc484d23a6b412ba

Signature · 1 line
2.53.0.371.g1d285c8824-goog