Linux-mm Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v3 0/2] memfd_luo: keep memfd frozen until finish
@ 2026-11-23 13:05 Pratyush Yadav
  2026-11-23 13:05 ` [PATCH v3 1/2] liveupdate: luo_file: allow keeping private_data from retrieve " Pratyush Yadav
  2026-11-23 13:05 ` [PATCH v3 2/2] mm/memfd_luo: keep memfd frozen " Pratyush Yadav
  0 siblings, 2 replies; 3+ messages in thread
From: Pratyush Yadav @ 2026-11-23 13:05 UTC (permalink / raw)
  To: Pasha Tatashin, Mike Rapoport, Pratyush Yadav, Andrew Morton,
	Samiullah Khawaja, Chris Down
  Cc: kexec, linux-kernel, linux-mm

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

Hi,

This series keeps a retrieved memfd frozen until finish. The main
motivation is to let dependents like iommufd have a chance to acquire a
reference. It also fits conceptually: finish is the point when the file
should be back to "normal".

Patch 1 allows keeping private_data from retrieve to finish. This is
needed by memfd to keep hold of folios_ser, which it uses to give up its
pins.

Patch 2 does the main change.

The series is based on
https://lore.kernel.org/kexec/20261123130115.4021199-1-pratyush@kernel.org/T/#u

Changes in v3:
- Patch 2: Document in the Restrictions section that fallocate() fails
  in all modes while the memfd is frozen, and that adding F_SEAL_WRITE
  fails with -EBUSY until finish.
- Collect tags.

Changes in v2:
- Replace the stale reference to the 'data' field in the struct
liveupdate_file_op_args kerneldoc with 'file', 'serialized_data' and
'private_data'. (Pasha)
- Collect Reviewed-by tags from Pasha.
- Rebase on the latest liveupdate/next.

v1: https://lore.kernel.org/all/20261103181916.2462825-1-pratyush@kernel.org/
v2: https://lore.kernel.org/kexec/20261103172251.2348370-1-pratyush@kernel.org/

Regards,
Pratyush Yadav

Pratyush Yadav (Google) (2):
  liveupdate: luo_file: allow keeping private_data from retrieve until
    finish
  mm/memfd_luo: keep memfd frozen until finish

 include/linux/liveupdate.h   | 11 +++--
 kernel/liveupdate/luo_file.c | 11 +++--
 mm/memfd_luo.c               | 91 ++++++++++++++++++++++++++++--------
 3 files changed, 87 insertions(+), 26 deletions(-)


base-commit: 4209b08181c75ea02164832cd8f47526de28d40c
prerequisite-patch-id: e225259e2b7bb6664d8efdf9ca0bdfae24616fee
-- 
2.56.1.750.gf70dc682cf-goog



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

end of thread, other threads:[~2026-11-23 13:05 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-11-23 13:05 [PATCH v3 0/2] memfd_luo: keep memfd frozen until finish Pratyush Yadav
2026-11-23 13:05 ` [PATCH v3 1/2] liveupdate: luo_file: allow keeping private_data from retrieve " Pratyush Yadav
2026-11-23 13:05 ` [PATCH v3 2/2] mm/memfd_luo: keep memfd frozen " Pratyush Yadav

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