Skip to content

liveupdate: tighten handover cleanup and session lifetime

Oskar Gerlicz Kowalczuk kexec linux-mm lkml 3 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v4 Latest5 patches 5 repliesIn review
  2. v35 patches 7 repliesSuperseded
  3. v15 patches 2 repliesSuperseded

Patches in v4 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/5liveupdate: block outgoing session updates during rebootkernel/liveupdate/luo_internal.h kernel/liveupdate/luo_session.c+259 -580 replies
2/5kexec: abort liveupdate handover on kernel_kexec() unwindinclude/linux/liveupdate.h kernel/kexec_core.c kernel/liveupdate/luo_core.c +2 more+51 -20 replies
3/5liveupdate: fail session restore on file deserialization errorsinclude/linux/liveupdate.h kernel/liveupdate/luo_file.c kernel/liveupdate/luo_internal.h +2 more+100 -510 replies
4/5liveupdate: validate handover metadata before using itinclude/linux/kexec_handover.h kernel/liveupdate/kexec_handover.c kernel/liveupdate/luo_file.c +3 more+147 -110 replies
5/5liveupdate: harden FLB lifetime and remaining teardown pathsinclude/linux/kexec_handover.h include/linux/liveupdate.h kernel/kexec_core.c +8 more+437 -1050 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v4 yet.

Read the v4 thread

Cover letter [PATCH v4 0/5] liveupdate: tighten handover cleanup and session lifetime

Hi Pasha,

this v4 keeps the simpler direction from your mail: outgoing handover is still driven by a boolean rebooting gate, refcount pinning of outgoing sessions during serialization, and session->mutex as the serialization point for in-flight mutations. There is no return to the earlier closing counter or a larger session state machine.

The main changes in this respin are:

- reshape the series into five commits, each building and standing on its own
- keep incoming session origin immutable and use retrieved only as the checked-out bit
- make FINISH and implicit close consume incoming sessions without reopening races through retrieve-by-name
- route deserialize failures through explicit rollback paths for sessions, files, and serialized memfd state
- validate KHO-preserved extents before walking serialized metadata
- harden incoming FLB lifetime and remaining teardown paths

Patches 1-4 keep the core session, kexec, deserialize and validation work separate. Patch 5 carries the remaining FLB and teardown fixes needed to match the final tree.

Oskar Gerlicz Kowalczuk (5):
liveupdate: block outgoing session updates during reboot
kexec: abort liveupdate handover on kernel_kexec() unwind
liveupdate: fail session restore on file deserialization errors
liveupdate: validate handover metadata before using it
liveupdate: harden FLB lifetime and remaining teardown paths

 include/linux/kexec_handover.h     |  13 +
 include/linux/liveupdate.h         |  17 +-
 kernel/kexec_core.c                |   4 +
 kernel/liveupdate/kexec_handover.c |  22 ++
 kernel/liveupdate/luo_core.c       |  16 +-
 kernel/liveupdate/luo_file.c       | 237 ++++++++++++--
 kernel/liveupdate/luo_flb.c        | 116 +++++--
 kernel/liveupdate/luo_internal.h   |  14 +-
 kernel/liveupdate/luo_session.c    | 500 ++++++++++++++++++++++++-----
 lib/tests/liveupdate.c             |   2 +
 mm/memfd_luo.c                     | 160 +++++++--
 11 files changed, 934 insertions(+), 167 deletions(-)
Signature · 1 line
2.53.0