Re: [PATCH] ftrace: enable trampoline when rec count decrement to one

2019-05-08 Thread Steven Rostedt
On Wed, 8 May 2019 23:02:33 +0800 "chengjian (D)" wrote: > function tracer uses ftrace_caller() and livepatch uses > ftrace_regs_caller(). > > I can modify my testcase to trigger this race condition. > > > #enable livepatch > insmod klp_unshare_files.ko > cat /sys/kernel/debug/tracing/enabled

Re: [PATCH] ftrace: enable trampoline when rec count decrement to one

2019-05-08 Thread chengjian (D)
Hi, Steven On 2019/5/6 3:34, Steven Rostedt wrote: Thanks for the patch. There was some race condition that prevented me from doing this in the first place, but unfortunately, I don't remember what that was :-/ I'll have to think about this before applying this patch. Maybe there isn't a rac

Re: [PATCH] ftrace: enable trampoline when rec count decrement to one

2019-05-05 Thread Steven Rostedt
On Sat, 4 May 2019 19:39:39 +0800 Cheng Jian wrote: > Trampoline can only be enabled if there is only a single ops > attached to it. If there's only a single callback registered > to a function, and the ops has a trampoline registered for it, > then we can call the trampoline directly. This is ve

[PATCH] ftrace: enable trampoline when rec count decrement to one

2019-05-04 Thread Cheng Jian
Trampoline can only be enabled if there is only a single ops attached to it. If there's only a single callback registered to a function, and the ops has a trampoline registered for it, then we can call the trampoline directly. This is very useful for improving the performance of ftrace and livepatc