Re: [PATCH v9 bpf-next 13/14] selftests/bpf: Add test for d_path helper

2020-08-05 Thread Jiri Olsa
On Tue, Aug 04, 2020 at 11:40:05PM -0700, Andrii Nakryiko wrote: SNIP > > +SEC("fentry/vfs_getattr") > > +int BPF_PROG(prog_stat, struct path *path, struct kstat *stat, > > +__u32 request_mask, unsigned int query_flags) > > +{ > > + pid_t pid = bpf_get_current_pid_tgid() >> 32;

Re: [PATCH v9 bpf-next 13/14] selftests/bpf: Add test for d_path helper

2020-08-04 Thread Andrii Nakryiko
On Sat, Aug 1, 2020 at 10:05 AM Jiri Olsa wrote: > > Adding test for d_path helper which is pretty much > copied from Wenbo Zhang's test for bpf_get_fd_path, > which never made it in. > > The test is doing fstat/close on several fd types, > and verifies we got the d_path helper working on > kernel

[PATCH v9 bpf-next 13/14] selftests/bpf: Add test for d_path helper

2020-08-01 Thread Jiri Olsa
Adding test for d_path helper which is pretty much copied from Wenbo Zhang's test for bpf_get_fd_path, which never made it in. The test is doing fstat/close on several fd types, and verifies we got the d_path helper working on kernel probes for vfs_getattr/filp_close functions. Original-patch-by: