Adding fill_link_info test for uprobe_multi link. Setting up uprobes with bogus ref_ctr_offsets and cookie values to test all the bpf_link_info::uprobe_multi fields. Signed-off-by: Jiri Olsa <jolsa@kernel.org> Signed-off-by: Andrii Nakryiko <andrii@kernel.org> Acked-by: Song Liu <song@kernel.org> Acked-by: Yonghong Song <yonghong.song@linux.dev> Link: https://lore.kernel.org/bpf/20231125193130.834322-6-jolsa@kernel.org
48 lines
702 B
C
48 lines
702 B
C
// SPDX-License-Identifier: GPL-2.0
|
|
/* Copyright (C) 2023 Yafang Shao <laoar.shao@gmail.com> */
|
|
|
|
#include "vmlinux.h"
|
|
#include <bpf/bpf_tracing.h>
|
|
#include <stdbool.h>
|
|
|
|
extern bool CONFIG_X86_KERNEL_IBT __kconfig __weak;
|
|
|
|
/* This function is here to have CONFIG_X86_KERNEL_IBT
|
|
* used and added to object BTF.
|
|
*/
|
|
int unused(void)
|
|
{
|
|
return CONFIG_X86_KERNEL_IBT ? 0 : 1;
|
|
}
|
|
|
|
SEC("kprobe")
|
|
int BPF_PROG(kprobe_run)
|
|
{
|
|
return 0;
|
|
}
|
|
|
|
SEC("uprobe")
|
|
int BPF_PROG(uprobe_run)
|
|
{
|
|
return 0;
|
|
}
|
|
|
|
SEC("tracepoint")
|
|
int BPF_PROG(tp_run)
|
|
{
|
|
return 0;
|
|
}
|
|
|
|
SEC("kprobe.multi")
|
|
int BPF_PROG(kmulti_run)
|
|
{
|
|
return 0;
|
|
}
|
|
|
|
SEC("uprobe.multi")
|
|
int BPF_PROG(umulti_run)
|
|
{
|
|
return 0;
|
|
}
|
|
|
|
char _license[] SEC("license") = "GPL";
|