Skip to content

Commit 2a86ac3

Browse files
committed
Documentation: probes: Add a new ret_ip callback parameter
Add a new ret_ip callback parameter description. Link: https://lore.kernel.org/all/169556257133.146934.13560704846459957726.stgit@devnote2/ Fixes: cb16330 ("fprobe: Pass return address to the handlers") Signed-off-by: Masami Hiramatsu (Google) <mhiramat@kernel.org> Acked-by: Florent Revest <revest@chromium.org>
1 parent 5872080 commit 2a86ac3

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

Documentation/trace/fprobe.rst

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -91,9 +91,9 @@ The prototype of the entry/exit callback function are as follows:
9191

9292
.. code-block:: c
9393
94-
int entry_callback(struct fprobe *fp, unsigned long entry_ip, struct pt_regs *regs, void *entry_data);
94+
int entry_callback(struct fprobe *fp, unsigned long entry_ip, unsigned long ret_ip, struct pt_regs *regs, void *entry_data);
9595
96-
void exit_callback(struct fprobe *fp, unsigned long entry_ip, struct pt_regs *regs, void *entry_data);
96+
void exit_callback(struct fprobe *fp, unsigned long entry_ip, unsigned long ret_ip, struct pt_regs *regs, void *entry_data);
9797
9898
Note that the @entry_ip is saved at function entry and passed to exit handler.
9999
If the entry callback function returns !0, the corresponding exit callback will be cancelled.
@@ -108,6 +108,10 @@ If the entry callback function returns !0, the corresponding exit callback will
108108
Note that this may not be the actual entry address of the function but
109109
the address where the ftrace is instrumented.
110110

111+
@ret_ip
112+
This is the return address that the traced function will return to,
113+
somewhere in the caller. This can be used at both entry and exit.
114+
111115
@regs
112116
This is the `pt_regs` data structure at the entry and exit. Note that
113117
the instruction pointer of @regs may be different from the @entry_ip

0 commit comments

Comments
 (0)