]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
LoongArch: Use %px to print unmodified unwinding address
authorTiezhu Yang <yangtiezhu@loongson.cn>
Tue, 10 Feb 2026 11:31:13 +0000 (19:31 +0800)
committerSasha Levin <sashal@kernel.org>
Wed, 4 Mar 2026 12:21:26 +0000 (07:21 -0500)
[ Upstream commit 77403a06d845db1caf9a6b0867b43e9dd8de8e4a ]

Currently, use %p to prevent leaking information about the kernel memory
layout when printing the PC address, but the kernel log messages are not
useful to debug problem if bt_address() returns 0. Given that the type of
"pc" variable is unsigned long, it should use %px to print the unmodified
unwinding address.

Cc: stable@vger.kernel.org
Signed-off-by: Tiezhu Yang <yangtiezhu@loongson.cn>
Signed-off-by: Huacai Chen <chenhuacai@loongson.cn>
Signed-off-by: Sasha Levin <sashal@kernel.org>
arch/loongarch/kernel/unwind_orc.c

index 0d5fa64a222522897df7f7c4bfbad8d2262a207e..e410048489c667a0dfdb9efac3426286a5b9eb56 100644 (file)
@@ -508,7 +508,7 @@ bool unwind_next_frame(struct unwind_state *state)
 
        state->pc = bt_address(pc);
        if (!state->pc) {
-               pr_err("cannot find unwind pc at %p\n", (void *)pc);
+               pr_err("cannot find unwind pc at %px\n", (void *)pc);
                goto err;
        }