linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/2] mm: memfd_luo: fixes for folio flag preservation
@ 2026-02-23 17:39 Pratyush Yadav
  2026-02-23 17:39 ` [PATCH 1/2] mm: memfd_luo: always make all folios uptodate Pratyush Yadav
  2026-02-23 17:39 ` [PATCH 2/2] mm: memfd_luo: always dirty all folios Pratyush Yadav
  0 siblings, 2 replies; 3+ messages in thread
From: Pratyush Yadav @ 2026-02-23 17:39 UTC (permalink / raw)
  To: Pasha Tatashin, Mike Rapoport, Pratyush Yadav, Andrew Morton
  Cc: linux-kernel, linux-mm

From: "Pratyush Yadav (Google)" <pratyush@kernel.org>

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
-- 
2.53.0.371.g1d285c8824-goog



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2026-02-23 17:39 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-02-23 17:39 [PATCH 0/2] mm: memfd_luo: fixes for folio flag preservation Pratyush Yadav
2026-02-23 17:39 ` [PATCH 1/2] mm: memfd_luo: always make all folios uptodate Pratyush Yadav
2026-02-23 17:39 ` [PATCH 2/2] mm: memfd_luo: always dirty all folios Pratyush Yadav

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox