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/argdist.py b/tools/argdist.py
index 0bc1414..88da0d8 100755
--- a/tools/argdist.py
+++ b/tools/argdist.py
@@ -42,7 +42,7 @@
param_name = param[index + 1:].strip()
self.param_types[param_name] = param_type
# Maintain list of user params. Then later decide to
- # switch to bpf_probe_read or bpf_probe_read_user.
+ # switch to bpf_probe_read_kernel or bpf_probe_read_user.
if "__user" in param_type.split():
self.probe_user_list.add(param_name)
@@ -299,7 +299,7 @@
self.exprs[i] in self.probe_user_list:
probe_readfunc = "bpf_probe_read_user"
else:
- probe_readfunc = "bpf_probe_read"
+ probe_readfunc = "bpf_probe_read_kernel"
return (text + " %s(&__key.v%d.s," +
" sizeof(__key.v%d.s), (void *)%s);\n") % \
(probe_readfunc, i, i, self.exprs[i])