On 2018-11-02, Aleksa Sarai cyphar@cyphar.com wrote:
Unfortunately, I'm having a lot of trouble understanding how the current ftrace hooking works -- ORC has a couple of ftrace hooks that seem reasonable on the surface but I don't understand (for instance) how HAVE_FUNCTION_GRAPH_RET_ADDR_PTR *actually* works. Though your comment appears to indicate that it doesn't work for stack traces?
Sorry, I just figured out how it works! (To make sure I actually understand -- retp is a pointer to the place in the stack where the return address is stored, so it uniquely specifies what each trampoline actually points to -- this trick could also be used for kretprobes).