Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1491734
| From | Pratyush Anand <panand@redhat.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH V2 2/6] arm64: kgdb_step_brk_fn: ignore other's exception |
| Date | 2016-09-27 09:50 +0200 |
| Message-ID | <slVjk-6IZ-35@gated-at.bofh.it> (permalink) |
| References | <slVjj-6IZ-5@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
ARM64 step exception does not have any syndrome information. So, it is
responsibility of exception handler to take care that they handle it
only if exception was raised for them.
Since kgdb_step_brk_fn() always returns 0, therefore we might have problem
when we will have other step handler registered as well.
This patch fixes kgdb_step_brk_fn() to return error in case of step handler
was not meant for kgdb.
Signed-off-by: Pratyush Anand <panand@redhat.com>
---
arch/arm64/kernel/kgdb.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/arch/arm64/kernel/kgdb.c b/arch/arm64/kernel/kgdb.c
index e017a9493b92..d217c9e95b06 100644
--- a/arch/arm64/kernel/kgdb.c
+++ b/arch/arm64/kernel/kgdb.c
@@ -247,6 +247,9 @@ NOKPROBE_SYMBOL(kgdb_compiled_brk_fn);
static int kgdb_step_brk_fn(struct pt_regs *regs, unsigned int esr)
{
+ if (!kgdb_single_step)
+ return DBG_HOOK_ERROR;
+
kgdb_handle_exception(1, SIGTRAP, 0, regs);
return 0;
}
--
2.7.4
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH V2 0/6] ARM64: Uprobe support added Pratyush Anand <panand@redhat.com> - 2016-09-27 09:50 +0200 [PATCH V2 4/6] arm64: Handle TRAP_BRKPT for user mode as well Pratyush Anand <panand@redhat.com> - 2016-09-27 09:50 +0200 [PATCH V2 1/6] arm64: kprobe: protect/rename few definitions to be reused by uprobe Pratyush Anand <panand@redhat.com> - 2016-09-27 09:50 +0200 [PATCH V2 3/6] arm64: Handle TRAP_TRACE for user mode as well Pratyush Anand <panand@redhat.com> - 2016-09-27 09:50 +0200 [PATCH V2 5/6] arm64: introduce mm context flag to keep 32 bit task information Pratyush Anand <panand@redhat.com> - 2016-09-27 09:50 +0200 [PATCH V2 2/6] arm64: kgdb_step_brk_fn: ignore other's exception Pratyush Anand <panand@redhat.com> - 2016-09-27 09:50 +0200 [PATCH V2 6/6] arm64: Add uprobe support Pratyush Anand <panand@redhat.com> - 2016-09-27 09:50 +0200
csiph-web