From: tip-bot for Matt Mullins <tipbot@zytor.com>
To: linux-tip-commits@vger.kernel.org
Cc: linux-kernel@vger.kernel.org, gustavo@embeddedor.com,
hpa@zytor.com, mingo@redhat.com, daniel.thompson@linaro.org,
christophe.leroy@c-s.fr, x86@kernel.org,
rick.p.edgecombe@intel.com, bp@suse.de, mingo@kernel.org,
peterz@infradead.org, luto@amacapital.net, dianders@chromium.org,
mmullins@fb.com, tglx@linutronix.de, namit@vmware.com
Subject: [tip:x86/urgent] x86/kgdb: Return 0 from kgdb_arch_set_breakpoint()
Date: Wed, 12 Jun 2019 10:01:21 -0700 [thread overview]
Message-ID: <tip-71ab8323cc357c68985a2d6fc6cfc22b1dbbc1c3@git.kernel.org> (raw)
In-Reply-To: <20190531194755.6320-1-mmullins@fb.com>
Commit-ID: 71ab8323cc357c68985a2d6fc6cfc22b1dbbc1c3
Gitweb: https://git.kernel.org/tip/71ab8323cc357c68985a2d6fc6cfc22b1dbbc1c3
Author: Matt Mullins <mmullins@fb.com>
AuthorDate: Fri, 31 May 2019 12:47:54 -0700
Committer: Borislav Petkov <bp@suse.de>
CommitDate: Wed, 12 Jun 2019 18:52:44 +0200
x86/kgdb: Return 0 from kgdb_arch_set_breakpoint()
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>
Signed-off-by: Borislav Petkov <bp@suse.de>
Reviewed-by: Nadav Amit <namit@vmware.com>
Cc: Andy Lutomirski <luto@amacapital.net>
Cc: Christophe Leroy <christophe.leroy@c-s.fr>
Cc: Daniel Thompson <daniel.thompson@linaro.org>
Cc: Douglas Anderson <dianders@chromium.org>
Cc: "Gustavo A. R. Silva" <gustavo@embeddedor.com>
Cc: "H. Peter Anvin" <hpa@zytor.com>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: "Peter Zijlstra (Intel)" <peterz@infradead.org>
Cc: Rick Edgecombe <rick.p.edgecombe@intel.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: x86-ml <x86@kernel.org>
Link: https://lkml.kernel.org/r/20190531194755.6320-1-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)
prev parent reply other threads:[~2019-06-12 17:02 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-05-31 19:47 [PATCH] x86/kgdb: return 0 from kgdb_arch_set_breakpoint Matt Mullins
2019-05-31 19:51 ` Nadav Amit
2019-06-12 17:01 ` tip-bot for Matt Mullins [this message]
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=tip-71ab8323cc357c68985a2d6fc6cfc22b1dbbc1c3@git.kernel.org \
--to=tipbot@zytor.com \
--cc=bp@suse.de \
--cc=christophe.leroy@c-s.fr \
--cc=daniel.thompson@linaro.org \
--cc=dianders@chromium.org \
--cc=gustavo@embeddedor.com \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-tip-commits@vger.kernel.org \
--cc=luto@amacapital.net \
--cc=mingo@kernel.org \
--cc=mingo@redhat.com \
--cc=mmullins@fb.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