Re: [PATCH bpf-next V9 1/3] bpf: new helper to obtain namespace data from current task

2019-09-03 Thread Yonghong Song
On 9/3/19 11:45 AM, Carlos Antonio Neira Bustos wrote: > Hi Yonghong, > >>> Yes, the samples/bpf test case can be removed. >>> Could you create a selftest with tracpoint net/netif_receive_skb, which >>> also uses the proposed helper? net/netif_receive_skb will happen in >>> interrupt context and

Re: [PATCH bpf-next V9 1/3] bpf: new helper to obtain namespace data from current task

2019-09-03 Thread Carlos Antonio Neira Bustos
Hi Yonghong, > > Yes, the samples/bpf test case can be removed. > > Could you create a selftest with tracpoint net/netif_receive_skb, which > > also uses the proposed helper? net/netif_receive_skb will happen in > > interrupt context and it should catch the issue as well if > > filename_lookup s

Re: [PATCH bpf-next V9 1/3] bpf: new helper to obtain namespace data from current task

2019-08-28 Thread Carlos Antonio Neira Bustos
Thanks, I'll work on the net/netif_receive_skb selftest using this helper. I hope I could complete this work this week. Bests. On Wed, Aug 28, 2019 at 08:53:25PM +, Yonghong Song wrote: > > > On 8/28/19 1:39 PM, Carlos Antonio Neira Bustos wrote: > > Yonghong, > > > > Thanks for the pointe

Re: [PATCH bpf-next V9 1/3] bpf: new helper to obtain namespace data from current task

2019-08-28 Thread Yonghong Song
On 8/28/19 1:39 PM, Carlos Antonio Neira Bustos wrote: > Yonghong, > > Thanks for the pointer, I fixed this bug, but I found another one that's > triggered > now the test program I included in tools/testing/selftests/bpf/test_pidns. > It's seemed that fname was not correctly setup when passing

Re: [PATCH bpf-next V9 1/3] bpf: new helper to obtain namespace data from current task

2019-08-28 Thread Carlos Antonio Neira Bustos
Yonghong, Thanks for the pointer, I fixed this bug, but I found another one that's triggered now the test program I included in tools/testing/selftests/bpf/test_pidns. It's seemed that fname was not correctly setup when passing it to filename_lookup. This is fixed now and I'm doing some more t

Re: [PATCH bpf-next V9 1/3] bpf: new helper to obtain namespace data from current task

2019-08-20 Thread Yonghong Song
On 8/20/19 8:10 AM, Carlos Antonio Neira Bustos wrote: > Hi Yonghong, > > Thanks for taking the time to review this. > > >>> + * >>> + * **-EINVAL** if *size_of_pidns* is not valid or unable to get >>> ns, pid >>> + * or tgid of the current task. >>> + * >>> + * **-ECH

Re: [PATCH bpf-next V9 1/3] bpf: new helper to obtain namespace data from current task

2019-08-20 Thread Carlos Antonio Neira Bustos
Hi Yonghong, Thanks for taking the time to review this. > > + * > > + * **-EINVAL** if *size_of_pidns* is not valid or unable to get > > ns, pid > > + * or tgid of the current task. > > + * > > + * **-ECHILD** if /proc/self/ns/pid does not exists. > > + * > > + *

Re: [PATCH bpf-next V9 1/3] bpf: new helper to obtain namespace data from current task

2019-08-13 Thread Carlos Antonio Neira Bustos
On Tue, Aug 13, 2019 at 11:11:14PM +, Yonghong Song wrote: > > > On 8/13/19 11:47 AM, Carlos Neira wrote: > > From: Carlos > > > > New bpf helper bpf_get_current_pidns_info. > > This helper obtains the active namespace from current and returns > > pid, tgid, device and namespace id as seen

Re: [Potential Spoof] Re: [PATCH bpf-next V9 1/3] bpf: new helper to obtain namespace data from current task

2019-08-13 Thread Yonghong Song
On 8/13/19 4:11 PM, Yonghong Song wrote: > > > On 8/13/19 11:47 AM, Carlos Neira wrote: >> From: Carlos >> >> New bpf helper bpf_get_current_pidns_info. >> This helper obtains the active namespace from current and returns >> pid, tgid, device and namespace id as seen from that namespace, >> al

Re: [PATCH bpf-next V9 1/3] bpf: new helper to obtain namespace data from current task

2019-08-13 Thread Yonghong Song
On 8/13/19 11:47 AM, Carlos Neira wrote: > From: Carlos > > New bpf helper bpf_get_current_pidns_info. > This helper obtains the active namespace from current and returns > pid, tgid, device and namespace id as seen from that namespace, > allowing to instrument a process inside a container. >

Re: [PATCH bpf-next V9 1/3] bpf: new helper to obtain namespace data from current task

2019-08-13 Thread Yonghong Song
On 8/13/19 11:47 AM, Carlos Neira wrote: > From: Carlos > > New bpf helper bpf_get_current_pidns_info. > This helper obtains the active namespace from current and returns > pid, tgid, device and namespace id as seen from that namespace, > allowing to instrument a process inside a container. >

[PATCH bpf-next V9 1/3] bpf: new helper to obtain namespace data from current task

2019-08-13 Thread Carlos Neira
From: Carlos New bpf helper bpf_get_current_pidns_info. This helper obtains the active namespace from current and returns pid, tgid, device and namespace id as seen from that namespace, allowing to instrument a process inside a container. Signed-off-by: Carlos Neira --- fs/internal.h