[PATCH] arm64: Fix early single-stepping

Masami Hiramatsu mhiramat at kernel.org
Wed Nov 25 11:18:17 EST 2020


On Wed, 25 Nov 2020 16:11:34 +0000
Will Deacon <will at kernel.org> wrote:

> 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?

Oops, No, it should be enough.
I thought we were still in discussion on the other thread...

Anyway, thank you for merging! 

-- 
Masami Hiramatsu <mhiramat at kernel.org>



More information about the linux-arm-kernel mailing list