linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] arm64: ptrace: Fix missing return in hw breakpoint code
@ 2021-02-02  0:21 Keno Fischer
  2021-02-02 20:31 ` Will Deacon
  0 siblings, 1 reply; 3+ messages in thread
From: Keno Fischer @ 2021-02-02  0:21 UTC (permalink / raw)
  To: linux-arm-kernel; +Cc: will

This was found by inspection - I don't work with aarch32 very
much, but I believe there is a missing return in this code,
since the second force_sig_fault here would override the
first, thus making the whole compat code here pointless.

Signed-off-by: Keno Fischer <keno@juliacomputing.com>
---

This was left over in my working tree from when I was working
through various aarch64 ptrace weirdness last year and I don't
think I ever got around to submitting it, but I just looked
through my work from back then and came across this again -
my apologies if I'm wrong about this - it's been a while,
so I'm not really read into this code anymore.

 arch/arm64/kernel/ptrace.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/arch/arm64/kernel/ptrace.c b/arch/arm64/kernel/ptrace.c
index e7b01904f180..9309c41dbafe 100644
--- a/arch/arm64/kernel/ptrace.c
+++ b/arch/arm64/kernel/ptrace.c
@@ -195,6 +195,7 @@ static void ptrace_hbptriggered(struct perf_event *bp,
 		arm64_force_sig_ptrace_errno_trap(si_errno,
 						  (void __user *)bkpt->trigger,
 						  desc);
+		return;
 	}
 #endif
 	arm64_force_sig_fault(SIGTRAP, TRAP_HWBKPT,
-- 
2.25.1


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2021-02-02 21:02 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-02-02  0:21 [PATCH] arm64: ptrace: Fix missing return in hw breakpoint code Keno Fischer
2021-02-02 20:31 ` Will Deacon
2021-02-02 21:01   ` Keno Fischer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).