summaryrefslogtreecommitdiff
path: root/tools/arch/mn10300
diff options
context:
space:
mode:
authorSargun Dhillon <sargun@sargun.me>2016-08-12 08:57:04 -0700
committerDavid S. Miller <davem@davemloft.net>2016-08-12 21:49:42 -0700
commit9e6e60ecbd7323d4ac3f98dcdc1bd2c527a736ef (patch)
tree249b8cc8c37b46570ca05305aaa0c5ab79c28cee /tools/arch/mn10300
parent60d20f9195b260bdf0ac10c275ae9f6016f9c069 (diff)
samples/bpf: Add test_current_task_under_cgroup test
This test has a BPF program which writes the last known pid to call the sync syscall within a given cgroup to a map. The user mode program creates its own mount namespace, and mounts the cgroupsv2 hierarchy in there, as on all current test systems (Ubuntu 16.04, Debian), the cgroupsv2 vfs is unmounted by default. Once it does this, it proceeds to test. The test checks for positive and negative condition. It ensures that when it's part of a given cgroup, its pid is captured in the map, and that when it leaves the cgroup, this doesn't happen. It populate a cgroups arraymap prior to execution in userspace. This means that the program must be run in the same cgroups namespace as the programs that are being traced. 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: Alexei Starovoitov <ast@kernel.org> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'tools/arch/mn10300')
0 files changed, 0 insertions, 0 deletions