[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <tip-71ab8323cc357c68985a2d6fc6cfc22b1dbbc1c3@git.kernel.org>
Date: Wed, 12 Jun 2019 10:01:21 -0700
From: tip-bot for Matt Mullins <tipbot@...or.com>
To: linux-tip-commits@...r.kernel.org
Cc: linux-kernel@...r.kernel.org, gustavo@...eddedor.com,
hpa@...or.com, mingo@...hat.com, daniel.thompson@...aro.org,
christophe.leroy@....fr, x86@...nel.org,
rick.p.edgecombe@...el.com, bp@...e.de, mingo@...nel.org,
peterz@...radead.org, luto@...capital.net, dianders@...omium.org,
mmullins@...com, tglx@...utronix.de, namit@...are.com
Subject: [tip:x86/urgent] x86/kgdb: Return 0 from kgdb_arch_set_breakpoint()
Commit-ID: 71ab8323cc357c68985a2d6fc6cfc22b1dbbc1c3
Gitweb: https://git.kernel.org/tip/71ab8323cc357c68985a2d6fc6cfc22b1dbbc1c3
Author: Matt Mullins <mmullins@...com>
AuthorDate: Fri, 31 May 2019 12:47:54 -0700
Committer: Borislav Petkov <bp@...e.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@...com>
Signed-off-by: Borislav Petkov <bp@...e.de>
Reviewed-by: Nadav Amit <namit@...are.com>
Cc: Andy Lutomirski <luto@...capital.net>
Cc: Christophe Leroy <christophe.leroy@....fr>
Cc: Daniel Thompson <daniel.thompson@...aro.org>
Cc: Douglas Anderson <dianders@...omium.org>
Cc: "Gustavo A. R. Silva" <gustavo@...eddedor.com>
Cc: "H. Peter Anvin" <hpa@...or.com>
Cc: Ingo Molnar <mingo@...hat.com>
Cc: "Peter Zijlstra (Intel)" <peterz@...radead.org>
Cc: Rick Edgecombe <rick.p.edgecombe@...el.com>
Cc: Thomas Gleixner <tglx@...utronix.de>
Cc: x86-ml <x86@...nel.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)
Powered by blists - more mailing lists