[PATCH v4 09/19] liveupdate: Add feature header to struct luo_ser
sashiko-bot at kernel.org
sashiko-bot at kernel.org
Tue Nov 10 22:16:41 PST 2026
> LUO and its file handlers currently rely solely on coarse-grained
> compatibility strings (such as luo-v6 and memfd-v3) to validate
> handed-over state across kexec. Because compatibility is checked only
> at the whole-structure level, any change to a serialized structure,
> even an optional additive field, requires bumping the compatibility
> string and breaks live update between adjacent kernels.
>
> Precede the centralized struct luo_ser with struct kho_ser_hdr using
> DECLARE_KHO_SER. Subsystems can now evolve their serialized state at
> per-feature granularity. Each subsystem groups the fields of its
> serialized structure under feature indices, starting with index 0 for the
> base fields. When a subsystem adds a new capability, it appends any new
> fields to the end of its payload structure under a new feature index.
> Retired fields are kept in place so existing field offsets never shift;
> if the type or format of a field needs to change, the existing field and
> feature are kept intact until retired and a new feature index with an
> appended field of the new type is added. Only when a change requires a
> complete break in the serialized layout or semantics that feature flags
> cannot handle, a new handler can be introduced with an incremented version
> number in its compatibility string.
>
> Signed-off-by: Logan Odell <loganodell at google.com>
> Signed-off-by: Tarun Sahu <tarunsahu at google.com>
Sashiko has reviewed this patch and found no issues.
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261110050202.529473-1-tarunsahu@google.com?part=9
More information about the kexec
mailing list