Re: [PATCH bpf-next] selftests/bpf: Fix stat probe in d_path test

2020-09-18 Thread Jiri Olsa
On Thu, Sep 17, 2020 at 02:14:38PM -0700, Alexei Starovoitov wrote: > On Thu, Sep 17, 2020 at 1:25 AM Jiri Olsa wrote: > > > > > Ideally resolve_btfids would parse dwarf info and check > > > whether any of the funcs in allowlist were inlined. > > > That would be more reliable, but not pretty to dr

Re: [PATCH bpf-next] selftests/bpf: Fix stat probe in d_path test

2020-09-17 Thread Alexei Starovoitov
On Thu, Sep 17, 2020 at 1:25 AM Jiri Olsa wrote: > > > Ideally resolve_btfids would parse dwarf info and check > > whether any of the funcs in allowlist were inlined. > > That would be more reliable, but not pretty to drag libdw > > dependency into resolve_btfids. > > hm, we could add some check t

Re: [PATCH bpf-next] selftests/bpf: Fix stat probe in d_path test

2020-09-17 Thread Jiri Olsa
On Wed, Sep 16, 2020 at 06:45:31PM -0700, Alexei Starovoitov wrote: > On Wed, Sep 16, 2020 at 01:24:16PM +0200, Jiri Olsa wrote: > > Some kernels builds might inline vfs_getattr call within fstat > > syscall code path, so fentry/vfs_getattr trampoline is not called. > > > > Alexei suggested [1] we

Re: [PATCH bpf-next] selftests/bpf: Fix stat probe in d_path test

2020-09-16 Thread Alexei Starovoitov
On Wed, Sep 16, 2020 at 01:24:16PM +0200, Jiri Olsa wrote: > Some kernels builds might inline vfs_getattr call within fstat > syscall code path, so fentry/vfs_getattr trampoline is not called. > > Alexei suggested [1] we should use security_inode_getattr instead, > because it's less likely to get

[PATCH bpf-next] selftests/bpf: Fix stat probe in d_path test

2020-09-16 Thread Jiri Olsa
Some kernels builds might inline vfs_getattr call within fstat syscall code path, so fentry/vfs_getattr trampoline is not called. Alexei suggested [1] we should use security_inode_getattr instead, because it's less likely to get inlined. Adding security_inode_getattr to the d_path allowed list an

Re: [PATCH bpf-next] selftests/bpf: Fix stat probe in d_path test

2020-09-16 Thread KP Singh
On Wed, Sep 16, 2020 at 1:24 PM Jiri Olsa wrote: > > Some kernels builds might inline vfs_getattr call within fstat > syscall code path, so fentry/vfs_getattr trampoline is not called. > > Alexei suggested [1] we should use security_inode_getattr instead, > because it's less likely to get inlined.