Re: [PATCH 00/10] ftrace: Add register_ftrace_direct()
From: Miroslav Benes
Date: Wed Nov 13 2019 - 10:10:40 EST
On Fri, 8 Nov 2019, Steven Rostedt wrote:
>
> Alexei mentioned that he would like a way to access the ftrace fentry
> code to jump directly to a custom eBPF trampoline instead of using
> ftrace regs caller, as he said it would be faster.
>
> I proposed a new register_ftrace_direct() function that would allow
> this to happen and still work with the ftrace infrastructure. I posted
> a proof of concept patch here:
>
> https://lore.kernel.org/r/20191023122307.756b4978@xxxxxxxxxxxxxxxxxx
>
> This patch series is a more complete version, and the start of the
> actual implementation. I haven't run it through my full test suite but
> it passes my smoke tests and some other custom tests I built.
>
> I also realized that I need to make the sample modules depend on X86_64
> as it has inlined assembly in it that requires that dependency.
>
> This is based on 5.4-rc6 plus the permanent patches that prevent
> a ftrace_ops from being disabled by /proc/sys/kernel/ftrace_enabled
>
> Below is the tree that contains this code.
>
> git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace.git
> ftrace/direct
>
> Head SHA1: 9492654d091cb90a487ca669c58f802fa99bcd6f
>
> Enjoy,
>
> -- Steve
So I tried to run the selftests and ran into the same timeout issue we had
with live patching :/
See http://lkml.kernel.org/r/20191025115041.23186-1-mbenes@xxxxxxx for a possible solution.
Miroslav