diff options
author | 2024-10-24 09:35:58 +0800 | |
---|---|---|
committer | 2024-10-24 10:17:12 -0700 | |
commit | 8421d4c8762bd022cb491f2f0f7019ef51b4f0a7 (patch) | |
tree | efb828d257aea579f783c2792164a55c3ce9f8b9 /tools/perf/scripts/python/export-to-postgresql.py | |
parent | bpf: Add the missing BPF_LINK_TYPE invocation for sockmap (diff) | |
download | wireguard-linux-8421d4c8762bd022cb491f2f0f7019ef51b4f0a7.tar.xz wireguard-linux-8421d4c8762bd022cb491f2f0f7019ef51b4f0a7.zip |
bpf: Check validity of link->type in bpf_link_show_fdinfo()
If a newly-added link type doesn't invoke BPF_LINK_TYPE(), accessing
bpf_link_type_strs[link->type] may result in an out-of-bounds access.
To spot such missed invocations early in the future, checking the
validity of link->type in bpf_link_show_fdinfo() and emitting a warning
when such invocations are missed.
Signed-off-by: Hou Tao <houtao1@huawei.com>
Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
Link: https://lore.kernel.org/bpf/20241024013558.1135167-3-houtao@huaweicloud.com
Diffstat (limited to 'tools/perf/scripts/python/export-to-postgresql.py')
0 files changed, 0 insertions, 0 deletions