linux/Documentation
Pasha Tatashin cab056f2aa liveupdate: luo_flb: introduce File-Lifecycle-Bound global state
Introduce a mechanism for managing global kernel state whose lifecycle is
tied to the preservation of one or more files.  This is necessary for
subsystems where multiple preserved file descriptors depend on a single,
shared underlying resource.

An example is HugeTLB, where multiple file descriptors such as memfd and
guest_memfd may rely on the state of a single HugeTLB subsystem. 
Preserving this state for each individual file would be redundant and
incorrect.  The state should be preserved only once when the first file is
preserved, and restored/finished only once the last file is handled.

This patch introduces File-Lifecycle-Bound (FLB) objects to solve this
problem.  An FLB is a global, reference-counted object with a defined set
of operations:

- A file handler (struct liveupdate_file_handler) declares a dependency
  on one or more FLBs via a new registration function,
  liveupdate_register_flb().
- When the first file depending on an FLB is preserved, the FLB's
  .preserve() callback is invoked to save the shared global state. The
  reference count is then incremented for each subsequent file.
- Conversely, when the last file is unpreserved (before reboot) or
  finished (after reboot), the FLB's .unpreserve() or .finish() callback
  is invoked to clean up the global resource.

The implementation includes:

- A new set of ABI definitions (luo_flb_ser, luo_flb_head_ser) and a
  corresponding FDT node (luo-flb) to serialize the state of all active
  FLBs and pass them via Kexec Handover.
- Core logic in luo_flb.c to manage FLB registration, reference
  counting, and the invocation of lifecycle callbacks.
- An API (liveupdate_flb_get/_incoming/_outgoing) for other kernel
  subsystems to safely access the live object managed by an FLB, both
  before and after the live update.

This framework provides the necessary infrastructure for more complex
subsystems like IOMMU, VFIO, and KVM to integrate with the Live Update
Orchestrator.

