Re: [PATCH v3 0/5] ARM64: Add kernel probes(Kprobes) support
From: Steve Capper
Date: Wed Dec 10 2014 - 11:38:40 EST
On Tue, Dec 09, 2014 at 09:27:18AM -0500, David Long wrote:
> On 12/09/14 08:33, Steve Capper wrote:
> >On Thu, Dec 04, 2014 at 08:53:03PM +0900, Masami Hiramatsu wrote:
> >Not sure if this is helpful, but the following also caused a crash for
> >echo "p:trace_event_buffer_lock_reserve trace_event_buffer_lock_reserve" > /sys/kernel/debug/tracing/kprobe_events
> >echo "p:memcpy memcpy" >> /sys/kernel/debug/tracing/kprobe_events
> >echo 1 > /sys/kernel/debug/tracing/events/kprobes/enable
> >[immediate crash]
> >The crash point for me is in the arm64 ASID allocator, it again looks
> >like the interrupts are in an unexpected state.
> >(check_and_switch_context goes down the irqs disabled code path, I
> >think incorrectly).
> >This occurred for me both with and without the proposed irq saving fix.
> >I will do some more digging.
> Thanks, more information is good.
Some good news, I think I've fixed the problem I've been experiencing.
Basically, I've torn out all the interrupt save/restore and have
narrowed the scope to just sandwich the instruction single-step. This
simplifies a lot of logic, and I've now been able to perf record a
kprobe on memcpy (and the trace_event_buffer_lock_reserve + memcpy
test) without any issues on a Juno platform.
I may have been somewhat over-zealous with the chainsaw, so please do
put this fix through its paces.