alistair23-linux/kernel/bpf
Sargun Dhillon 60d20f9195 bpf: Add bpf_current_task_under_cgroup helper
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 return an error. The helper is primarily to be used in debugging
activities for containers, where you may have multiple programs running in
a given top-level "container".

Signed-off-by: Sargun Dhillon <sargun@sargun.me>
Cc: Alexei Starovoitov <ast@kernel.org>
Cc: Daniel Borkmann <daniel@iogearbox.net>
Cc: Tejun Heo <tj@kernel.org>
Acked-by: Tejun Heo <tj@kernel.org>
Acked-by: Alexei Starovoitov <ast@kernel.org>
Acked-by: Daniel Borkmann <daniel@iogearbox.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
2016-08-12 21:49:41 -07:00
..
arraymap.c bpf: Add bpf_current_task_under_cgroup helper 2016-08-12 21:49:41 -07:00
core.c bpf: avoid stack copy and use skb ctx for event output 2016-07-15 14:23:56 -07:00
hashtab.c bpf: restore behavior of bpf_map_update_elem 2016-08-06 20:49:19 -04:00
helpers.c bpf: don't use raw processor id in generic helper 2016-06-30 05:54:40 -04:00
inode.c bpf: make inode code explicitly non-modular 2016-07-11 13:52:43 -07:00
Makefile bpf: introduce percpu_freelist 2016-03-08 15:28:31 -05:00
percpu_freelist.c bpf: introduce percpu_freelist 2016-03-08 15:28:31 -05:00
percpu_freelist.h bpf: introduce percpu_freelist 2016-03-08 15:28:31 -05:00
stackmap.c Merge branch 'linus' into perf/core, to refresh the branch 2016-06-08 09:26:46 +02:00
syscall.c bpf: add bpf_prog_add api for bulk prog refcnt 2016-07-19 21:46:31 -07:00
verifier.c bpf: Add bpf_current_task_under_cgroup helper 2016-08-12 21:49:41 -07:00