Link: https://lkml.kernel.org/r/20251218155752.3045808-5-pasha.tatashin@soleen.com
Signed-off-by: Pasha Tatashin <pasha.tatashin@soleen.com>
Cc: Alexander Graf <graf@amazon.com>
Cc: David Gow <davidgow@google.com>
Cc: David Matlack <dmatlack@google.com>
Cc: David Rientjes <rientjes@google.com>
Cc: Jonathan Corbet <corbet@lwn.net>
Cc: Kees Cook <kees@kernel.org>
Cc: Mike Rapoport <rppt@kernel.org>
Cc: Petr Mladek <pmladek@suse.com>
Cc: Pratyush Yadav <pratyush@kernel.org>
Cc: Samiullah Khawaja <skhawaja@google.com>
Cc: Tamir Duberstein <tamird@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
2026-02-08 00:13:33 -08:00
..
ABI treewide: Update email address 2026-01-11 06:09:11 -10:00
accel accel/qaic: Separate DBC_STATE_* definition list 2025-11-10 14:50:06 -07:00
accounting delayacct: add timestamp of delay max 2026-01-31 16:16:06 -08:00
admin-guide panic: add panic_force_cpu= parameter to redirect panic to a specific CPU 2026-02-03 08:21:26 -08:00
arch treewide: Update email address 2026-01-11 06:09:11 -10:00
block
bpf docs: bpf: map_array: Specify BPF_MAP_TYPE_PERCPU_ARRAY value size limit 2025-11-25 14:32:00 -08:00
cdrom
core-api liveupdate: luo_flb: introduce File-Lifecycle-Bound global state 2026-02-08 00:13:33 -08:00
cpu-freq
crypto This update includes the following changes: 2025-12-03 11:28:38 -08:00
dev-tools checkpatch: add an invalid patch separator test 2026-01-31 16:16:03 -08:00
devicetree phy fixes for 6.19 2026-01-18 13:18:40 -08:00
doc-guide docs: parse-headers.rst: Fix a typo 2025-11-18 09:13:40 -07:00
driver-api treewide: Update email address 2026-01-11 06:09:11 -10:00
edac
fault-injection
fb
features Apart from the usual small churn, we have 2025-12-05 16:30:56 -08:00
filesystems kernel.h: move VERIFY_OCTAL_PERMISSIONS() to sysfs.h 2026-01-31 16:16:05 -08:00
firmware-guide Documentation: ACPI: i2c-muxes: fix I2C device references 2025-11-03 17:01:05 +01:00
firmware_class
fpga
gpu Extra drm-misc-next for v6.19-rc1: 2025-12-02 18:09:08 +10:00
hid Documentation: hid-alps: Format DataByte* subsection headings 2025-11-18 17:53:10 +01:00
hwmon hwmon: (DS620) Update broken Datasheet URL in driver documentation 2025-12-18 09:50:27 -08:00
i2c i2c: i801: Add support for Intel Nova Lake-S 2025-12-17 00:28:51 +01:00
iio Documentation: iio: ade9000, adis*, adx*: Convert IIO subsystem cross-references 2025-10-19 11:59:16 +01:00
images
infiniband
input Input: add ABS_SND_PROFILE 2025-12-18 21:34:42 -08:00
isdn
kbuild kbuild: doc: improve KBUILD_BUILD_TIMESTAMP documentation 2025-11-08 12:17:58 +01:00
kernel-hacking
leds leds: lp55xx_common: Enable use without FW_LOADER_USER_HELPER 2025-10-21 10:46:30 +01:00
litmus-tests
livepatch
locking documentation: seqlock: fix the wrong documentation of read_seqbegin_or_lock/need_seqretry 2025-10-21 12:31:56 +02:00
maintainer NFSD: Add a subsystem policy document 2025-11-16 18:20:11 -05:00
mhi
misc-devices Documentation: tps6594-pfsm: Fix macro cross-reference syntax 2025-11-10 12:54:49 -07:00
mm kho: docs: combine concepts and FDT documentation 2026-01-26 19:07:11 -08:00
netlabel
netlink Merge branch 'pm-em' 2026-01-16 16:16:24 +01:00
networking Documentation: net: dsa: mention simple HSR offload helpers 2025-12-01 16:51:55 -08:00
nvdimm
nvme
PCI Documentation: PCI: Amend error recovery doc with pci_save_state() rules 2025-11-24 16:59:10 -06:00
pcmcia
peci
power More power management updates for 6.19-rc1 2025-12-10 06:29:40 +09:00
process Documentation/process: maintainer-soc: Mark 'make' as commands 2026-01-07 17:47:43 +01:00
RCU doc: Update for SRCU-fast definitions and initialization 2025-11-05 23:58:30 +01:00
rust docs: rust: quick-start: add Debian 13 (Trixie) 2025-11-04 20:21:15 +01:00
scheduler
scsi
security Landlock update for v6.19-rc1 2025-12-06 09:52:41 -08:00
sound ASoC: doc: cs35l56: Update firmware filename description for B0 silicon 2025-11-03 13:09:14 +00:00
sphinx Documentation/sphinx/kernel_feat.py: use class directly 2025-11-21 10:32:30 -07:00
sphinx-static
spi
staging
sunrpc/xdr
target
tee
timers
tools rtla updaets for v6.19: 2025-12-05 09:34:01 -08:00
trace tracing updates for v6.19: 2025-12-05 09:51:37 -08:00
translations treewide: Update email address 2026-01-11 06:09:11 -10:00
usb
userspace-api media: Documentation: mali-c55: Use v4l2-isp version identifier 2026-01-06 10:14:13 +01:00
virt hyperv-next for v6.19 2025-12-09 06:10:17 +09:00
w1 docs: w1: fix w1-netlink invalid URL 2025-11-05 11:23:39 -07:00
watchdog
wmi Merge branch 'fixes' of into for-next 2025-12-01 11:53:59 +02:00
.gitignore
.renames.txt
atomic_bitops.txt
atomic_t.txt
Changes
CodingStyle
conf.py
docutils.conf
index.rst
Kconfig docs: move get_abi.py to tools/docs 2025-10-28 16:01:20 -06:00
Makefile docs: makefile: move rustdoc check to the build wrapper 2025-11-29 08:42:53 -07:00
memory-barriers.txt memory-barriers.txt: Sort wait_event* and wait_on_bit* list alphabetically 2025-11-08 19:02:26 -08:00
SubmittingPatches
subsystem-apis.rst