On Fri, Aug 07, 2020 at 02:31:52AM +0200, KP Singh wrote:
> On Sat, Aug 1, 2020 at 7:04 PM Jiri Olsa <jo...@kernel.org> wrote:
> >
> > Adding d_path helper function that returns full path for
> 
> [...]
> 
> > +}
> > +
> > +BTF_SET_START(btf_allowlist_d_path)
> > +BTF_ID(func, vfs_truncate)
> > +BTF_ID(func, vfs_fallocate)
> > +BTF_ID(func, dentry_open)
> > +BTF_ID(func, vfs_getattr)
> > +BTF_ID(func, filp_close)
> > +BTF_SET_END(btf_allowlist_d_path)
> > +
> 
> > +static bool bpf_d_path_allowed(const struct bpf_prog *prog)
> > +{
> > +       return btf_id_set_contains(&btf_allowlist_d_path, 
> > prog->aux->attach_btf_id);
> > +}
> 
> Can we allow it for LSM programs too?

yes, that's why I used struct bpf_prog as argument, so we could reach the
program type.. but I was hoping we could do that in follow up patchset,
because I assume there might be still some discussion about that?

I plan to post new version today

jirka

> 
> - KP
> 
> > +
> > +BTF_ID_LIST(bpf_d_path_btf_ids)
> > +BTF_ID(struct, path)
> > +
> 
> [...]
> 
> >
> >  /* integer value in 'imm' field of BPF_CALL instruction selects which 
> > helper
> > --
> > 2.25.4
> >
> 

Reply via email to