13 Aug, 2016

1 commit

  • 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
    Cc: Alexei Starovoitov
    Cc: Daniel Borkmann
    Cc: Tejun Heo
    Acked-by: Alexei Starovoitov
    Signed-off-by: David S. Miller

    Sargun Dhillon