Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1453603 > unrolled thread

[PATCH 2/5] arm64: kgdb_step_brk_fn: ignore other's exception

Started byPratyush Anand <panand@redhat.com>
First post2016-08-02 07:40 +0200
Last post2016-08-02 07:40 +0200
Articles 1 — 1 participant

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  [PATCH 2/5] arm64: kgdb_step_brk_fn: ignore other's exception Pratyush Anand <panand@redhat.com> - 2016-08-02 07:40 +0200

#1453603 — [PATCH 2/5] arm64: kgdb_step_brk_fn: ignore other's exception

FromPratyush Anand <panand@redhat.com>
Date2016-08-02 07:40 +0200
Subject[PATCH 2/5] arm64: kgdb_step_brk_fn: ignore other's exception
Message-ID<s1AAO-cO-21@gated-at.bofh.it>
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 8c57f6496e56..e126f2b15002 100644
--- a/arch/arm64/kernel/kgdb.c
+++ b/arch/arm64/kernel/kgdb.c
@@ -244,6 +244,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.5.5

[toc] | [standalone]


Back to top | Article view | linux.kernel


csiph-web