[PATCH v5 06/13] arm64: stacktrace: Use %pSb for backtrace printing

Stephen Boyd swboyd at chromium.org
Tue Apr 20 22:49:56 BST 2021


Let's use the new printk format to print the stacktrace entry when
printing a backtrace to the kernel logs. This will include any module's
build ID[1] in it so that offline/crash debugging can easily locate the
debuginfo for a module via something like debuginfod[2].

Cc: Catalin Marinas <catalin.marinas at arm.com>
Cc: Will Deacon <will at kernel.org>
Cc: <linux-arm-kernel at lists.infradead.org>
Cc: Jiri Olsa <jolsa at kernel.org>
Cc: Alexei Starovoitov <ast at kernel.org>
Cc: Jessica Yu <jeyu at kernel.org>
Cc: Evan Green <evgreen at chromium.org>
Cc: Hsin-Yi Wang <hsinyi at chromium.org>
Cc: Petr Mladek <pmladek at suse.com>
Cc: Steven Rostedt <rostedt at goodmis.org>
Cc: Andy Shevchenko <andriy.shevchenko at linux.intel.com>
Cc: Matthew Wilcox <willy at infradead.org>
Link: https://fedoraproject.org/wiki/Releases/FeatureBuildId [1]
Link: https://sourceware.org/elfutils/Debuginfod.html [2]
Signed-off-by: Stephen Boyd <swboyd at chromium.org>
---
 arch/arm64/kernel/stacktrace.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/arm64/kernel/stacktrace.c b/arch/arm64/kernel/stacktrace.c
index ad20981dfda4..9d38da01ff98 100644
--- a/arch/arm64/kernel/stacktrace.c
+++ b/arch/arm64/kernel/stacktrace.c
@@ -129,7 +129,7 @@ NOKPROBE_SYMBOL(walk_stackframe);
 
 static void dump_backtrace_entry(unsigned long where, const char *loglvl)
 {
-	printk("%s %pS\n", loglvl, (void *)where);
+	printk("%s %pSb\n", loglvl, (void *)where);
 }
 
 void dump_backtrace(struct pt_regs *regs, struct task_struct *tsk,
-- 
https://chromeos.dev




More information about the linux-arm-kernel mailing list