bcc/tools: Replace bpf_probe_read with bpf_probe_read_kernel
It is recommended to use bpf_probe_read_kernel_{str} in the bpf tools.
See kernel commit 0ebeea8ca8a4 ("bpf: Restrict bpf_probe_read{, str}()
only to archs where they work")
Signed-off-by: Sumanth Korikkar <sumanthk@linux.ibm.com>
Acked-by: Ilya Leoshkevich <iii@linux.ibm.com>
diff --git a/tools/oomkill.py b/tools/oomkill.py
index 298e353..3d6e927 100755
--- a/tools/oomkill.py
+++ b/tools/oomkill.py
@@ -45,7 +45,7 @@
data.tpid = p->pid;
data.pages = oc->totalpages;
bpf_get_current_comm(&data.fcomm, sizeof(data.fcomm));
- bpf_probe_read(&data.tcomm, sizeof(data.tcomm), p->comm);
+ bpf_probe_read_kernel(&data.tcomm, sizeof(data.tcomm), p->comm);
events.perf_submit(ctx, &data, sizeof(data));
}
"""