From: Jiri Slaby <jslaby@suse.cz>
To: bp@suse.de
Cc: tglx@linutronix.de, x86@kernel.org, linux-kernel@vger.kernel.org,
Jiri Slaby <jslaby@suse.cz>,
Mark Mossberg <mark.mossberg@gmail.com>
Subject: [PATCH] x86/dumpstack: Don't mention RIP in "Code:"
Date: Tue, 6 Sep 2022 09:11:23 +0200 [thread overview]
Message-ID: <20220906071123.558-1-jslaby@suse.cz> (raw)
In-Reply-To: <b772c39f-c5ae-8f17-fe6e-6a2bc4d1f83b@kernel.org>
Commit 238c91115cd0 ("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.
Cc: Mark Mossberg <mark.mossberg@gmail.com>
Cc: Borislav Petkov <bp@suse.de>
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
---
arch/x86/kernel/dumpstack.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/x86/kernel/dumpstack.c b/arch/x86/kernel/dumpstack.c
index afae4dd77495..b3dba35f466e 100644
--- a/arch/x86/kernel/dumpstack.c
+++ b/arch/x86/kernel/dumpstack.c
@@ -128,7 +128,7 @@ void show_opcodes(struct pt_regs *regs, const char *loglvl)
/* No access to the user space stack of other tasks. Ignore. */
break;
default:
- printk("%sCode: Unable to access opcode bytes at RIP 0x%lx.\n",
+ printk("%sCode: Unable to access opcode bytes at 0x%lx.\n",
loglvl, prologue);
break;
}
--
2.37.3
next prev parent reply other threads:[~2022-09-06 7:11 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-08-29 8:37 6.0 tty regression, NULL pointer deref in flush_to_ldisc Hans de Goede
2022-08-29 9:16 ` Weird RIP printed in BUGs [was: 6.0 tty regression, NULL pointer deref in flush_to_ldisc] Jiri Slaby
2022-09-06 7:11 ` Jiri Slaby [this message]
2022-09-07 3:45 ` [PATCH] x86/dumpstack: Don't mention RIP in "Code:" Borislav Petkov
2022-09-20 14:23 ` [tip: x86/misc] x86/dumpstack: Don't mention RIP in "Code: " tip-bot2 for Jiri Slaby
2022-08-29 9:36 ` 6.0 tty regression, NULL pointer deref in flush_to_ldisc Ilpo Järvinen
2022-08-29 10:11 ` Hans de Goede
2022-08-29 21:25 ` Hans de Goede
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20220906071123.558-1-jslaby@suse.cz \
--to=jslaby@suse.cz \
--cc=bp@suse.de \
--cc=linux-kernel@vger.kernel.org \
--cc=mark.mossberg@gmail.com \
--cc=tglx@linutronix.de \
--cc=x86@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®