OpenVZ / Virtuozzo kernel development (devel@openvz.org)
 help / color / mirror / Atom feed
From: Konstantin Khorenko <khorenko@virtuozzo.com>
To: Eva Kurchatova <eva.kurchatova@virtuozzo.com>,
	Vasileios Almpanis <vasileios.almpanis@virtuozzo.com>
Cc: devel@openvz.org
Subject: [Devel] [PATCH hci-8.2 0/6] objtool/klp: more upstream klp-build fixes for the 8.2 kernel
Date: Thu, 26 Nov 2026 22:51:15 +0100	[thread overview]
Message-ID: <20261126-khorenko-vstor-157128-more-klp-build-fixes-v1-0-69a0363954e4@virtuozzo.com> (raw)

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

             reply	other threads:[~2026-11-26 21:52 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-26 21:51 Konstantin Khorenko [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20261126-khorenko-vstor-157128-more-klp-build-fixes-v1-0-69a0363954e4@virtuozzo.com \
    --to=khorenko@virtuozzo.com \
    --cc=devel@openvz.org \
    --cc=eva.kurchatova@virtuozzo.com \
    --cc=vasileios.almpanis@virtuozzo.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox