On 4/26/19 2:40 PM, Mario Smarduch wrote:
A side question regarding calling the new function after it's patched and performance. Is the similar trampoline mechanism used when a ftrace hook is set? Meaning pt_regs is presented to hook and 'rip' is changed?
Yes. So technically the old function does get invoked, but at its very beginning, the ftrace handler routes off to the new function... and as you guessed, its 'rip' is modified to return back to the original caller and not the old function.
The "kpatch in action" video on the github page has a diagram similar to this one for kGraft:
https://www.suse.com/c/wp-content/uploads/2018/03/Live-Patching-Diagram.png -- Joe _______________________________________________ kpatch mailing list [email protected] https://www.redhat.com/mailman/listinfo/kpatch
