All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH bpf-next] bpf: Expose bpf_d_path helper to vfs_read/vfs_write
@ 2021-07-12 16:24 Hengqi Chen
  2021-07-12 19:12 ` John Fastabend
  0 siblings, 1 reply; 6+ messages in thread
From: Hengqi Chen @ 2021-07-12 16:24 UTC (permalink / raw)
  To: bpf; +Cc: yhs, andriin, jolsa, hengqi.chen

Add vfs_read and vfs_write to bpf_d_path allowlist.
This will help tools like IOVisor's filetop to get
full file path.

Signed-off-by: Hengqi Chen <hengqi.chen@gmail.com>
---
 kernel/trace/bpf_trace.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/kernel/trace/bpf_trace.c b/kernel/trace/bpf_trace.c
index 64bd2d84367f..6d3f951f38c5 100644
--- a/kernel/trace/bpf_trace.c
+++ b/kernel/trace/bpf_trace.c
@@ -861,6 +861,8 @@ BTF_ID(func, vfs_fallocate)
 BTF_ID(func, dentry_open)
 BTF_ID(func, vfs_getattr)
 BTF_ID(func, filp_close)
+BTF_ID(func, vfs_read)
+BTF_ID(func, vfs_write)
 BTF_SET_END(btf_allowlist_d_path)
 
 static bool bpf_d_path_allowed(const struct bpf_prog *prog)
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2021-07-18 11:17 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-07-12 16:24 [PATCH bpf-next] bpf: Expose bpf_d_path helper to vfs_read/vfs_write Hengqi Chen
2021-07-12 19:12 ` John Fastabend
2021-07-15  0:18   ` Yonghong Song
2021-07-16  1:44     ` Alexei Starovoitov
2021-07-17 16:43       ` Yonghong Song
2021-07-18 11:17         ` Hengqi Chen

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.