All Virtuozzo development lists (kernel + QEMU)
 help / color / mirror / Atom feed
* [Devel] [PATCH hci-8.2 0/6] objtool/klp: more upstream klp-build fixes for the 8.2 kernel
@ 2026-11-26 21:51 Konstantin Khorenko
  2026-11-26 21:51 ` [Devel] [PATCH hci-8.2 1/6] ms/objtool/klp: Fix bug table handling for __WARN_printf() Konstantin Khorenko
                   ` (6 more replies)
  0 siblings, 7 replies; 14+ messages in thread
From: Konstantin Khorenko @ 2026-11-26 21:51 UTC (permalink / raw)
  To: Eva Kurchatova, Vasileios Almpanis; +Cc: devel

Mainline klp-build fixes that the VSTOR-156924 series did not take.

- Patches 1-2: annotations inside alternative replacements (the
  ANNOTATE_RETPOLINE_SAFE of CALL_NOSPEC) are lost in the cloned code,
  and objtool then warns about the livepatch module. Patch 1 is
  context for patch 2.
- Patch 3 (VSTOR-157437): the placeholder relocations kept for klp
  relocations name the exported symbol, so modpost makes the livepatch
  depend on the exporting module (RK 10.14 for 20.14 has "depends:
  dm-mod").
- Patch 4 (VSTOR-157437): refuse a patch that changes or references
  init code or data. As upstream, this also refuses a change to a
  __ref function that uses init code or data only at boot.
- Patch 5: wrong index in the error path of the livepatch module init.
- Patch 6: a function checksum took the .LC<n> label of a constant
  pool entry (.rodata.cst*), not its data. A change to the constant
  alone was dropped by klp diff, and a renumbered label made unchanged
  functions look changed. Ported to check.c, 26.x has no
  klp-checksum.c.

Not taken:
- 51e1dfce24c8f: GCC puts no named objects into .rodata.cst*.
- 30cae58cdc13b: needs alternative types and features from the objtool
  disas series. Without it a change is not seen in a function that
  validate_branch() skips (STACK_FRAME_NON_STANDARD, e.g.
  __crash_kexec()), nor a change of only the CPU feature of an
  alternative.
- 4cd3cfb8b54fe, d8a2860b4a366: 26.x vmlinux has no
  EXPORT_SYMBOL_FOR_MODULES() exports.
- Clang, LTO and kCFI fixes, the checksum and correlation rewrites,
  klp-build usability changes.

Assisted-by: LLM
Signed-off-by: Konstantin Khorenko <khorenko@virtuozzo.com>

---
Josh Poimboeuf (5):
      ms/objtool/klp: Fix bug table handling for __WARN_printf()
      ms/objtool/klp: Fix extraction of text annotations for alternatives
      ms/objtool/klp: Fix false module dependencies caused by dead relocs
      ms/objtool/klp: Explicitly disallow patching or referencing init code/data
      ms/objtool/klp: Fix checksums for constant pool references

Yafang Shao (1):
      ms/klp-build: Fix wrong index in funcs cleanup error path

 scripts/livepatch/init.c            |  2 +-
 tools/objtool/check.c               | 21 +++++++++++++
 tools/objtool/elf.c                 | 13 ++++++++
 tools/objtool/include/objtool/klp.h |  2 ++
 tools/objtool/klp-diff.c            | 63 ++++++++++++++++++++++++++++++-------
 tools/objtool/klp-sympos.c          | 10 ++++++
 6 files changed, 98 insertions(+), 13 deletions(-)
---
base-commit: 9d3240d27f8b8c140461a96daa199ed0705ebe91
change-id: 20261126-khorenko-vstor-157128-more-klp-build-fixes-1b484cb13796

Best regards,
--  
Konstantin Khorenko,
Virtuozzo Linux Kernel Team

_______________________________________________
Devel mailing list
Devel@openvz.org
https://lists.openvz.org/mailman/listinfo/devel

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

end of thread, other threads:[~2026-12-01  0:46 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-11-26 21:51 [Devel] [PATCH hci-8.2 0/6] objtool/klp: more upstream klp-build fixes for the 8.2 kernel Konstantin Khorenko
2026-11-26 21:51 ` [Devel] [PATCH hci-8.2 1/6] ms/objtool/klp: Fix bug table handling for __WARN_printf() Konstantin Khorenko
2026-12-01  0:41   ` no-reply
2026-11-26 21:51 ` [Devel] [PATCH hci-8.2 2/6] ms/objtool/klp: Fix extraction of text annotations for alternatives Konstantin Khorenko
2026-12-01  0:41   ` no-reply
2026-11-26 21:51 ` [Devel] [PATCH hci-8.2 3/6] ms/objtool/klp: Fix false module dependencies caused by dead relocs Konstantin Khorenko
2026-12-01  0:43   ` no-reply
2026-11-26 21:51 ` [Devel] [PATCH hci-8.2 4/6] ms/objtool/klp: Explicitly disallow patching or referencing init code/data Konstantin Khorenko
2026-12-01  0:43   ` no-reply
2026-11-26 21:51 ` [Devel] [PATCH hci-8.2 5/6] ms/klp-build: Fix wrong index in funcs cleanup error path Konstantin Khorenko
2026-12-01  0:44   ` no-reply
2026-11-26 21:51 ` [Devel] [PATCH hci-8.2 6/6] ms/objtool/klp: Fix checksums for constant pool references Konstantin Khorenko
2026-12-01  0:45   ` no-reply
2026-11-27 14:42 ` [Devel] [PATCH hci-8.2 0/6] objtool/klp: more upstream klp-build fixes for the 8.2 kernel Konstantin Khorenko

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.