From: "tip-bot2 for Josh Poimboeuf" <tip-bot2@linutronix.de>
To: linux-tip-commits@vger.kernel.org
Cc: Joe Lawrence <joe.lawrence@redhat.com>,
Song Liu <song@kernel.org>, Josh Poimboeuf <jpoimboe@kernel.org>,
x86@kernel.org, linux-kernel@vger.kernel.org
Subject: [tip: objtool/core] objtool/klp: Fix line numbers in Module.symvers parse errors
Date: Thu, 13 Aug 2026 11:16:22 -0000 [thread overview]
Message-ID: <178661978201.442315.138489456877962108.tip-bot2@tip-bot2> (raw)
In-Reply-To: <133e16bb0c7cb916f10bbfb017eba525449ad1d6.1786138493.git.jpoimboe@kernel.org>
The following commit has been merged into the objtool/core branch of tip:
Commit-ID: 51c1de13486315ad46a74b40ec17124916a08277
Gitweb: https://git.kernel.org/tip/51c1de13486315ad46a74b40ec17124916a08277
Author: Josh Poimboeuf <jpoimboe@kernel.org>
AuthorDate: Fri, 07 Aug 2026 14:37:54 -07:00
Committer: Josh Poimboeuf <jpoimboe@kernel.org>
CommitterDate: Tue, 11 Aug 2026 16:10:58 -07:00
objtool/klp: Fix line numbers in Module.symvers parse errors
read_exports() reports the offending line number when it fails to parse
Module.symvers. The counter is initialized to 1 but never incremented,
so every error blames line 1 regardless of where the bad line is.
Acked-by: Joe Lawrence <joe.lawrence@redhat.com>
Acked-by: Song Liu <song@kernel.org>
Link: https://patch.msgid.link/133e16bb0c7cb916f10bbfb017eba525449ad1d6.1786138493.git.jpoimboe@kernel.org
Signed-off-by: Josh Poimboeuf <jpoimboe@kernel.org>
---
tools/objtool/klp-diff.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/tools/objtool/klp-diff.c b/tools/objtool/klp-diff.c
index 1f05646..cdc63ab 100644
--- a/tools/objtool/klp-diff.c
+++ b/tools/objtool/klp-diff.c
@@ -118,7 +118,7 @@ static int read_exports(void)
{
const char *symvers = "Module.symvers";
char line[1024], *path = NULL;
- unsigned int line_num = 1;
+ unsigned int line_num = 0;
FILE *file;
file = fopen(symvers, "r");
@@ -140,6 +140,8 @@ static int read_exports(void)
char *sym, *mod, *type, *namespace;
struct export *export;
+ line_num++;
+
sym = strchr(line, '\t');
if (!sym) {
ERROR("malformed Module.symvers (sym) at line %d", line_num);
next prev parent reply other threads:[~2026-08-13 11:16 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-07 21:37 [PATCH v3 0/9] objtool/klp: sympos/module/alternative/etc fixes Josh Poimboeuf
2026-08-07 21:37 ` [PATCH v3 1/9] objtool/klp: Fix vmlinux .klp.symid link error for .no_trim_symbol symbols Josh Poimboeuf
2026-08-13 11:16 ` [tip: objtool/core] " tip-bot2 for Josh Poimboeuf
2026-08-07 21:37 ` [PATCH v3 2/9] objtool/klp: Fix size of empty special section entries Josh Poimboeuf
2026-08-13 11:16 ` [tip: objtool/core] " tip-bot2 for Josh Poimboeuf
2026-08-07 21:37 ` [PATCH v3 3/9] objtool/klp: Ignore replacement offset of empty x86 alternatives Josh Poimboeuf
2026-08-13 11:16 ` [tip: objtool/core] " tip-bot2 for Josh Poimboeuf
2026-08-07 21:37 ` [PATCH v3 4/9] objtool/klp: Explicitly disallow patching or referencing init code/data Josh Poimboeuf
2026-08-11 22:32 ` Song Liu
2026-08-13 11:16 ` [tip: objtool/core] " tip-bot2 for Josh Poimboeuf
2026-08-07 21:37 ` [PATCH v3 5/9] objtool/klp: Fix cross-module klp relocation section naming Josh Poimboeuf
2026-08-13 11:16 ` [tip: objtool/core] " tip-bot2 for Josh Poimboeuf
2026-08-07 21:37 ` [PATCH v3 6/9] objtool/klp: Don't match local symbols against exports Josh Poimboeuf
2026-08-07 21:46 ` sashiko-bot
2026-08-08 22:27 ` Josh Poimboeuf
2026-08-13 11:16 ` [tip: objtool/core] " tip-bot2 for Josh Poimboeuf
2026-08-07 21:37 ` [PATCH v3 7/9] objtool/klp: Allow new references to module exports Josh Poimboeuf
2026-08-13 11:16 ` [tip: objtool/core] " tip-bot2 for Joe Lawrence
2026-08-07 21:37 ` [PATCH v3 8/9] objtool/klp: Fix relocations for EXPORT_SYMBOL_FOR_MODULES() symbols Josh Poimboeuf
2026-08-11 22:36 ` Song Liu
2026-08-13 11:16 ` [tip: objtool/core] " tip-bot2 for Josh Poimboeuf
2026-08-14 21:05 ` [PATCH v3 8/9] " Dylan Hatch
2026-08-15 0:18 ` Josh Poimboeuf
2026-08-15 1:25 ` Josh Poimboeuf
2026-08-07 21:37 ` [PATCH v3 9/9] objtool/klp: Fix line numbers in Module.symvers parse errors Josh Poimboeuf
2026-08-11 22:36 ` Song Liu
2026-08-13 11:16 ` tip-bot2 for Josh Poimboeuf [this message]
2026-08-11 20:36 ` [PATCH v3 0/9] objtool/klp: sympos/module/alternative/etc fixes Joe Lawrence
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=178661978201.442315.138489456877962108.tip-bot2@tip-bot2 \
--to=tip-bot2@linutronix.de \
--cc=joe.lawrence@redhat.com \
--cc=jpoimboe@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-tip-commits@vger.kernel.org \
--cc=song@kernel.org \
--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®