History

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.

Amit Daniel Kachhap committed 6 years ago

Commit cdcb61a1 parent 04ad99a1 file · +1 −1Browse files

Unified · Split

arch/arm64/kernel/process.c+1−1
@@ -262,7 +262,7 @@ void __show_regs(struct pt_regs *regs) · 261 unmodified lines
262 262
263 if (!user_mode(regs)) {263 if (!user_mode(regs)) {
264 printk("pc : %pS\n", (void *)regs->pc);264 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));
266 } else {266 } else {
267 printk("pc : %016llx\n", regs->pc);267 printk("pc : %016llx\n", regs->pc);
268 printk("lr : %016llx\n", lr);268 printk("lr : %016llx\n", lr);

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t