From ca6b181232d7d76d40075c80959c6a2cbed4b353 Mon Sep 17 00:00:00 2001 From: Johannes Berg Date: Thu, 24 Sep 2026 08:50:01 +0200 Subject: [PATCH] um: use %pB to print functions in stack traces In a stack trace we get the return address, so if the call is at the end of a function, it can get printed as the next function, e.g. vpanic+0x1d3/0x435 abort+0x0/0x4e do_exit+0x29c/0xcb7 sys_exit_group+0x0/0x16 pid_child_should_wake+0x0/0x83 Use %pB like on x86, which resolves the name with address - 1, in the same example I get: vpanic+0x1d3/0x435 panic+0x55/0x55 do_exit+0x29c/0xcb7 do_group_exit+0xbe/0xbe sys_exit_group+0x16/0x16 Link: https://patch.msgid.link/20260924085002.3ff9ca1de60a.I5ff299b6f3196ad3c51c3032a90c7158c1bbccda@changeid Signed-off-by: Johannes Berg --- arch/um/kernel/sysrq.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/um/kernel/sysrq.c b/arch/um/kernel/sysrq.c index 13ee5666668d..5a2c28e09294 100644 --- a/arch/um/kernel/sysrq.c +++ b/arch/um/kernel/sysrq.c @@ -18,7 +18,7 @@ static void _print_addr(void *data, unsigned long address, int reliable) { const char *loglvl = data; - printk("%s [<%08lx>] %s%pS\n", loglvl, address, reliable ? "" : "? ", + printk("%s [<%08lx>] %s%pB\n", loglvl, address, reliable ? "" : "? ", (void *)address); }