[RFC PATCH v2 3/4] liveupdate: Replace compatibility string with a 2-bit pair feature header

sashiko-bot at kernel.org sashiko-bot at kernel.org
Thu Oct 22 08:26:19 PDT 2026


> LUO and its file handlers validate handed-over state with monolithic
> compatibility strings ("luo-v5", "memfd-v2"). Any change to a serialized
> structure, even an optional additive one, must bump the string, which
> breaks live update between adjacent kernels. Replace the string in
> struct luo_ser with a feature header, so that the target kernel can
> accept or reject the source kernel state per feature.
> 
> struct luo_feature_hdr is a fixed 128-byte header: the serialized
> structure size from the source kernel followed by 15 chained u64 feature
> flags entries. The fixed size keeps payload field offsets identical in
> every kernel, regardless of how many flags entries a source kernel uses.
> 
> Each feature has a 2-bit pair (req, active) state (enum luo_feat_state:
> LUO_FEAT_DISABLED, LUO_FEAT_OPTIONAL, LUO_FEAT_REQUIRED). A flags entry
> holds 31 features, and bits [63:62] = 0b11 chain to the next entry (465
> [ ... ]
> Future changes add new entries to enum luo_core_feature before
> LUO_CORE_FEAT_MAX.
> 
> 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/20261021152527.375070-1-tarunsahu@google.com?part=3




More information about the kexec mailing list