Re: [net-next v2 v2 1/2] bpf: Add bpf_current_task_in_cgroup helper

2016-08-10 Thread Daniel Borkmann
On 08/10/2016 06:40 AM, Sargun Dhillon wrote: On Tue, Aug 09, 2016 at 08:52:01PM -0700, Alexei Starovoitov wrote: On Tue, Aug 09, 2016 at 08:40:05PM -0700, Sargun Dhillon wrote: On Tue, Aug 09, 2016 at 08:27:32PM -0700, Alexei Starovoitov wrote: On Tue, Aug 09, 2016 at 06:26:37PM -0700, Sargun

Re: [net-next v2 v2 1/2] bpf: Add bpf_current_task_in_cgroup helper

2016-08-09 Thread Sargun Dhillon
On Tue, Aug 09, 2016 at 08:52:01PM -0700, Alexei Starovoitov wrote: > On Tue, Aug 09, 2016 at 08:40:05PM -0700, Sargun Dhillon wrote: > > On Tue, Aug 09, 2016 at 08:27:32PM -0700, Alexei Starovoitov wrote: > > > On Tue, Aug 09, 2016 at 06:26:37PM -0700, Sargun Dhillon wrote: > > > > On Tue, Aug 09,

Re: [net-next v2 v2 1/2] bpf: Add bpf_current_task_in_cgroup helper

2016-08-09 Thread Alexei Starovoitov
On Tue, Aug 09, 2016 at 08:40:05PM -0700, Sargun Dhillon wrote: > On Tue, Aug 09, 2016 at 08:27:32PM -0700, Alexei Starovoitov wrote: > > On Tue, Aug 09, 2016 at 06:26:37PM -0700, Sargun Dhillon wrote: > > > On Tue, Aug 09, 2016 at 06:02:34PM -0700, Alexei Starovoitov wrote: > > > > On Tue, Aug 09,

Re: [net-next v2 v2 1/2] bpf: Add bpf_current_task_in_cgroup helper

2016-08-09 Thread Sargun Dhillon
On Tue, Aug 09, 2016 at 08:27:32PM -0700, Alexei Starovoitov wrote: > On Tue, Aug 09, 2016 at 06:26:37PM -0700, Sargun Dhillon wrote: > > On Tue, Aug 09, 2016 at 06:02:34PM -0700, Alexei Starovoitov wrote: > > > On Tue, Aug 09, 2016 at 05:55:26PM -0700, Sargun Dhillon wrote: > > > > On Tue, Aug 09,

Re: [net-next v2 v2 1/2] bpf: Add bpf_current_task_in_cgroup helper

2016-08-09 Thread Alexei Starovoitov
On Tue, Aug 09, 2016 at 06:26:37PM -0700, Sargun Dhillon wrote: > On Tue, Aug 09, 2016 at 06:02:34PM -0700, Alexei Starovoitov wrote: > > On Tue, Aug 09, 2016 at 05:55:26PM -0700, Sargun Dhillon wrote: > > > On Tue, Aug 09, 2016 at 05:23:50PM -0700, Alexei Starovoitov wrote: > > > > On Tue, Aug 09,

Re: [net-next v2 v2 1/2] bpf: Add bpf_current_task_in_cgroup helper

2016-08-09 Thread Sargun Dhillon
On Tue, Aug 09, 2016 at 06:02:34PM -0700, Alexei Starovoitov wrote: > On Tue, Aug 09, 2016 at 05:55:26PM -0700, Sargun Dhillon wrote: > > On Tue, Aug 09, 2016 at 05:23:50PM -0700, Alexei Starovoitov wrote: > > > On Tue, Aug 09, 2016 at 05:00:12PM -0700, Sargun Dhillon wrote: > > > > This adds a bpf

Re: [net-next v2 v2 1/2] bpf: Add bpf_current_task_in_cgroup helper

2016-08-09 Thread Alexei Starovoitov
On Tue, Aug 09, 2016 at 05:55:26PM -0700, Sargun Dhillon wrote: > On Tue, Aug 09, 2016 at 05:23:50PM -0700, Alexei Starovoitov wrote: > > On Tue, Aug 09, 2016 at 05:00:12PM -0700, Sargun Dhillon wrote: > > > This adds a bpf helper that's similar to the skb_in_cgroup helper to check > > > whether th

Re: [net-next v2 v2 1/2] bpf: Add bpf_current_task_in_cgroup helper

2016-08-09 Thread Sargun Dhillon
On Tue, Aug 09, 2016 at 05:23:50PM -0700, Alexei Starovoitov wrote: > On Tue, Aug 09, 2016 at 05:00:12PM -0700, Sargun Dhillon wrote: > > This adds a bpf helper that's similar to the skb_in_cgroup helper to check > > whether the probe is currently executing in the context of a specific > > subset o

Re: [net-next v2 v2 1/2] bpf: Add bpf_current_task_in_cgroup helper

2016-08-09 Thread Alexei Starovoitov
On Tue, Aug 09, 2016 at 05:00:12PM -0700, Sargun Dhillon wrote: > This adds a bpf helper that's similar to the skb_in_cgroup helper to check > whether the probe is currently executing in the context of a specific > subset of the cgroupsv2 hierarchy. It does this based on membership test > for a cgr

[net-next v2 v2 1/2] bpf: Add bpf_current_task_in_cgroup helper

2016-08-09 Thread Sargun Dhillon
This adds a bpf helper that's similar to the skb_in_cgroup helper to check whether the probe is currently executing in the context of a specific subset of the cgroupsv2 hierarchy. It does this based on membership test for a cgroup arraymap. It is invalid to call this in an interrupt, and it'll retu