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

* [Devel] [PATCH hci-8.2 1/6] ms/objtool/klp: Fix bug table handling for __WARN_printf()
  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 ` 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
                   ` (5 subsequent siblings)
  6 siblings, 1 reply; 14+ messages in thread
From: Konstantin Khorenko @ 2026-11-26 21:51 UTC (permalink / raw)
  To: Eva Kurchatova, Vasileios Almpanis; +Cc: devel

From: Josh Poimboeuf <jpoimboe@kernel.org>

Running objtool klp-diff on a changed function which uses WARN() can
fail with:

  vmlinux.o: error: objtool: md_run+0x866: failed to convert reloc sym '__bug_table' to its proper format

The problem is that since commit 5b472b6e5bd9 ("x86_64/bug: Implement
__WARN_printf()"), each __WARN_printf() call site now directly
references its bug table entry.  klp-diff errors out when it can't
convert such section-based references to object symbols (because bug
table entries don't have symbols).

Luckily, klp-diff already has code to create symbols for bug table
entries.  Move that code earlier, before function diffing.

Fixes: dd590d4d57eb ("objtool/klp: Introduce klp diff subcommand for diffing object files")
Fixes: 5b472b6e5bd9 ("x86_64/bug: Implement __WARN_printf()")
Reported-by: Song Liu <song@kernel.org>
Tested-by: Song Liu <song@kernel.org>
Link: https://patch.msgid.link/a8e0a714b9da962858842b9aecd63b4900927c88.1769406850.git.jpoimboe@kernel.org
Signed-off-by: Josh Poimboeuf <jpoimboe@kernel.org>
[khorenko@: 26.x has no 5b472b6e5bd9, so no code references a bug table
 entry directly and this changes nothing here; taken as context for the
 next patch]
(cherry picked from commit f2dba60339a6299e181671e95293efe312237e2d)

https://virtuozzo.atlassian.net/browse/VSTOR-157128
Feature: klp-build support
Signed-off-by: Konstantin Khorenko <khorenko@virtuozzo.com>
---
 tools/objtool/klp-diff.c | 14 +++++++++++---
 1 file changed, 11 insertions(+), 3 deletions(-)

diff --git a/tools/objtool/klp-diff.c b/tools/objtool/klp-diff.c
index 066dbe69c7093..530d91644eb4b 100644
--- a/tools/objtool/klp-diff.c
+++ b/tools/objtool/klp-diff.c
@@ -1600,9 +1600,6 @@ static int clone_special_sections(struct elfs *e)
 {
 	struct section *patched_sec;
 
-	if (create_fake_symbols(e->patched))
-		return -1;
-
 	for_each_sec(e->patched, patched_sec) {
 		if (is_special_section(patched_sec)) {
 			if (clone_special_section(e, patched_sec))
@@ -1885,6 +1882,17 @@ int cmd_klp_diff(int argc, const char **argv)
 	if (!e.out)
 		return -1;
 
+	/*
+	 * Special section fake symbols are needed so that individual special
+	 * section entries can be extracted by clone_special_sections().
+	 *
+	 * Note the fake symbols are also needed by clone_included_functions()
+	 * because __WARN_printf() call sites add references to bug table
+	 * entries in the calling functions.
+	 */
+	if (create_fake_symbols(e.patched))
+		return -1;
+
 	if (clone_included_functions(&e))
 		return -1;
 

-- 
2.43.0

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

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

* [Devel] [PATCH hci-8.2 2/6] ms/objtool/klp: Fix extraction of text annotations for alternatives
  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-11-26 21:51 ` 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
                   ` (4 subsequent siblings)
  6 siblings, 1 reply; 14+ messages in thread
From: Konstantin Khorenko @ 2026-11-26 21:51 UTC (permalink / raw)
  To: Eva Kurchatova, Vasileios Almpanis; +Cc: devel

From: Josh Poimboeuf <jpoimboe@kernel.org>

Objtool is failing to extract text annotations which reference
.altinstr_replacement instructions:

  1) Alternative replacement fake symbols are NOTYPE rather than FUNC,
     and they don't have sym->included set, thus they aren't recognized
     by should_keep_special_sym().

  2) .discard.annotate_insn gets processed before .altinstr_replacement,
     so the referenced (fake) symbols don't have clones yet.

Fix the first issue by checking for a valid clone instead of
sym->included and by accepting NOTYPE symbols when processing
.discard.annotate_insn.

Fix the second issue by deferring text annotation processing until after
the other special sections have been cloned.

Fixes: dd590d4d57eb ("objtool/klp: Introduce klp diff subcommand for diffing object files")
Acked-by: Song Liu <song@kernel.org>
Reviewed-by: Miroslav Benes <mbenes@suse.cz>
Signed-off-by: Josh Poimboeuf <jpoimboe@kernel.org>
(cherry picked from commit 62a7a01fde87c99926cd7e9670b4226c4c79ebaf)

https://virtuozzo.atlassian.net/browse/VSTOR-157128
Feature: klp-build support
Signed-off-by: Konstantin Khorenko <khorenko@virtuozzo.com>
---
 tools/objtool/klp-diff.c | 33 ++++++++++++++++++++++++++++-----
 1 file changed, 28 insertions(+), 5 deletions(-)

diff --git a/tools/objtool/klp-diff.c b/tools/objtool/klp-diff.c
index 530d91644eb4b..0d96057b3f8d7 100644
--- a/tools/objtool/klp-diff.c
+++ b/tools/objtool/klp-diff.c
@@ -1445,6 +1445,7 @@ static int create_fake_symbols(struct elf *elf)
 /* Keep a special section entry if it references an included function */
 static bool should_keep_special_sym(struct elf *elf, struct symbol *sym)
 {
+	bool annotate_insn = !strcmp(sym->sec->name, ".discard.annotate_insn");
 	struct reloc *reloc;
 
 	if (is_sec_sym(sym) || !sym->sec->rsec)
@@ -1454,7 +1455,16 @@ static bool should_keep_special_sym(struct elf *elf, struct symbol *sym)
 		if (convert_reloc_sym(elf, reloc))
 			continue;
 
-		if (is_func_sym(reloc->sym) && reloc->sym->included)
+		if (!reloc->sym->clone || is_undef_sym(reloc->sym->clone))
+			continue;
+
+		/*
+		 * Keep special section references to cloned functions.
+		 * In some cases annotate_insn can also reference cloned alt
+		 * replacement fake symbols; keep those references as well.
+		 */
+		if (is_func_sym(reloc->sym) ||
+		    (annotate_insn && is_notype_sym(reloc->sym)))
 			return true;
 	}
 
@@ -1598,15 +1608,28 @@ static int clone_special_section(struct elfs *e, struct section *patched_sec)
 /* Extract only the needed bits from special sections */
 static int clone_special_sections(struct elfs *e)
 {
-	struct section *patched_sec;
+	struct section *sec, *annotate_insn = NULL;
 
-	for_each_sec(e->patched, patched_sec) {
-		if (is_special_section(patched_sec)) {
-			if (clone_special_section(e, patched_sec))
+	for_each_sec(e->patched, sec) {
+		if (is_special_section(sec)) {
+			if (!strcmp(sec->name, ".discard.annotate_insn")) {
+				annotate_insn = sec;
+				continue;
+			}
+			if (clone_special_section(e, sec))
 				return -1;
 		}
 	}
 
+	/*
+	 * Do .discard.annotate_insn last, it can reference other special
+	 * sections (alt replacements) so they need to be cloned first.
+	 */
+	if (annotate_insn) {
+		if (clone_special_section(e, annotate_insn))
+			return -1;
+	}
+
 	return 0;
 }
 

-- 
2.43.0

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

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

* [Devel] [PATCH hci-8.2 3/6] ms/objtool/klp: Fix false module dependencies caused by dead relocs
  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-11-26 21:51 ` [Devel] [PATCH hci-8.2 2/6] ms/objtool/klp: Fix extraction of text annotations for alternatives Konstantin Khorenko
@ 2026-11-26 21:51 ` 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
                   ` (3 subsequent siblings)
  6 siblings, 1 reply; 14+ messages in thread
From: Konstantin Khorenko @ 2026-11-26 21:51 UTC (permalink / raw)
  To: Eva Kurchatova, Vasileios Almpanis; +Cc: devel

From: Josh Poimboeuf <jpoimboe@kernel.org>

When creating a klp reloc, klp-diff keeps the original relocation but
converts the referenced symbol to an UNDEF/WEAK placeholder tombstone
symbol, which gets fully disabled later by klp post-link.  The tombstone
symbol is only needed to avoid confusing objtool when it does the final
run on the patch module.

However, for references to exported symbols, modpost sees the reference
to the tombstone symbol as a real reference to an exported symbol,
resulting in a false module dependency getting created.

Further, for a reference to a tombstone symbol which is exported into a
module namespace, e.g. via EXPORT_SYMBOL_FOR_KVM_INTERNAL(), modpost
can't satisfy the dependency, resulting in a warning like the following:

  module ... uses symbol kvm_flush_remote_tlbs from namespace
  module:kvm-amd,kvm-intel, but does not import it.

Rename the placeholder tombstone symbols to ".klp.tombstone.<name>" so
modpost no longer recognizes them.

Fixes: dd590d4d57eb ("objtool/klp: Introduce klp diff subcommand for diffing object files")
Reported-by: Ben Procknow <bprockno@redhat.com>
Reported-by: Joe Lawrence <joe.lawrence@redhat.com>
Signed-off-by: Josh Poimboeuf <jpoimboe@kernel.org>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Cc: live-patching@vger.kernel.org
Link: https://lore.kernel.org/20260720145658.1103243-5-joe.lawrence@redhat.com
Link: https://patch.msgid.link/9548393f4d89ec3b498f4f69aa6ef6b9bb7150fe.1785727106.git.jpoimboe@kernel.org
(cherry picked from commit 5ca8c91d1ea6534842e7e0065d15104d802506cd)

https://virtuozzo.atlassian.net/browse/VSTOR-157437
Feature: klp-build support
Signed-off-by: Konstantin Khorenko <khorenko@virtuozzo.com>
---
 tools/objtool/elf.c                 | 13 +++++++++++++
 tools/objtool/include/objtool/klp.h |  2 ++
 tools/objtool/klp-diff.c            | 16 ++++++++++++----
 3 files changed, 27 insertions(+), 4 deletions(-)

diff --git a/tools/objtool/elf.c b/tools/objtool/elf.c
index 1c6d071f81e2e..0e5fa371fd91d 100644
--- a/tools/objtool/elf.c
+++ b/tools/objtool/elf.c
@@ -21,6 +21,7 @@
 #include <linux/interval_tree_generic.h>
 #include <objtool/builtin.h>
 #include <objtool/elf.h>
+#include <objtool/klp.h>
 #include <objtool/warn.h>
 
 #define ALIGN_UP(x, align_to) (((x) + ((align_to)-1)) & ~((align_to)-1))
@@ -610,6 +611,18 @@ static int read_symbols(struct elf *elf)
 			return -1;
 		}
 
+		/*
+		 * "klp diff" renames the placeholder symbols of KLP relocs to
+		 * hide them from modpost.  Hide the prefix from the rest of
+		 * objtool so its many name-based heuristics (noreturns,
+		 * uaccess safe list, ...) still see the original symbol name.
+		 *
+		 * st_name is left alone, so the renamed symbol is preserved in
+		 * the output file.
+		 */
+		if (strstarts(sym->name, KLP_TOMBSTONE_PREFIX))
+			sym->name += strlen(KLP_TOMBSTONE_PREFIX);
+
 		if ((sym->sym.st_shndx > SHN_UNDEF &&
 		     sym->sym.st_shndx < SHN_LORESERVE) ||
 		    (shndx_data && sym->sym.st_shndx == SHN_XINDEX)) {
diff --git a/tools/objtool/include/objtool/klp.h b/tools/objtool/include/objtool/klp.h
index 67e62290f4f4b..033260561f172 100644
--- a/tools/objtool/include/objtool/klp.h
+++ b/tools/objtool/include/objtool/klp.h
@@ -27,6 +27,8 @@
 #define KLP_RELOCS_SEC	"__klp_relocs"
 #define KLP_STRINGS_SEC	".rodata.klp.str1.1"
 
+#define KLP_TOMBSTONE_PREFIX	".klp.tombstone."
+
 struct klp_reloc {
 	void *offset;
 	void *sym;
diff --git a/tools/objtool/klp-diff.c b/tools/objtool/klp-diff.c
index 0d96057b3f8d7..50d8356e10b57 100644
--- a/tools/objtool/klp-diff.c
+++ b/tools/objtool/klp-diff.c
@@ -1034,6 +1034,7 @@ static int clone_reloc_klp(struct elfs *e, struct reloc *patched_reloc,
 	s64 addend = reloc_addend(patched_reloc);
 	const char *sym_modname, *sym_orig_name;
 	static struct section *klp_relocs;
+	char tombstone_name[SYM_NAME_LEN];
 	struct symbol *sym, *klp_sym;
 	unsigned long klp_reloc_off;
 	char sym_name[SYM_NAME_LEN];
@@ -1057,15 +1058,22 @@ static int clone_reloc_klp(struct elfs *e, struct reloc *patched_reloc,
 	/*
 	 * Keep the original reloc intact for now to avoid breaking objtool run
 	 * which relies on proper relocations for many of its features.  This
-	 * will be disabled later by "objtool klp post-link".
+	 * reloc now targets a functionally dead tombstone symbol and will be
+	 * disabled later by "objtool klp post-link".
 	 *
-	 * Convert it to UNDEF (and WEAK to avoid modpost warnings).
+	 * Convert the symbol to UNDEF/WEAK and rename to
+	 * .klp.tombstone.sym_name to prevent modpost from printing warnings or
+	 * creating false module dependencies.  The prefix is hidden from the
+	 * objtool run itself by read_symbols().
 	 */
 
 	sym = patched_sym->clone;
 	if (!sym) {
-		/* STB_WEAK: avoid modpost undefined symbol warnings */
-		sym = elf_create_symbol(e->out, patched_sym->name, NULL,
+		if (snprintf_check(tombstone_name, SYM_NAME_LEN,
+				   KLP_TOMBSTONE_PREFIX "%s", patched_sym->name))
+			return -1;
+
+		sym = elf_create_symbol(e->out, tombstone_name, NULL,
 					STB_WEAK, patched_sym->type, 0, 0);
 		if (!sym)
 			return -1;

-- 
2.43.0

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

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

* [Devel] [PATCH hci-8.2 4/6] ms/objtool/klp: Explicitly disallow patching or referencing init code/data
  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
                   ` (2 preceding siblings ...)
  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-11-26 21:51 ` 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
                   ` (2 subsequent siblings)
  6 siblings, 1 reply; 14+ messages in thread
From: Konstantin Khorenko @ 2026-11-26 21:51 UTC (permalink / raw)
  To: Eva Kurchatova, Vasileios Almpanis; +Cc: devel

From: Josh Poimboeuf <jpoimboe@kernel.org>

Explicitly disallow the patching and referencing of init code/data.
Otherwise it could potentially introduce some odd edge cases depending
on whether the target object's init section has been freed yet (note
that the init code still exists in the target module when doing late
module patching).

Such edge cases include sympos calculation and the patching and/or
referencing of non-existent (init-freed) code/data.  Not to mention the
inherent differences in behavior that occur when the init code is only
patched *some* of the time depending on module loading order or kernel
config.

Acked-by: Joe Lawrence <joe.lawrence@redhat.com>
Acked-by: Song Liu <song@kernel.org>
Link: https://patch.msgid.link/516e14f84cfbffa27dc19d3dcf35097504097966.1786138493.git.jpoimboe@kernel.org
Signed-off-by: Josh Poimboeuf <jpoimboe@kernel.org>
(cherry picked from commit 69f361b8a7a2f65c1bb236ea0899cdaad7267653)

https://virtuozzo.atlassian.net/browse/VSTOR-157437
Feature: klp-build support
Signed-off-by: Konstantin Khorenko <khorenko@virtuozzo.com>
---
 tools/objtool/klp-sympos.c | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/tools/objtool/klp-sympos.c b/tools/objtool/klp-sympos.c
index bbfae516d3395..dfca9dd746812 100644
--- a/tools/objtool/klp-sympos.c
+++ b/tools/objtool/klp-sympos.c
@@ -367,6 +367,11 @@ static unsigned long find_vmlinux_sympos(struct symbol *sym)
 	return sympos;
 }
 
+static bool is_init_sym(struct symbol *sym)
+{
+	return strstarts(sym->sec->name, ".init");
+}
+
 /*
  * "sympos" is used by livepatch to disambiguate duplicate symbol names.
  */
@@ -376,6 +381,11 @@ unsigned long klp_find_sympos(struct elf *elf, struct symbol *sym)
 	bool has_dup = false;
 	struct symbol *s;
 
+	if (is_init_sym(sym)) {
+		ERROR("%s: can't patch or reference init code/data", sym->name);
+		return ULONG_MAX;
+	}
+
 	if (sym->bind != STB_LOCAL)
 		return 0;
 

-- 
2.43.0

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

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

* [Devel] [PATCH hci-8.2 5/6] ms/klp-build: Fix wrong index in funcs cleanup error path
  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
                   ` (3 preceding siblings ...)
  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-11-26 21:51 ` 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-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
  6 siblings, 1 reply; 14+ messages in thread
From: Konstantin Khorenko @ 2026-11-26 21:51 UTC (permalink / raw)
  To: Eva Kurchatova, Vasileios Almpanis; +Cc: devel

From: Yafang Shao <laoar.shao@gmail.com>

In the object allocation loop, when kzalloc() for funcs fails, the
cleanup loop uses `objs[i].funcs` instead of `objs[j].funcs`. Since
`objs[i].funcs` is still NULL at that point, it repeatedly calls
kfree(NULL) and leaks all previously allocated funcs arrays.

Fixes: 59adee07b568 ("livepatch/klp-build: Add stub init code for livepatch modules")
Signed-off-by: Yafang Shao <laoar.shao@gmail.com>
Acked-by: Song Liu <song@kernel.org>
Reviewed-by: Petr Mladek <pmladek@suse.com>
Acked-by: Miroslav Benes <mbenes@suse.cz>
Link: https://patch.msgid.link/20260816090442.18128-2-laoar.shao@gmail.com
Signed-off-by: Josh Poimboeuf <jpoimboe@kernel.org>
(cherry picked from commit 4825ef699cda4c6f2f0586b17a5e225560481da6)

https://virtuozzo.atlassian.net/browse/VSTOR-157128
Feature: klp-build support
Signed-off-by: Konstantin Khorenko <khorenko@virtuozzo.com>
---
 scripts/livepatch/init.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/scripts/livepatch/init.c b/scripts/livepatch/init.c
index 2274d8f5a4826..8586e6d4efbff 100644
--- a/scripts/livepatch/init.c
+++ b/scripts/livepatch/init.c
@@ -51,7 +51,7 @@ static int __init livepatch_mod_init(void)
 		if (!funcs) {
 			ret = -ENOMEM;
 			for (int j = 0; j < i; j++)
-				kfree(objs[i].funcs);
+				kfree(objs[j].funcs);
 			goto err_free_objs;
 		}
 

-- 
2.43.0

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

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

* [Devel] [PATCH hci-8.2 6/6] ms/objtool/klp: Fix checksums for constant pool references
  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
                   ` (4 preceding siblings ...)
  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-11-26 21:51 ` 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
  6 siblings, 1 reply; 14+ messages in thread
From: Konstantin Khorenko @ 2026-11-26 21:51 UTC (permalink / raw)
  To: Eva Kurchatova, Vasileios Almpanis; +Cc: devel

From: Josh Poimboeuf <jpoimboe@kernel.org>

Adding a line of code to __link_shadow_page() with a literal string
causes a false positive changed function with GCC:

  arch/x86/kvm/kvm.ko.o: changed function: kvm_tdp_mmu_map_private_pfn

While the patch only touched __link_shadow_page(), the string addition
triggered a rename of .LC64 -> .LC65 in kvm_tdp_mmu_map_private_pfn()
even though the underlying referenced constant data didn't change.

So for .LC* symbols, the suffix is arbitrary but the data isn't.  Add
the underlying data to the checksum calculation rather than the symbol
name.

Clang also uses .LC* symbols, but also uses anonymous data.  Both
compilers put this data in .rodata.cst<num> sections.

Fixes: 0d83da43b1e1 ("objtool/klp: Add --checksum option to generate per-function checksums")
Link: https://patch.msgid.link/f3a9e74ceebc6475ce94bcfe985401140857814a.1787939301.git.jpoimboe@kernel.org
Signed-off-by: Josh Poimboeuf <jpoimboe@kernel.org>
[khorenko@:
 - 26.x has no klp-checksum.c yet, ported into check.c
 - checksum_update() instead of __checksum_update_insn() and "return"
   instead of "goto alts": 26.x has neither]
(cherry picked from commit ac323c9467092479dc1e5bc138c9abbe015b0069)

https://virtuozzo.atlassian.net/browse/VSTOR-157128
Feature: klp-build support
Signed-off-by: Konstantin Khorenko <khorenko@virtuozzo.com>
---
 tools/objtool/check.c | 21 +++++++++++++++++++++
 1 file changed, 21 insertions(+)

diff --git a/tools/objtool/check.c b/tools/objtool/check.c
index 403da0d3739a6..17d6735032408 100644
--- a/tools/objtool/check.c
+++ b/tools/objtool/check.c
@@ -3633,6 +3633,19 @@ static int checksum_debug_init(struct objtool_file *file)
 	return 0;
 }
 
+/*
+ * Detect a reference to anonymous constant pool data which the compiler places
+ * in .rodata.cst<num> and which either has an .LC<num> symbol associated with
+ * it or (with Clang) no symbol at all.  These are typically initializers for
+ * local function stack data, so they're considered part of the function rather
+ * than data per se.
+ */
+static bool is_anonymous_const_data(struct symbol *sym)
+{
+	return strstarts(sym->sec->name, ".rodata.cst") &&
+	       (is_sec_sym(sym) || strstarts(sym->name, ".LC"));
+}
+
 static void checksum_update_insn(struct objtool_file *file, struct symbol *func,
 				 struct instruction *insn)
 {
@@ -3665,6 +3678,14 @@ static void checksum_update_insn(struct objtool_file *file, struct symbol *func,
 		return;
 	}
 
+	if (is_anonymous_const_data(sym)) {
+		void *cst;
+
+		cst = sym->sec->data->d_buf + sym->offset + offset;
+		checksum_update(func, insn, cst, sym->sec->sh.sh_entsize);
+		return;
+	}
+
 	if (is_sec_sym(sym)) {
 		sym = find_symbol_containing(reloc->sym->sec, offset);
 		if (!sym)

-- 
2.43.0

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

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

* Re: [Devel] [PATCH hci-8.2 0/6] objtool/klp: more upstream klp-build fixes for the 8.2 kernel
  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
                   ` (5 preceding siblings ...)
  2026-11-26 21:51 ` [Devel] [PATCH hci-8.2 6/6] ms/objtool/klp: Fix checksums for constant pool references Konstantin Khorenko
@ 2026-11-27 14:42 ` Konstantin Khorenko
  6 siblings, 0 replies; 14+ messages in thread
From: Konstantin Khorenko @ 2026-11-27 14:42 UTC (permalink / raw)
  To: Eva Kurchatova, Vasileios Almpanis, Konstantin Khorenko; +Cc: devel

On Thu, 26 Nov 2026 22:51:15 +0100, Konstantin Khorenko wrote:
> objtool/klp: more upstream klp-build fixes for the 8.2 kernel
> 
> 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.
> 
> [...]

Applied to branch-rh10-6.12.0-211.75.1.26.x.vz10-ovz, will be released in rh10-6.12.0-211.75.1.26.5.vz10, thanks!

[1/6] ms/objtool/klp: Fix bug table handling for __WARN_printf()
      https://bitbucket.org/virtuozzocore/vzkernel.vzs/commits/2ff3b5964ad9
[2/6] ms/objtool/klp: Fix extraction of text annotations for alternatives
      https://bitbucket.org/virtuozzocore/vzkernel.vzs/commits/4ec2c2d067d7
[3/6] ms/objtool/klp: Fix false module dependencies caused by dead relocs
      https://bitbucket.org/virtuozzocore/vzkernel.vzs/commits/840e21b01295
[4/6] ms/objtool/klp: Explicitly disallow patching or referencing init code/data
      https://bitbucket.org/virtuozzocore/vzkernel.vzs/commits/61cb02a8a3d3
[5/6] ms/klp-build: Fix wrong index in funcs cleanup error path
      https://bitbucket.org/virtuozzocore/vzkernel.vzs/commits/254821b595e8
[6/6] ms/objtool/klp: Fix checksums for constant pool references
      https://bitbucket.org/virtuozzocore/vzkernel.vzs/commits/f5bb1eedcab1

-- 
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

* Re: [Devel] [PATCH hci-8.2 1/6] ms/objtool/klp: Fix bug table handling for __WARN_printf()
  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
  0 siblings, 0 replies; 14+ messages in thread
From: no-reply @ 2026-12-01  0:41 UTC (permalink / raw)
  To: Konstantin Khorenko, Eva Kurchatova, Vasileios Almpanis; +Cc: devel

> From: Josh Poimboeuf <jpoimboe@kernel.org>
> 
> Running objtool klp-diff on a changed function which uses WARN() can
> fail with:
> 
>   vmlinux.o: error: objtool: md_run+0x866: failed to convert reloc sym '__bug_table' to its proper format
> 
> The problem is that since commit 5b472b6e5bd9 ("x86_64/bug: Implement
> __WARN_printf()"), each __WARN_printf() call site now directly
> references its bug table entry.  klp-diff errors out when it can't
> convert such section-based references to object symbols (because bug
> table entries don't have symbols).
> 
> Luckily, klp-diff already has code to create symbols for bug table
> entries.  Move that code earlier, before function diffing.
> 
> Fixes: dd590d4d57eb ("objtool/klp: Introduce klp diff subcommand for diffing object files")
> Fixes: 5b472b6e5bd9 ("x86_64/bug: Implement __WARN_printf()")
> Reported-by: Song Liu <song@kernel.org>
> Tested-by: Song Liu <song@kernel.org>
> Link: https://patch.msgid.link/a8e0a714b9da962858842b9aecd63b4900927c88.1769406850.git.jpoimboe@kernel.org
> Signed-off-by: Josh Poimboeuf <jpoimboe@kernel.org>
> [khorenko@: 26.x has no 5b472b6e5bd9, so no code references a bug table
>  entry directly and this changes nothing here; taken as context for the
>  next patch]
> (cherry picked from commit f2dba60339a6299e181671e95293efe312237e2d)
> 
> https://virtuozzo.atlassian.net/browse/VSTOR-157128
> Feature: klp-build support
> Signed-off-by: Konstantin Khorenko <khorenko@virtuozzo.com>

Sashiko has reviewed this patch and found no issues.

Carry the trailer below into the next revision and Sashiko will not review this patch again.

Reviewed-by: Sashiko <no-reply@sashiko.virtuozzo.com>

-- 
Sashiko AI review · https://sashiko.vzint.dev/#/patchset/20261126-khorenko-vstor-157128-more-klp-build-fixes-v1-0-69a0363954e4@virtuozzo.com?part=1


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

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

* Re: [Devel] [PATCH hci-8.2 2/6] ms/objtool/klp: Fix extraction of text annotations for alternatives
  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
  0 siblings, 0 replies; 14+ messages in thread
From: no-reply @ 2026-12-01  0:41 UTC (permalink / raw)
  To: Konstantin Khorenko, Eva Kurchatova, Vasileios Almpanis; +Cc: devel

> From: Josh Poimboeuf <jpoimboe@kernel.org>
> 
> Objtool is failing to extract text annotations which reference
> .altinstr_replacement instructions:
> 
>   1) Alternative replacement fake symbols are NOTYPE rather than FUNC,
>      and they don't have sym->included set, thus they aren't recognized
>      by should_keep_special_sym().
> 
>   2) .discard.annotate_insn gets processed before .altinstr_replacement,
>      so the referenced (fake) symbols don't have clones yet.
> 
> Fix the first issue by checking for a valid clone instead of
> sym->included and by accepting NOTYPE symbols when processing
> .discard.annotate_insn.
> 
> Fix the second issue by deferring text annotation processing until after
> the other special sections have been cloned.
> 
> Fixes: dd590d4d57eb ("objtool/klp: Introduce klp diff subcommand for diffing object files")
> Acked-by: Song Liu <song@kernel.org>
> Reviewed-by: Miroslav Benes <mbenes@suse.cz>
> Signed-off-by: Josh Poimboeuf <jpoimboe@kernel.org>
> (cherry picked from commit 62a7a01fde87c99926cd7e9670b4226c4c79ebaf)
> 
> https://virtuozzo.atlassian.net/browse/VSTOR-157128
> Feature: klp-build support
> Signed-off-by: Konstantin Khorenko <khorenko@virtuozzo.com>

Sashiko has reviewed this patch and found no issues.

Carry the trailer below into the next revision and Sashiko will not review this patch again.

Reviewed-by: Sashiko <no-reply@sashiko.virtuozzo.com>

-- 
Sashiko AI review · https://sashiko.vzint.dev/#/patchset/20261126-khorenko-vstor-157128-more-klp-build-fixes-v1-0-69a0363954e4@virtuozzo.com?part=2


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

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

* Re: [Devel] [PATCH hci-8.2 3/6] ms/objtool/klp: Fix false module dependencies caused by dead relocs
  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
  0 siblings, 0 replies; 14+ messages in thread
From: no-reply @ 2026-12-01  0:43 UTC (permalink / raw)
  To: Konstantin Khorenko, Eva Kurchatova, Vasileios Almpanis; +Cc: devel

> From: Josh Poimboeuf <jpoimboe@kernel.org>
> 
> When creating a klp reloc, klp-diff keeps the original relocation but
> converts the referenced symbol to an UNDEF/WEAK placeholder tombstone
> symbol, which gets fully disabled later by klp post-link.  The tombstone
> symbol is only needed to avoid confusing objtool when it does the final
> run on the patch module.
> 
> However, for references to exported symbols, modpost sees the reference
> to the tombstone symbol as a real reference to an exported symbol,
> resulting in a false module dependency getting created.
> 
> Further, for a reference to a tombstone symbol which is exported into a
> module namespace, e.g. via EXPORT_SYMBOL_FOR_KVM_INTERNAL(), modpost
> can't satisfy the dependency, resulting in a warning like the following:
> [ ... ]
> (cherry picked from commit 5ca8c91d1ea6534842e7e0065d15104d802506cd)
> 
> https://virtuozzo.atlassian.net/browse/VSTOR-157437
> Feature: klp-build support
> Signed-off-by: Konstantin Khorenko <khorenko@virtuozzo.com>

Sashiko has reviewed this patch and found no issues.

Carry the trailer below into the next revision and Sashiko will not review this patch again.

Reviewed-by: Sashiko <no-reply@sashiko.virtuozzo.com>

-- 
Sashiko AI review · https://sashiko.vzint.dev/#/patchset/20261126-khorenko-vstor-157128-more-klp-build-fixes-v1-0-69a0363954e4@virtuozzo.com?part=3


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

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

* Re: [Devel] [PATCH hci-8.2 4/6] ms/objtool/klp: Explicitly disallow patching or referencing init code/data
  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
  0 siblings, 0 replies; 14+ messages in thread
From: no-reply @ 2026-12-01  0:43 UTC (permalink / raw)
  To: Konstantin Khorenko, Eva Kurchatova, Vasileios Almpanis; +Cc: devel

> From: Josh Poimboeuf <jpoimboe@kernel.org>
> 
> Explicitly disallow the patching and referencing of init code/data.
> Otherwise it could potentially introduce some odd edge cases depending
> on whether the target object's init section has been freed yet (note
> that the init code still exists in the target module when doing late
> module patching).
> 
> Such edge cases include sympos calculation and the patching and/or
> referencing of non-existent (init-freed) code/data.  Not to mention the
> inherent differences in behavior that occur when the init code is only
> patched *some* of the time depending on module loading order or kernel
> config.
> 
> Acked-by: Joe Lawrence <joe.lawrence@redhat.com>
> Acked-by: Song Liu <song@kernel.org>
> Link: https://patch.msgid.link/516e14f84cfbffa27dc19d3dcf35097504097966.1786138493.git.jpoimboe@kernel.org
> Signed-off-by: Josh Poimboeuf <jpoimboe@kernel.org>
> (cherry picked from commit 69f361b8a7a2f65c1bb236ea0899cdaad7267653)
> 
> https://virtuozzo.atlassian.net/browse/VSTOR-157437
> Feature: klp-build support
> Signed-off-by: Konstantin Khorenko <khorenko@virtuozzo.com>

Sashiko has reviewed this patch and found no issues.

Carry the trailer below into the next revision and Sashiko will not review this patch again.

Reviewed-by: Sashiko <no-reply@sashiko.virtuozzo.com>

-- 
Sashiko AI review · https://sashiko.vzint.dev/#/patchset/20261126-khorenko-vstor-157128-more-klp-build-fixes-v1-0-69a0363954e4@virtuozzo.com?part=4


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

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

* Re: [Devel] [PATCH hci-8.2 5/6] ms/klp-build: Fix wrong index in funcs cleanup error path
  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
  0 siblings, 0 replies; 14+ messages in thread
From: no-reply @ 2026-12-01  0:44 UTC (permalink / raw)
  To: Konstantin Khorenko, Eva Kurchatova, Vasileios Almpanis; +Cc: devel

> From: Yafang Shao <laoar.shao@gmail.com>
> 
> In the object allocation loop, when kzalloc() for funcs fails, the
> cleanup loop uses `objs[i].funcs` instead of `objs[j].funcs`. Since
> `objs[i].funcs` is still NULL at that point, it repeatedly calls
> kfree(NULL) and leaks all previously allocated funcs arrays.
> 
> Fixes: 59adee07b568 ("livepatch/klp-build: Add stub init code for livepatch modules")
> Signed-off-by: Yafang Shao <laoar.shao@gmail.com>
> Acked-by: Song Liu <song@kernel.org>
> Reviewed-by: Petr Mladek <pmladek@suse.com>
> Acked-by: Miroslav Benes <mbenes@suse.cz>
> Link: https://patch.msgid.link/20260816090442.18128-2-laoar.shao@gmail.com
> Signed-off-by: Josh Poimboeuf <jpoimboe@kernel.org>
> (cherry picked from commit 4825ef699cda4c6f2f0586b17a5e225560481da6)
> 
> https://virtuozzo.atlassian.net/browse/VSTOR-157128
> Feature: klp-build support
> Signed-off-by: Konstantin Khorenko <khorenko@virtuozzo.com>

Sashiko has reviewed this patch and found no issues.

Carry the trailer below into the next revision and Sashiko will not review this patch again.

Reviewed-by: Sashiko <no-reply@sashiko.virtuozzo.com>

-- 
Sashiko AI review · https://sashiko.vzint.dev/#/patchset/20261126-khorenko-vstor-157128-more-klp-build-fixes-v1-0-69a0363954e4@virtuozzo.com?part=5


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

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

* Re: [Devel] [PATCH hci-8.2 6/6] ms/objtool/klp: Fix checksums for constant pool references
  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
  0 siblings, 0 replies; 14+ messages in thread
From: no-reply @ 2026-12-01  0:45 UTC (permalink / raw)
  To: Konstantin Khorenko, Eva Kurchatova, Vasileios Almpanis; +Cc: devel

Thank you for your contribution! Sashiko AI review found 1 potential
issue to consider:
- [Low] objtool: unchecked sh_entsize-byte hash read in anonymous const
  data checksum
--

commit 6c01ff96123a5a330a3e5f3c2a72de8401de72c0
Author: Josh Poimboeuf <jpoimboe@kernel.org>

ms/objtool/klp: Fix checksums for constant pool references

When a function references an .LC* symbol or anonymous data in a .rodata.cst<num> section, the checksum now covers the constant's contents instead of the symbol name. This avoids false "changed function" reports when the compiler renumbers .LC symbols.

Link: https://patch.msgid.link/f3a9e74ceebc6475ce94bcfe985401140857814a.1787939301.git.jpoimboe@kernel.org

> diff --git a/tools/objtool/check.c b/tools/objtool/check.c
> index 403da0d3739a6..17d6735032408 100644
> --- a/tools/objtool/check.c
> +++ b/tools/objtool/check.c
> @@ -3665,6 +3678,14 @@ static void checksum_update_insn(struct objtool_file *file, struct symbol *func,
>  		return;
>  	}
>  
> +	if (is_anonymous_const_data(sym)) {
> +		void *cst;
> +
> +		cst = sym->sec->data->d_buf + sym->offset + offset;
> +		checksum_update(func, insn, cst, sym->sec->sh.sh_entsize);
> +		return;
> +	}
> +

[Severity: Low]
Can this read past the intended constant? The pointer is d_buf + sym->offset + offset, and a fixed sh_entsize bytes are hashed from it, with no check against the section size and no check that the offset is entry-aligned.

If a relocation addend points into the middle of a .rodata.cst<N> entry, such as .LC0+8 for a 16-byte constant, the hash covers part of the next constant. For the last entry it reads past the end of the section buffer. The result is a wrong checksum, which means a spurious or missed changed-function report, or a small heap over-read in the tool.

Would it be worth validating that the offset plus sh_entsize stays within sh_size, and that sh_entsize is non-zero, before hashing?

Carry the trailer below into the next revision and Sashiko will not review this patch again.

Reviewed-by: Sashiko <no-reply@sashiko.virtuozzo.com>

-- 
Sashiko AI review · https://sashiko.vzint.dev/#/patchset/20261126-khorenko-vstor-157128-more-klp-build-fixes-v1-0-69a0363954e4@virtuozzo.com?part=6

_______________________________________________
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.