]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
Merge branch 'move-attach_type-into-bpf_link'
authorAndrii Nakryiko <andrii@kernel.org>
Fri, 11 Jul 2025 17:30:43 +0000 (10:30 -0700)
committerAndrii Nakryiko <andrii@kernel.org>
Fri, 11 Jul 2025 18:01:09 +0000 (11:01 -0700)
Tao Chen says:

====================
Move attach_type into bpf_link

Andrii suggested moving the attach_type into bpf_link, the previous discussion
is as follows:
https://lore.kernel.org/bpf/CAEf4BzY7TZRjxpCJM-+LYgEqe23YFj5Uv3isb7gat2-HU4OSng@mail.gmail.com

patch1 add attach_type in bpf_link, and pass it to bpf_link_init, which
will init the attach_type field.

patch2-7 remove the attach_type in struct bpf_xx_link, update the info
with bpf_link attach_type.

There are some functions finally call bpf_link_init but do not have bpf_attr
from user or do not need to init attach_type from user like bpf_raw_tracepoint_open,
now use prog->expected_attach_type to init attach_type.

bpf_struct_ops_map_update_elem
bpf_raw_tracepoint_open
bpf_struct_ops_test_run

Feedback of any kind is welcome, thanks.
====================

Link: https://patch.msgid.link/20250710032038.888700-1-chen.dylane@linux.dev
Signed-off-by: Andrii Nakryiko <andrii@kernel.org>

Trivial merge