From: Jeffrey Merkey <jeffmerkey@gmail.com>
To: hpa@zytor.com, jason.wessel@windriver.com, jeffmerkey@gmail.com,
kgdb-bugreport@lists.sourceforge.net,
linux-kernel@vger.kernel.org, mingo@redhat.com,
tglx@linutronix.de, x86@kernel.org
Subject: [PATCH 4/4] Fix kgdb/kdb to conform to int3 format
Date: Fri, 29 Jan 2016 11:19:11 -0700 [thread overview]
Message-ID: <1454091551-12819-1-git-send-email-jeffmerkey@gmail.com> (raw)
If a breakpoint is triggered under x86 with an int3 that
kdb does not know about, it will report it as a catastrophic
error rather than just assuming it was told to enter the debugger.
The macro that defines the kgdb breakpoint also needs to
conform to the newer gas format without the numbers.
Signed-off-by: Jeffrey Merkey <jeffmerkey@gmail.com>
---
arch/x86/include/asm/kgdb.h | 2 +-
kernel/debug/kdb/kdb_debugger.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/arch/x86/include/asm/kgdb.h b/arch/x86/include/asm/kgdb.h
index 332f98c..e24908a 100644
--- a/arch/x86/include/asm/kgdb.h
+++ b/arch/x86/include/asm/kgdb.h
@@ -77,7 +77,7 @@ enum regnames {
static inline void arch_kgdb_breakpoint(void)
{
- asm(" int $3");
+ asm volatile("int3");
}
#define BREAK_INSTR_SIZE 1
#define CACHE_FLUSH_IS_SAFE 1
diff --git a/kernel/debug/kdb/kdb_debugger.c b/kernel/debug/kdb/kdb_debugger.c
index 15e1a7a..d9b944d 100644
--- a/kernel/debug/kdb/kdb_debugger.c
+++ b/kernel/debug/kdb/kdb_debugger.c
@@ -55,7 +55,7 @@ int kdb_stub(struct kgdb_state *ks)
int error = 0;
kdb_bp_t *bp;
unsigned long addr = kgdb_arch_pc(ks->ex_vector, ks->linux_regs);
- kdb_reason_t reason = KDB_REASON_OOPS;
+ kdb_reason_t reason = KDB_REASON_KEYBOARD;
kdb_dbtrap_t db_result = KDB_DB_NOBPT;
int i;
--
1.8.3.1
reply other threads:[~2016-01-29 18:19 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=1454091551-12819-1-git-send-email-jeffmerkey@gmail.com \
--to=jeffmerkey@gmail.com \
--cc=hpa@zytor.com \
--cc=jason.wessel@windriver.com \
--cc=kgdb-bugreport@lists.sourceforge.net \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.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®