summaryrefslogtreecommitdiff
path: root/samples
diff options
context:
space:
mode:
authorSargun Dhillon <sargun@sargun.me>2016-08-12 08:56:52 -0700
committerMichael Bestas <mkbestas@lineageos.org>2022-04-19 00:50:28 +0300
commitc14dbe71e5b625a7f356274f1700a1cfada1c025 (patch)
tree7e4c5bd36c077c23a7dec9e29637c8ec8445a0fe /samples
parent7816b3995152bdc9910e2d9d973621bfad2411e7 (diff)
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> Signed-off-by: Chatur27 <jasonbright2709@gmail.com>
Diffstat (limited to 'samples')
0 files changed, 0 insertions, 0 deletions