diff options
| author | Andrey Ignatov <[email protected]> | 2020-01-08 01:40:06 +0000 |
|---|---|---|
| committer | Alexei Starovoitov <[email protected]> | 2020-01-09 17:40:06 +0000 |
| commit | f5bfcd953d811dbb8913de36b96b38da6bb62135 (patch) | |
| tree | ad65489a49e1c9a2b54411bff64256c5d6a30159 /tools/lib/bpf/netlink.c | |
| parent | Merge branch 'tcp-bpf-cc' (diff) | |
| download | kernel-f5bfcd953d811dbb8913de36b96b38da6bb62135.tar.gz kernel-f5bfcd953d811dbb8913de36b96b38da6bb62135.zip | |
bpf: Document BPF_F_QUERY_EFFECTIVE flag
Document BPF_F_QUERY_EFFECTIVE flag, mostly to clarify how it affects
attach_flags what may not be obvious and what may lead to confision.
Specifically attach_flags is returned only for target_fd but if programs
are inherited from an ancestor cgroup then returned attach_flags for
current cgroup may be confusing. For example, two effective programs of
same attach_type can be returned but w/o BPF_F_ALLOW_MULTI in
attach_flags.
Simple repro:
# bpftool c s /sys/fs/cgroup/path/to/task
ID AttachType AttachFlags Name
# bpftool c s /sys/fs/cgroup/path/to/task effective
ID AttachType AttachFlags Name
95043 ingress tw_ipt_ingress
95048 ingress tw_ingress
Signed-off-by: Andrey Ignatov <[email protected]>
Signed-off-by: Alexei Starovoitov <[email protected]>
Acked-by: Song Liu <[email protected]>
Link: https://lore.kernel.org/bpf/[email protected]
Diffstat (limited to 'tools/lib/bpf/netlink.c')
0 files changed, 0 insertions, 0 deletions
