Skip to content

memfd_luo: keep memfd frozen until finish

Pratyush Yadav kexec linux-mm lkml 3 versions – New

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v3 Latest2 patches 0 repliesNew
  2. v22 patches 5 repliesSuperseded
  3. v12 patches 3 repliesSuperseded

Changes in v3 from the cover letter

- 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.

Patches in v3 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2liveupdate: luo_file: allow keeping private_data from retrieve until finishinclude/linux/liveupdate.h kernel/liveupdate/luo_file.c+15 -70 replies
2/2mm/memfd_luo: keep memfd frozen until finishmm/memfd_luo.c+72 -190 replies

Reviews trailers per patch

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

PatchPasha TatashinSamiullah KhawajaChris Down
1/2R-b R-b R-b T-b
2/2R-b R-b R-b T-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 3 reviewers.

Read the v3 thread

Cover letter [PATCH v3 0/2] memfd_luo: keep memfd frozen until finish

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

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/[email protected]/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/[email protected]/
v2: https://lore.kernel.org/kexec/[email protected]/

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

Signature · 1 line
2.56.1.750.gf70dc682cf-goog