Skip to content

Commit 5258b80

Browse files
Jiri Slabysuryasaimadhu
authored andcommitted
x86/dumpstack: Don't mention RIP in "Code: "
Commit 238c911 ("x86/dumpstack: Fix misleading instruction pointer error message") changed the "Code:" line in bug reports when RIP is an invalid pointer. In particular, the report currently says (for example): BUG: kernel NULL pointer dereference, address: 0000000000000000 ... RIP: 0010:0x0 Code: Unable to access opcode bytes at RIP 0xffffffffffffffd6. That Unable to access opcode bytes at RIP 0xffffffffffffffd6. is quite confusing as RIP value is 0, not -42. That -42 comes from "regs->ip - PROLOGUE_SIZE", because Code is dumped with some prologue (and epilogue). So do not mention "RIP" on this line in this context. Signed-off-by: Jiri Slaby <[email protected]> Signed-off-by: Borislav Petkov <[email protected]> Link: https://lore.kernel.org/r/[email protected]
1 parent 7987448 commit 5258b80

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

arch/x86/kernel/dumpstack.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ void show_opcodes(struct pt_regs *regs, const char *loglvl)
128128
/* No access to the user space stack of other tasks. Ignore. */
129129
break;
130130
default:
131-
printk("%sCode: Unable to access opcode bytes at RIP 0x%lx.\n",
131+
printk("%sCode: Unable to access opcode bytes at 0x%lx.\n",
132132
loglvl, prologue);
133133
break;
134134
}

0 commit comments

Comments
 (0)