[PATCH] arm64: Fix early single-stepping

Will Deacon will at kernel.org
Wed Nov 25 11:11:34 EST 2020


Hi Masami,

On Thu, Nov 26, 2020 at 01:09:06AM +0900, Masami Hiramatsu wrote:
> On Wed, 28 Oct 2020 08:36:44 +0000
> Will Deacon <will at kernel.org> wrote:
> > 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.
> 
> We started working on using the BRK instead of hardware step in kprobes
> in other threads. However, there still be a bug in the kernel.
> I would like to fix or at least mitigate this issue until this is released
> (since it's a bug)
> 
> Would you think we can push the BRK only kprobes until it or in stable kernel?
> Or, we should add a mitigation patch for this bug?
> For the mitigation, I think we can introduce a kconfig flag which indicates
> the arch doesn't support early kprobes, in that case we defer the kprobe and
> boot-time trace later stage. This flag will be removed after we introduce the
> BRK-only kprobes.

The BRK stuff is merged upstream:

http://git.kernel.org/linus/7ee31a3aa8f49

Are you saying that this isn't sufficient to fix the problem?

Will



More information about the linux-arm-kernel mailing list