* [PATCH] objtool: fix compilation failure with the x32 toolchain
@ 2026-01-06 11:13 Mikulas Patocka
2026-01-06 21:55 ` Joe Lawrence
2026-01-13 10:43 ` [tip: objtool/urgent] " tip-bot2 for Mikulas Patocka
0 siblings, 2 replies; 3+ messages in thread
From: Mikulas Patocka @ 2026-01-06 11:13 UTC (permalink / raw)
To: Josh Poimboeuf, Peter Zijlstra, Petr Mladek, Joe Lawrence; +Cc: linux-kernel
When using the x32 toolchain, compilation fails because the printf
specifier "%lx" (long), doesn't match the type of the "checksum" variable
(long long). Fix this by changing the printf specifier to "%llx" and
casting "checksum" to unsigned long long.
Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
Fixes: a3493b33384a ("objtool/klp: Add --debug-checksum=<funcs> to show per-instruction checksums")
---
tools/objtool/include/objtool/warn.h | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
Index: linux-2.6/tools/objtool/include/objtool/warn.h
===================================================================
--- linux-2.6.orig/tools/objtool/include/objtool/warn.h 2025-12-31 20:10:31.000000000 +0100
+++ linux-2.6/tools/objtool/include/objtool/warn.h 2025-12-31 20:14:15.000000000 +0100
@@ -152,8 +152,8 @@ static inline void unindent(int *unused)
if (unlikely(insn->sym && insn->sym->pfunc && \
insn->sym->pfunc->debug_checksum)) { \
char *insn_off = offstr(insn->sec, insn->offset); \
- __dbg("checksum: %s %s %016lx", \
- func->name, insn_off, checksum); \
+ __dbg("checksum: %s %s %016llx", \
+ func->name, insn_off, (unsigned long long)checksum);\
free(insn_off); \
} \
})
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] objtool: fix compilation failure with the x32 toolchain
2026-01-06 11:13 [PATCH] objtool: fix compilation failure with the x32 toolchain Mikulas Patocka
@ 2026-01-06 21:55 ` Joe Lawrence
2026-01-13 10:43 ` [tip: objtool/urgent] " tip-bot2 for Mikulas Patocka
1 sibling, 0 replies; 3+ messages in thread
From: Joe Lawrence @ 2026-01-06 21:55 UTC (permalink / raw)
To: Mikulas Patocka; +Cc: Josh Poimboeuf, Peter Zijlstra, Petr Mladek, linux-kernel
On Tue, Jan 06, 2026 at 12:13:15PM +0100, Mikulas Patocka wrote:
> When using the x32 toolchain, compilation fails because the printf
> specifier "%lx" (long), doesn't match the type of the "checksum" variable
> (long long). Fix this by changing the printf specifier to "%llx" and
> casting "checksum" to unsigned long long.
>
> Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
> Fixes: a3493b33384a ("objtool/klp: Add --debug-checksum=<funcs> to show per-instruction checksums")
>
> ---
> tools/objtool/include/objtool/warn.h | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> Index: linux-2.6/tools/objtool/include/objtool/warn.h
> ===================================================================
> --- linux-2.6.orig/tools/objtool/include/objtool/warn.h 2025-12-31 20:10:31.000000000 +0100
> +++ linux-2.6/tools/objtool/include/objtool/warn.h 2025-12-31 20:14:15.000000000 +0100
> @@ -152,8 +152,8 @@ static inline void unindent(int *unused)
> if (unlikely(insn->sym && insn->sym->pfunc && \
> insn->sym->pfunc->debug_checksum)) { \
> char *insn_off = offstr(insn->sec, insn->offset); \
> - __dbg("checksum: %s %s %016lx", \
> - func->name, insn_off, checksum); \
> + __dbg("checksum: %s %s %016llx", \
> + func->name, insn_off, (unsigned long long)checksum);\
> free(insn_off); \
> } \
> })
>
Acked-by: Joe Lawrence <joe.lawrence@redhat.com>
--
Joe
^ permalink raw reply [flat|nested] 3+ messages in thread
* [tip: objtool/urgent] objtool: fix compilation failure with the x32 toolchain
2026-01-06 11:13 [PATCH] objtool: fix compilation failure with the x32 toolchain Mikulas Patocka
2026-01-06 21:55 ` Joe Lawrence
@ 2026-01-13 10:43 ` tip-bot2 for Mikulas Patocka
1 sibling, 0 replies; 3+ messages in thread
From: tip-bot2 for Mikulas Patocka @ 2026-01-13 10:43 UTC (permalink / raw)
To: linux-tip-commits
Cc: Mikulas Patocka, Peter Zijlstra (Intel), x86, linux-kernel
The following commit has been merged into the objtool/urgent branch of tip:
Commit-ID: 26bea10450afe5ad4dd0e0bbb797c44e1df110fe
Gitweb: https://git.kernel.org/tip/26bea10450afe5ad4dd0e0bbb797c44e1df110fe
Author: Mikulas Patocka <mpatocka@redhat.com>
AuthorDate: Tue, 06 Jan 2026 12:13:15 +01:00
Committer: Peter Zijlstra <peterz@infradead.org>
CommitterDate: Tue, 13 Jan 2026 11:37:50 +01:00
objtool: fix compilation failure with the x32 toolchain
When using the x32 toolchain, compilation fails because the printf
specifier "%lx" (long), doesn't match the type of the "checksum" variable
(long long). Fix this by changing the printf specifier to "%llx" and
casting "checksum" to unsigned long long.
Fixes: a3493b33384a ("objtool/klp: Add --debug-checksum=<funcs> to show per-instruction checksums")
Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Link: https://patch.msgid.link/a1158c99-fe0e-a218-4b5b-ffac212489f6@redhat.com
---
tools/objtool/include/objtool/warn.h | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/tools/objtool/include/objtool/warn.h b/tools/objtool/include/objtool/warn.h
index 25ff794..2b27b54 100644
--- a/tools/objtool/include/objtool/warn.h
+++ b/tools/objtool/include/objtool/warn.h
@@ -152,8 +152,8 @@ static inline void unindent(int *unused) { indent--; }
if (unlikely(insn->sym && insn->sym->pfunc && \
insn->sym->pfunc->debug_checksum)) { \
char *insn_off = offstr(insn->sec, insn->offset); \
- __dbg("checksum: %s %s %016lx", \
- func->name, insn_off, checksum); \
+ __dbg("checksum: %s %s %016llx", \
+ func->name, insn_off, (unsigned long long)checksum);\
free(insn_off); \
} \
})
^ permalink raw reply related [flat|nested] 3+ messages in thread
end of thread, other threads:[~2026-01-13 10:43 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-01-06 11:13 [PATCH] objtool: fix compilation failure with the x32 toolchain Mikulas Patocka
2026-01-06 21:55 ` Joe Lawrence
2026-01-13 10:43 ` [tip: objtool/urgent] " tip-bot2 for Mikulas Patocka
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox