mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: linux-tip-commits@vger.kernel.org
Cc: "Ingo Molnar" <mingo@kernel.org>,
	x86@kernel.org, live-patching@vger.kernel.org,
	"Josh Poimboeuf" <jpoimboe@kernel.org>,
	linux-kernel@vger.kernel.org
Subject: Re: [tip: objtool/core] objtool/klp: Add .klp.symid for sympos disambiguation
Date: Mon, 03 Aug 2026 06:12:14 +0000	[thread overview]
Message-ID: <20260803061214.C206D1F000E9@smtp.kernel.org> (raw)
In-Reply-To: <178573617913.1210945.4137827646322421739.tip-bot2@tip-bot2>

Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Low] The `.exitcall.exit` section is discarded during the final vmlinux link, but `klp_create_symid_sections` incorrectly generates `.klp.symid` relocations to duplicate static symbols within it.
--

--- Patch [1]: [tip: objtool/core] objtool/klp: Add .klp.symid for sympos disambiguation ---
commit 95a71e72a77916e00e9b21eb4e2fc9a9e4c3258d
Author: Josh Poimboeuf <jpoimboe@kernel.org>
Date:   Mon Aug 3 05:49:39 2026 +0000

objtool/klp: Add .klp.symid for sympos disambiguation

Livepatch identifies a duplicate-named symbol by its position (sympos)
among same-named kallsyms entries, which for vmlinux are counted in
ascending address order in the final linked kernel. This commit adds a
new .klp.symid section to bridge the gap and correlate symbols between
vmlinux.o and vmlinux.

Link: https://patch.msgid.link/64d50f077b569f47883c015cdb7079edb068efe8.1785727106.git.jpoimboe@kernel.org

> diff --git a/tools/objtool/klp-symid.c b/tools/objtool/klp-symid.c
> new file mode 100644
> index 0000000000000..cf188cdfa6079
> --- /dev/null
> +++ b/tools/objtool/klp-symid.c
[ ... ]
> +static const char * const discarded_secs[] = {
> +	".discard",
> +	".modinfo",
> +	"__tracepoint_check",
> +};

[Severity: Low]
Does this list need to include ".exitcall.exit"?

When built-in components use module_exit() with identical function
names (like sm4_exit in multiple x86 crypto modules), duplicate static
variables are created in the .exitcall.exit section.

Because this section is missing from discarded_secs[], symid_needed()
generates R_ABS64 relocations in .klp.symid to these symbols.

Since .exitcall.exit is unconditionally discarded by the linker during the
final vmlinux link, this can cause a fatal linker error: ".klp.symid refers
to discarded section .exitcall.exit".

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/178573617913.1210945.4137827646322421739.tip-bot2@tip-bot2?part=1

  reply	other threads:[~2026-08-03  6:12 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-03  3:24 [PATCH 00/14] objtool/klp: sympos/module/alternative/etc fixes Josh Poimboeuf
2026-08-03  3:24 ` [PATCH 01/14] objtool/klp: Fix module name normalization for paths with dots Josh Poimboeuf
2026-08-03  5:49   ` [tip: objtool/core] " tip-bot2 for Josh Poimboeuf
2026-08-03  3:24 ` [PATCH 02/14] objtool/klp: Normalize Module.symvers paths to module names Josh Poimboeuf
2026-08-03  5:49   ` [tip: objtool/core] " tip-bot2 for Joe Lawrence
2026-08-03  3:24 ` [PATCH 03/14] objtool/klp: Fix false module dependencies caused by dead relocs Josh Poimboeuf
2026-08-03  5:49   ` [tip: objtool/core] " tip-bot2 for Josh Poimboeuf
2026-08-12 17:33   ` [PATCH 03/14] " Sean Christopherson
2026-08-12 20:27     ` Josh Poimboeuf
2026-08-12 22:31       ` Sean Christopherson
2026-08-14 20:44       ` Dylan Hatch
2026-08-03  3:24 ` [PATCH 04/14] objtool/klp: Skip hidden directories when finding objects Josh Poimboeuf
2026-08-03  5:49   ` [tip: objtool/core] " tip-bot2 for Josh Poimboeuf
2026-08-03  3:24 ` [PATCH 05/14] objtool/klp: Add .klp.symid for sympos disambiguation Josh Poimboeuf
2026-08-03  5:49   ` [tip: objtool/core] " tip-bot2 for Josh Poimboeuf
2026-08-03  6:12     ` sashiko-bot [this message]
2026-08-03  3:24 ` [PATCH 06/14] objtool/klp: Fix symbol resolution for duplicate data symbols Josh Poimboeuf
2026-08-03  5:49   ` [tip: objtool/core] " tip-bot2 for Josh Poimboeuf
2026-08-03  3:24 ` [PATCH 07/14] module: Add module_kallsyms_on_each_core_symbol() Josh Poimboeuf
2026-08-03  6:24   ` Josh Poimboeuf
2026-08-03  3:24 ` [PATCH 08/14] objtool/klp,livepatch: Resolve module symbols against core kallsyms Josh Poimboeuf
2026-08-03  6:26   ` Josh Poimboeuf
2026-08-03  3:24 ` [PATCH 09/14] objtool/klp: Fix size of empty special section entries Josh Poimboeuf
2026-08-03  3:24 ` [PATCH 10/14] objtool/klp: Ignore replacement offset of empty x86 alternatives Josh Poimboeuf
2026-08-03  3:24 ` [PATCH 11/14] objtool/klp: Explicitly disallow patching or referencing init code/data Josh Poimboeuf
2026-08-03  3:24 ` [PATCH 12/14] objtool/klp: Fix cross-module klp relocation section naming Josh Poimboeuf
2026-08-03  3:24 ` [PATCH 13/14] objtool/klp: Don't match local symbols against exports Josh Poimboeuf
2026-08-03  3:24 ` [PATCH 14/14] objtool/klp: Allow new references to module exports Josh Poimboeuf

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=20260803061214.C206D1F000E9@smtp.kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=jpoimboe@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-tip-commits@vger.kernel.org \
    --cc=live-patching@vger.kernel.org \
    --cc=mingo@kernel.org \
    --cc=sashiko-reviews@lists.linux.dev \
    --cc=x86@kernel.org \
    /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

all inboxes | Powered by JetHome®