Re: [PATCHv5 RFC 1/3] BPF: New helper to obtain namespace data from current task.


Thanks Yonghong!.
Yes, I was looking at filename_lookup today on how to do it, I'll work on that.
Thank you very much.

El vie., 26 de jul. de 2019 01:18, Yonghong Song <ys114321@...> escribió:
On Thu, Jul 25, 2019 at 12:11 PM Alexei Starovoitov
<alexei.starovoitov@...> wrote:
> On Thu, Jul 25, 2019 at 11:53 AM neirac <cneirabustos@...> wrote:
> >
> > Hey Yonghong,
> > I have changed getname_kernel interface to specify the allocation type,
> > all previous callers preserve GFP_KERNEL as the allocation type, after this change
> > getname_kernel could be used with GFP_ATOMIC in ebpf helpers.
> > If this change goes in, I could complete bpf_get_current_pidns_info helper.
> > Let me know your thoughts.
> please figure out how to get pidns_info w/o calling into getname_kernel().

Looks like we can call filename_lookup() directly. We do not need to
call getname_kernel().
We know the exact path name. We can do a atomic allocation inside the helper.
Carlos, could you take a look along this line? In this way, we do not
need to change
any files under linux/fs.

Join to automatically receive all group messages.