From: Jean-Philippe Brucker <jean-philippe@linaro.org>
To: Masami Hiramatsu <mhiramat@kernel.org>
Cc: catalin.marinas@arm.com, Will Deacon <will@kernel.org>,
dianders@chromium.org, linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH] arm64: Fix early single-stepping
Date: Wed, 28 Oct 2020 10:48:27 +0100 [thread overview]
Message-ID: <20201028094827.GC2328726@myrica> (raw)
In-Reply-To: <20201028180731.13d770167b521dc28c189bbb@kernel.org>
On Wed, Oct 28, 2020 at 06:07:31PM +0900, Masami Hiramatsu wrote:
> > > Yes, I think so. Same order problem as the OS lock, they need to be reset
> > > before enable_debug_monitors(). On CPU0 that would be before
> > > early_initcall and for secondaries the hotplug notifier needs to be
> > > installed earlier as well. I'll send a v2.
> >
> > Cheers. An alternative (which I think would be better in the long run
> > anyway) would be to avoid using hardware step in kprobes and instead rely
> > on a BRK instruction to trap after running the trampoline.
>
> But how we trap the instruction which can change pc? (like br?)
> Are all those instruction emulated now?
According to aarch64_insn_is_steppable() anything that changes the PC is
emulated. I'm also checking whether there is a change of behavior with
synchronous exceptions taken while single-stepping (page faults).
Thanks,
Jean
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
next prev parent reply other threads:[~2020-10-28 9:49 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-10-26 17:29 [PATCH] arm64: Fix early single-stepping Jean-Philippe Brucker
2020-10-26 17:38 ` Will Deacon
2020-10-27 0:48 ` Masami Hiramatsu
2020-10-27 10:13 ` Masami Hiramatsu
2020-10-27 10:42 ` Masami Hiramatsu
2020-10-27 11:59 ` Jean-Philippe Brucker
2020-10-27 12:33 ` Will Deacon
2020-10-27 13:49 ` Masami Hiramatsu
2020-10-28 8:28 ` Jean-Philippe Brucker
2020-10-28 8:36 ` Will Deacon
2020-10-28 9:07 ` Masami Hiramatsu
2020-10-28 9:48 ` Jean-Philippe Brucker [this message]
2020-10-28 12:21 ` Masami Hiramatsu
2020-11-25 16:09 ` Masami Hiramatsu
2020-11-25 16:11 ` Will Deacon
2020-11-25 16:18 ` Masami Hiramatsu
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=20201028094827.GC2328726@myrica \
--to=jean-philippe@linaro.org \
--cc=catalin.marinas@arm.com \
--cc=dianders@chromium.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=mhiramat@kernel.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