linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: Keno Fischer <keno@juliacomputing.com>
To: linux-arm-kernel@lists.infradead.org
Cc: will@kernel.org
Subject: [PATCH] arm64: ptrace: Fix missing return in hw breakpoint code
Date: Mon, 1 Feb 2021 19:21:09 -0500	[thread overview]
Message-ID: <20210202002109.GA624440@juliacomputing.com> (raw)

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

             reply	other threads:[~2021-02-02  0:22 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-02  0:21 Keno Fischer [this message]
2021-02-02 20:31 ` [PATCH] arm64: ptrace: Fix missing return in hw breakpoint code Will Deacon
2021-02-02 21:01   ` Keno Fischer

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=20210202002109.GA624440@juliacomputing.com \
    --to=keno@juliacomputing.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=will@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;
as well as URLs for NNTP newsgroup(s).