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

2016-08-11 Thread Tejun Heo
Hello, Sargun. On Thu, Aug 11, 2016 at 11:51:42AM -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

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

2016-08-11 Thread Daniel Borkmann
Hi Sargun, just some minor comment inline. On 08/11/2016 08:51 PM, Sargun Dhillon wrote: [...] diff --git a/include/linux/bpf.h b/include/linux/bpf.h index 1113423..6c01ab1 100644 --- a/include/linux/bpf.h +++ b/include/linux/bpf.h @@ -319,4 +319,26 @@ extern const struct bpf_func_proto bpf_get

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

2016-08-11 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