[PATCH v2 1/3] arm64: Prohibit instrumentation on arch_stack_walk()

Masami Hiramatsu (Google) mhiramat at kernel.org
Sat Dec 10 19:30:28 PST 2022


On Fri, 9 Dec 2022 11:16:34 +0000
Mark Rutland <mark.rutland at arm.com> wrote:

> On Tue, Dec 06, 2022 at 09:41:37AM +0900, Masami Hiramatsu wrote:
> > On Fri, 2 Dec 2022 13:17:30 +0000
> > Mark Rutland <mark.rutland at arm.com> wrote:
> > > I had a go at testing this patch, and it fixes the crash with the reproducer
> > > above, but there are plenty of other instances in stacktrace.c that lead to the
> > > same sort of crash, e.g.
> > > 
> > > # echo p stackinfo_get_task >> ${TRACEFS}/kprobe_events
> > > # echo 1 > ${TRACEFS}/events/kprobes/enable
> > 
> > Oops, thanks for pointing! Hmm, I thought stackinfo_get_task() is an
> > inlined function usually. Maybe we should make it nokprobe_inline.
> > But this is just one case. I need to scan all symbols to trace...
> 
> FWIW, due to other instrumentation issues I've started doing a larger noinstr
> cleanup on arm64 which should address this, as fixing this properly involves
> also modifying a bunch of underlying helpers (e.g. preempt_count()).
> 
> I can Cc you when sending that out, if you'd like? That'll probably be in the
> new year.

Thanks Mark, yes, I'm interested in that work.
Until that, I'll finish making a script for testing kprobes widely on
kernel symbols.

Thank you,

> 
> Thanks,
> Mark.


-- 
Masami Hiramatsu (Google) <mhiramat at kernel.org>



More information about the linux-arm-kernel mailing list