[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20220623225835.sxgxwpxi2xatlhvp@kafai-mbp>
Date: Thu, 23 Jun 2022 15:58:35 -0700
From: Martin KaFai Lau <kafai@...com>
To: Stanislav Fomichev <sdf@...gle.com>
Cc: netdev@...r.kernel.org, bpf@...r.kernel.org, ast@...nel.org,
daniel@...earbox.net, andrii@...nel.org,
Quentin Monnet <quentin@...valent.com>
Subject: Re: [PATCH bpf-next v10 10/11] bpftool: implement cgroup tree for
BPF_LSM_CGROUP
On Wed, Jun 22, 2022 at 09:03:45AM -0700, Stanislav Fomichev wrote:
> $ bpftool --nomount prog loadall $KDIR/tools/testing/selftests/bpf/lsm_cgroup.o /sys/fs/bpf/x
> $ bpftool cgroup attach /sys/fs/cgroup lsm_cgroup pinned /sys/fs/bpf/x/socket_alloc
> $ bpftool cgroup attach /sys/fs/cgroup lsm_cgroup pinned /sys/fs/bpf/x/socket_bind
> $ bpftool cgroup attach /sys/fs/cgroup lsm_cgroup pinned /sys/fs/bpf/x/socket_clone
> $ bpftool cgroup attach /sys/fs/cgroup lsm_cgroup pinned /sys/fs/bpf/x/socket_post_create
> $ bpftool cgroup tree
> CgroupPath
> ID AttachType AttachFlags Name
> /sys/fs/cgroup
> 6 lsm_cgroup socket_post_create bpf_lsm_socket_post_create
> 8 lsm_cgroup socket_bind bpf_lsm_socket_bind
> 10 lsm_cgroup socket_alloc bpf_lsm_sk_alloc_security
> 11 lsm_cgroup socket_clone bpf_lsm_inet_csk_clone
>
> $ bpftool cgroup detach /sys/fs/cgroup lsm_cgroup pinned /sys/fs/bpf/x/socket_post_create
> $ bpftool cgroup tree
> CgroupPath
> ID AttachType AttachFlags Name
> /sys/fs/cgroup
> 8 lsm_cgroup socket_bind bpf_lsm_socket_bind
> 10 lsm_cgroup socket_alloc bpf_lsm_sk_alloc_security
> 11 lsm_cgroup socket_clone bpf_lsm_inet_csk_clone
Acked-by: Martin KaFai Lau <kafai@...com>
Powered by blists - more mailing lists