Linux-mm Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 0/3] liveupdate: serialization safety and race fixes
@ 2026-05-06 18:20 Pasha Tatashin
  2026-05-06 18:20 ` [PATCH v2 1/3] kho: skip KHO data for context-preserving kexec Pasha Tatashin
                   ` (2 more replies)
  0 siblings, 3 replies; 10+ messages in thread
From: Pasha Tatashin @ 2026-05-06 18:20 UTC (permalink / raw)
  To: rppt, sourabhjain, jbouron, akpm, linux-mm, bhe, linux-kernel,
	dan.carpenter, pasha.tatashin, rafael.j.wysocki, piliu, kexec,
	pratyush, graf, changyuanl, mario.limonciello

This series addresses several issues related to the synchronization
between the reboot process and LUO session management.

Changes in v2:
- Added a patch to skip KHO data for context-preserving kexec (suggested
  by Pratyush Yadav).
- Dropped the 'rebooting' flag and manual session pinning patches from
  v1.
- Implemented a locking approach in luo_session_serialize() to prevent
  concurrent session mutations and release (suggested by Pratyush).

1. Skip KHO data for context-preserving kexec: A preserve_context kexec
returns to the current kernel, which means the 2nd kernel does not use
KHO data. Passing KHO data via setup_data or devicetree is unnecessary.

2. Skip LUO serialization for context-preserving kexec: A
preserve_context kexec returns to the current kernel, which is unrelated
to live update where state is passed to the next kernel. Skipping
serialization avoids unnecessary work and prevents sessions from being
left in a frozen state upon return.

3. Block outgoing session mutations using locks: During the reboot()
syscall, user processes may still be running concurrently and attempting
to mutate sessions. To prevent this, we hold the session header's rwsem
and each session's mutex indefinitely on successful serialization. This
effectively pins the sessions and blocks concurrent modifications
without needing custom flags.

Tree: git.kernel.org/pub/scm/linux/kernel/git/tatashin/linux.git Branch:
luo-reboot-sync/v2

Pasha Tatashin (3):
  kho: skip KHO data for context-preserving kexec
  liveupdate: skip serialization for context-preserving kexec
  liveupdate: block outgoing session mutations

 kernel/kexec_core.c                |  8 +++++---
 kernel/liveupdate/kexec_handover.c |  3 ++-
 kernel/liveupdate/luo_session.c    | 12 +++++++++---
 3 files changed, 16 insertions(+), 7 deletions(-)


base-commit: 7b0b68b2b95606e65594958686833e53423f58f2
-- 
2.54.0.545.g6539524ca2-goog



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

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

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-05-06 18:20 [PATCH v2 0/3] liveupdate: serialization safety and race fixes Pasha Tatashin
2026-05-06 18:20 ` [PATCH v2 1/3] kho: skip KHO data for context-preserving kexec Pasha Tatashin
2026-05-11 10:38   ` Mike Rapoport
2026-05-11 11:16     ` Pratyush Yadav
2026-05-11 13:11     ` Pasha Tatashin
2026-05-11 11:00   ` Pratyush Yadav
2026-05-06 18:20 ` [PATCH v2 2/3] liveupdate: skip serialization " Pasha Tatashin
2026-05-06 18:20 ` [PATCH v2 3/3] liveupdate: block outgoing session mutations Pasha Tatashin
2026-05-11 11:03   ` Pratyush Yadav
2026-05-11 13:44     ` Pasha Tatashin

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