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 <james.morse@arm.com> Signed-off-by: Amit Daniel Kachhap <amit.kachhap@arm.com> Reviewed-by: Vincenzo Frascino <Vincenzo.Frascino@arm.com> Acked-by: Catalin Marinas <catalin.marinas@arm.com> Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
1 parent 04ad99a commit cdcb61a

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎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)