diff options
author | Jiri Olsa <jolsa@redhat.com> | 2021-07-14 11:43:56 +0200 |
---|---|---|
committer | Alexei Starovoitov <ast@kernel.org> | 2021-07-15 17:59:09 -0700 |
commit | 9ffd9f3ff7193933dae171740ab70a103d460065 (patch) | |
tree | a274a2d5bad87bc289efe4c3da0da20bf2e8eed8 /tools/include | |
parent | 9b99edcae5c80c8fb9f8e7149bae528c9e610a72 (diff) | |
download | linux-9ffd9f3ff7193933dae171740ab70a103d460065.tar.bz2 |
bpf: Add bpf_get_func_ip helper for kprobe programs
Adding bpf_get_func_ip helper for BPF_PROG_TYPE_KPROBE programs,
so it's now possible to call bpf_get_func_ip from both kprobe and
kretprobe programs.
Taking the caller's address from 'struct kprobe::addr', which is
defined for both kprobe and kretprobe.
Signed-off-by: Jiri Olsa <jolsa@kernel.org>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Reviewed-by: Masami Hiramatsu <mhiramat@kernel.org>
Link: https://lore.kernel.org/bpf/20210714094400.396467-5-jolsa@kernel.org
Diffstat (limited to 'tools/include')
-rw-r--r-- | tools/include/uapi/linux/bpf.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/include/uapi/linux/bpf.h b/tools/include/uapi/linux/bpf.h index 89688f16ad60..2db6925e04f4 100644 --- a/tools/include/uapi/linux/bpf.h +++ b/tools/include/uapi/linux/bpf.h @@ -4844,7 +4844,7 @@ union bpf_attr { * * u64 bpf_get_func_ip(void *ctx) * Description - * Get address of the traced function (for tracing programs). + * Get address of the traced function (for tracing and kprobe programs). * Return * Address of the traced function. */ |