linux-stable/include/uapi
Yonghong Song bf6fa2c893 bpf: implement bpf_get_current_cgroup_id() helper
bpf has been used extensively for tracing. For example, bcc
contains an almost full set of bpf-based tools to trace kernel
and user functions/events. Most tracing tools are currently
either filtered based on pid or system-wide.

Containers have been used quite extensively in industry and
cgroup is often used together to provide resource isolation
and protection. Several processes may run inside the same
container. It is often desirable to get container-level tracing
results as well, e.g. syscall count, function count, I/O
activity, etc.

This patch implements a new helper, bpf_get_current_cgroup_id(),
which will return cgroup id based on the cgroup within which
the current task is running.

The later patch will provide an example to show that
userspace can get the same cgroup id so it could
configure a filter or policy in the bpf program based on
task cgroup id.

The helper is currently implemented for tracing. It can
be added to other program types as well when needed.

Acked-by: Alexei Starovoitov <ast@kernel.org>
Signed-off-by: Yonghong Song <yhs@fb.com>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
2018-06-03 18:22:41 -07:00
..
asm-generic Merge branch 'parisc-4.17-2' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/parisc-linux 2018-04-12 17:07:04 -07:00
drm Linux 4.16-rc7 2018-03-28 14:30:41 +10:00
linux bpf: implement bpf_get_current_cgroup_id() helper 2018-06-03 18:22:41 -07:00
misc ocxl: Add get_metadata IOCTL to share OCXL information to userspace 2018-03-02 13:02:14 +11:00
mtd
rdma uapi: Fix SPDX tags for files referring to the 'OpenIB.org' license 2018-04-23 11:10:33 -04:00
scsi
sound ASoC: soc-generic-dmaengine-pcm: Fix sparse warnings 2018-02-26 11:05:12 +00:00
video
xen