Commit 56fee144 authored by Liu Jian's avatar Liu Jian
Browse files

cgroup: make cgroup_bpf_prog_attach work when cgroup2 is not mounted

hulk inclusion
category: feature
bugzilla: https://gitee.com/openeuler/kernel/issues/I7DNAP


CVE: N/A

----------------------------------------------------

BPF_PROG_TYPE_CGROUP* bpf programs is associated with cgroup2. If cgroup2
is not mounted, the bpf program is associated with cgrp_dfl_root.cgrp
by default.

Then we can use it like below:
bpftool cgroup attach /sys/fs/cgroup/cpu sock_ops pinned /sys/fs/bpf/xxx

Signed-off-by: default avatarLiu Jian <liujian56@huawei.com>
parent 590ef703
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment