bpf: Add missing BPF_LINK_TYPE invocations
Jiri Olsa
reviewerPATCH v2 1/1 bpf: Add missing BPF_LINK_TYPE invocations
Pengfei Xu reported [1] Syzkaller/KASAN issue found in bpf_link_show_fdinfo.
The reason is missing BPF_LINK_TYPE invocation for uprobe multi link and for several other links, adding that.
[1] https://lore.kernel.org/bpf/[email protected]/
---
v2 changes:
- move NETFILTER/TCX/NETKIT under CONFIG_NET
- added tags
include/linux/bpf_types.h | 4 ++++ 1 file changed, 4 insertions(+)
include/linux/bpf_types.h +4 -0
@@ -142,9 +142,13 @@ BPF_LINK_TYPE(BPF_LINK_TYPE_ITER, iter)#ifdef CONFIG_NET BPF_LINK_TYPE(BPF_LINK_TYPE_NETNS, netns) BPF_LINK_TYPE(BPF_LINK_TYPE_XDP, xdp) +BPF_LINK_TYPE(BPF_LINK_TYPE_NETFILTER, netfilter) +BPF_LINK_TYPE(BPF_LINK_TYPE_TCX, tcx) +BPF_LINK_TYPE(BPF_LINK_TYPE_NETKIT, netkit)#endif #ifdef CONFIG_PERF_EVENTS BPF_LINK_TYPE(BPF_LINK_TYPE_PERF_EVENT, perf)#endif BPF_LINK_TYPE(BPF_LINK_TYPE_KPROBE_MULTI, kprobe_multi) BPF_LINK_TYPE(BPF_LINK_TYPE_STRUCT_OPS, struct_ops) +BPF_LINK_TYPE (BPF_LINK_TYPE_UPROBE_MULTI , uprobe_multi)
Signature · 1 line
2.43.0
This patch was applied to bpf/bpf.git (master) by Andrii Nakryiko <[email protected]>:
Hello:
This patch was applied to bpf/bpf.git (master)
by Andrii Nakryiko <[email protected]>:
Quoted 8 lines · On Sat, 16 Dec 2023 00:05:02 +0100 you wrote:
Pengfei Xu reported [1] Syzkaller/KASAN issue found in
bpf_link_show_fdinfo.The reason is missing
BPF_LINK_TYPEinvocation for uprobe multi link and for several other links, adding that.[1] https://lore.kernel.org/bpf/[email protected]/
[...]
Here is the summary with links:
- [PATCHv2,bpf] bpf: Add missing BPF_LINK_TYPE invocations
https://git.kernel.org/bpf/bpf/c/117211aa739a
You are awesome, thank you!
Signature · 2 lines
Deet-doot-dot, I am a bot. https://korg.docs.kernel.org/patchwork/pwbot.html