[PATCH] arm64: ftrace: stop using kstop_machine to enable/disable tracing

Steven Rostedt rostedt at goodmis.org
Thu Dec 3 07:07:50 PST 2015

On Thu, 3 Dec 2015 11:48:24 +0000
Will Deacon <will.deacon at arm.com> wrote:

> Hmm, so this should all be fine if we exclusively use the probe_kernel_*
> functions and handle the -EFAULT gracefully. Now, that leaves an
> interesting scenario with the flush_icache_range call in
> aarch64_insn_patch_text_nosync, since that's not run with
> KERNEL_DS/pagefault_disable() and so we'll panic if the text disappears
> underneath us.

Nothing should remove the text from underneath you if everything
matches up fine before that. Module unloading will block on the
ftrace_lock if it has any functions that can be traced.

-- Steve

> So we probably need to add that code and call __flush_cache_user_range
> instead.
> What do you think?
> Will

More information about the linux-arm-kernel mailing list