Skip to content

Commit

Permalink
bcc/libbpf-tools: Fix user probe read references
Browse files Browse the repository at this point in the history
Replace bpf_probe_read_str with bpf_probe_read_user_str.

Signed-off-by: Sumanth Korikkar <sumanthk@linux.ibm.com>
Acked-by: Ilya Leoshkevich <iii@linux.ibm.com>
  • Loading branch information
sumanthkorikkar authored and yonghong-song committed May 25, 2020
1 parent d958381 commit 4a1313d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion libbpf-tools/opensnoop.bpf.c
Expand Up @@ -104,7 +104,7 @@ int trace_exit(struct trace_event_raw_sys_exit* ctx)
event.pid = bpf_get_current_pid_tgid() >> 32;
event.uid = bpf_get_current_uid_gid();
bpf_get_current_comm(&event.comm, sizeof(event.comm));
bpf_probe_read_str(&event.fname, sizeof(event.fname), ap->fname);
bpf_probe_read_user_str(&event.fname, sizeof(event.fname), ap->fname);
event.flags = ap->flags;
event.ret = ret;

Expand Down

0 comments on commit 4a1313d

Please sign in to comment.