Skip to content

liveupdate: fixes in error handling

Pratyush Yadav linux-mm lkml 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest2 patches 8 repliesIn review 1 of 2 applied

Patches in v1 1 of 2 applied

#Subject and filesSizeRepliesApplied
1/2liveupdate: luo_file: do not clear serialized_data on unfreezekernel/liveupdate/luo_file.c+0 -24 repliesApplied
2/2liveupdate: luo_file: remember retrieve() statusinclude/linux/liveupdate.h kernel/liveupdate/luo_file.c mm/memfd_luo.c+36 -194 replies

Reviews trailers per patch

1 of 2 patches has a Reviewed-by or Acked-by.

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

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] liveupdate: fixes in error handling

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

Hi Andrew,

This series contains some fixes in LUO's error handling paths.

The first patch deals with failed freeze() attempts. The cleanup path calls unfreeze, and that clears some data needed by later unpreserve calls.

The second patch is a bit more involved. It deals with failed retrieve() attempts. To do so properly, it reworks some of the error handling logic in luo_file core.

Both these fixes are "theoretical" -- in the sense that I have not been able to reproduce either of them in normal operation. The only supported file type right now is memfd, and there is nothing userspace can do right now to make it fail its retrieve or freeze. I need to make the retrieve or freeze fail by artificially injecting errors. The injected errors trigger a use-after-free and a double-free.

That said, once more complex file handlers are added or memfd preservation is used in ways not currently expected or covered by the tests, we will be able to see them on real systems.

Regards,
Pratyush Yadav

Pratyush Yadav (Google) (2):
liveupdate: luo_file: do not clear serialized_data on unfreeze
liveupdate: luo_file: remember retrieve() status

 include/linux/liveupdate.h   |  7 ++++--
 kernel/liveupdate/luo_file.c | 43 +++++++++++++++++++++---------------
 mm/memfd_luo.c               |  7 +++++-
 3 files changed, 36 insertions(+), 21 deletions(-)

base-commit: 2e833046d66a40f9ad3de2948e6ecd791939fa59

Signature · 1 line
2.52.0.457.g6b5491de43-goog