Skip to content

Commit cdcb61a

Browse files
amitdanielkachhapctmarinas
authored andcommitted
arm64: __show_regs: strip PAC from lr in printk
lr is printed with %pS which will try to find an entry in kallsyms. After enabling pointer authentication, this match will fail due to PAC present in the lr. Strip PAC from the lr to display the correct symbol name. Suggested-by: James Morse <[email protected]> Signed-off-by: Amit Daniel Kachhap <[email protected]> Reviewed-by: Vincenzo Frascino <[email protected]> Acked-by: Catalin Marinas <[email protected]> Signed-off-by: Catalin Marinas <[email protected]>
1 parent 04ad99a commit cdcb61a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

arch/arm64/kernel/process.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -262,7 +262,7 @@ void __show_regs(struct pt_regs *regs)
262262

263263
if (!user_mode(regs)) {
264264
printk("pc : %pS\n", (void *)regs->pc);
265-
printk("lr : %pS\n", (void *)lr);
265+
printk("lr : %pS\n", (void *)ptrauth_strip_insn_pac(lr));
266266
} else {
267267
printk("pc : %016llx\n", regs->pc);
268268
printk("lr : %016llx\n", lr);

0 commit comments

Comments
 (0)