From: Matt Mullins <mmullins@fb.com>
To: <mmullins@fb.com>, <bp@alien8.de>, <mingo@redhat.com>,
<luto@kernel.org>, <namit@vmware.com>, <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>,
"H. Peter Anvin" <hpa@zytor.com>, <x86@kernel.org>,
Daniel Thompson <daniel.thompson@linaro.org>,
"Rick Edgecombe" <rick.p.edgecombe@intel.com>,
Christophe Leroy <christophe.leroy@c-s.fr>,
Douglas Anderson <dianders@chromium.org>,
<linux-kernel@vger.kernel.org>
Subject: [PATCH] x86/kgdb: return 0 from kgdb_arch_set_breakpoint
Date: Fri, 31 May 2019 12:47:54 -0700 [thread overview]
Message-ID: <20190531194755.6320-1-mmullins@fb.com> (raw)
err must be nonzero in order to reach text_poke(), which caused kgdb to
fail to set breakpoints:
(gdb) break __x64_sys_sync
Breakpoint 1 at 0xffffffff81288910: file ../fs/sync.c, line 124.
(gdb) c
Continuing.
Warning:
Cannot insert breakpoint 1.
Cannot access memory at address 0xffffffff81288910
Command aborted.
Fixes: 86a22057127d ("x86/kgdb: Avoid redundant comparison of patched code")
Signed-off-by: Matt Mullins <mmullins@fb.com>
---
arch/x86/kernel/kgdb.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/x86/kernel/kgdb.c b/arch/x86/kernel/kgdb.c
index 9a8c1648fc9a..6690c5652aeb 100644
--- a/arch/x86/kernel/kgdb.c
+++ b/arch/x86/kernel/kgdb.c
@@ -758,7 +758,7 @@ int kgdb_arch_set_breakpoint(struct kgdb_bkpt *bpt)
BREAK_INSTR_SIZE);
bpt->type = BP_POKE_BREAKPOINT;
- return err;
+ return 0;
}
int kgdb_arch_remove_breakpoint(struct kgdb_bkpt *bpt)
--
2.17.1
next reply other threads:[~2019-05-31 19:49 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-05-31 19:47 Matt Mullins [this message]
2019-05-31 19:51 ` [PATCH] x86/kgdb: return 0 from kgdb_arch_set_breakpoint Nadav Amit
2019-06-12 17:01 ` [tip:x86/urgent] x86/kgdb: Return 0 from kgdb_arch_set_breakpoint() tip-bot for Matt Mullins
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=20190531194755.6320-1-mmullins@fb.com \
--to=mmullins@fb.com \
--cc=bp@alien8.de \
--cc=christophe.leroy@c-s.fr \
--cc=daniel.thompson@linaro.org \
--cc=dianders@chromium.org \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=luto@kernel.org \
--cc=mingo@redhat.com \
--cc=namit@vmware.com \
--cc=peterz@infradead.org \
--cc=rick.p.edgecombe@intel.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