summaryrefslogtreecommitdiff
path: root/tools/bpf
diff options
context:
space:
mode:
authorIlya Leoshkevich <iii@linux.ibm.com>2020-07-20 13:48:06 +0200
committerAlexei Starovoitov <ast@kernel.org>2020-07-21 13:26:26 -0700
commite4d9c2320716ea0e9ef59f503ddd8f253a642ddd (patch)
tree6f0b5d742197e5600edb95fb3a7fc16f1b4c4335 /tools/bpf
parent6bd557275ad5a1adaff5082f4e24218ba344e0c0 (diff)
samples/bpf, selftests/bpf: Use bpf_probe_read_kernel
A handful of samples and selftests fail to build on s390, because after commit 0ebeea8ca8a4 ("bpf: Restrict bpf_probe_read{, str}() only to archs where they work") bpf_probe_read is not available anymore. Fix by using bpf_probe_read_kernel. Signed-off-by: Ilya Leoshkevich <iii@linux.ibm.com> Signed-off-by: Alexei Starovoitov <ast@kernel.org> Link: https://lore.kernel.org/bpf/20200720114806.88823-1-iii@linux.ibm.com
Diffstat (limited to 'tools/bpf')
-rw-r--r--tools/bpf/bpftool/skeleton/pid_iter.bpf.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/tools/bpf/bpftool/skeleton/pid_iter.bpf.c b/tools/bpf/bpftool/skeleton/pid_iter.bpf.c
index 8468a608911e..d9b420972934 100644
--- a/tools/bpf/bpftool/skeleton/pid_iter.bpf.c
+++ b/tools/bpf/bpftool/skeleton/pid_iter.bpf.c
@@ -71,7 +71,8 @@ int iter(struct bpf_iter__task_file *ctx)
e.pid = task->tgid;
e.id = get_obj_id(file->private_data, obj_type);
- bpf_probe_read(&e.comm, sizeof(e.comm), task->group_leader->comm);
+ bpf_probe_read_kernel(&e.comm, sizeof(e.comm),
+ task->group_leader->comm);
bpf_seq_write(ctx->meta->seq, &e, sizeof(e));
return 0;