[Devel] [PATCH hci-8.2 00/17] ms/objtool: fix silently wrong livepatches by klp-build

Konstantin Khorenko khorenko at virtuozzo.com
Tue Nov 24 15:20:23 MSK 2026


I won't apply this version, please send v2 with the changes below.

On Tue, 24 Nov 2026 07:00:49 +0200, Eva Kurchatova wrote:
> Note: Same as before, a patch which changes a const object keeps the
> original object in the .data section; mainline now rejects such patch.

1. Patch 13: add a vz patch after it that makes klp diff fail when a
   correlated .rodata object changed (length, bytes or relocations),
   or drop 13. Details in the reply to 13.
2. Cover letter: drop or correct the note above.

Patch 13 is what makes this happen for const objects. Before the
series, every .rodata symbol was uncorrelated, so a changed const
object was cloned into the livepatch with its new contents. After 13
a named const object is correlated and referenced through a klp reloc
to the original, and nothing compares the contents. Mainline took the
same correlation together with 873a2208ea31 ("objtool/klp: Calculate
object checksums") and 6016dd33a10a ("objtool/klp: Rewrite symbol
correlation algorithm"), which reject a changed object; this series
gets the correlation without the rejection.

Patches 1-12 and 14-17 are fine as they are.

Separate patches, not needed for this series. I created a task for
them:

1. Mainline klp-build fixes left out that a vz10 x86_64 gcc build can
   hit: 15fa203ef91e ("objtool/klp: Fix symbol resolution for duplicate
   data symbols", needs 029223d30162; patch 13 makes every named const
   object a klp reloc target, so a wrong sympos matters more now),
   72d76d0c18eb ("objtool/klp: Allow new references to module
   exports"), 636f230ce21e and 1ea786097cd7 (empty x86 alternatives),
   2c2acca2eabf (.cold detection for duplicate symbols), 11c2adcd1fa2
   (NULL dereference when printing code_sym, from the same mainline
   series as patches 1 and 2).
   https://virtuozzo.atlassian.net/browse/VSTOR-156924

-- 
Konstantin Khorenko,
Virtuozzo Linux Kernel Team



More information about the Devel mailing list