SEC("kprobe") int handle_kprobe(struct pt_regs *ctx)
{
update(ctx, &kprobe_res); return0;
}
SEC("kretprobe") int handle_kretprobe(struct pt_regs *ctx)
{
update(ctx, &kretprobe_res); return0;
}
SEC("uprobe") int handle_uprobe(struct pt_regs *ctx)
{
update(ctx, &uprobe_res); return0;
}
SEC("uretprobe") int handle_uretprobe(struct pt_regs *ctx)
{
update(ctx, &uretprobe_res); return0;
}
/* bpf_prog_array, used by kernel internally to keep track of attached BPF * programs to a given BPF hook (e.g., for tracepoints) doesn't allow the same * BPF program to be attached multiple times. So have three identical copies * ready to attach to the same tracepoint.
*/
SEC("tp/syscalls/sys_enter_nanosleep") int handle_tp1(struct pt_regs *ctx)
{
update(ctx, &tp_res); return0;
}
SEC("tp/syscalls/sys_enter_nanosleep") int handle_tp2(struct pt_regs *ctx)
{
update(ctx, &tp_res); return0;
}
SEC("tp/syscalls/sys_enter_nanosleep") int handle_tp3(void *ctx)
{
update(ctx, &tp_res); return1;
}
SEC("perf_event") int handle_pe(struct pt_regs *ctx)
{
update(ctx, &pe_res); return0;
}
SEC("raw_tp/sys_enter") int handle_raw_tp(void *ctx)
{
update(ctx, &raw_tp_res); return0;
}
SEC("tp_btf/sys_enter") int handle_tp_btf(void *ctx)
{
update(ctx, &tp_btf_res); return0;
}
SEC("fentry/bpf_fentry_test1") int BPF_PROG(fentry_test1, int a)
{
update(ctx, &fentry_res); return0;
}
SEC("fexit/bpf_fentry_test1") int BPF_PROG(fexit_test1, int a, int ret)
{
update(ctx, &fexit_res); return0;
}
SEC("fmod_ret/bpf_modify_return_test") int BPF_PROG(fmod_ret_test, int _a, int *_b, int _ret)
{
update(ctx, &fmod_ret_res); return1234;
}
SEC("lsm/file_mprotect") int BPF_PROG(test_int_hook, struct vm_area_struct *vma, unsignedlong reqprot, unsignedlong prot, int ret)
{ if (my_tid != (u32)bpf_get_current_pid_tgid()) return ret;
update(ctx, &lsm_res); return -EPERM;
}
char _license[] SEC("license") = "GPL";
Messung V0.5 in Prozent
¤ Dauer der Verarbeitung: 0.8 Sekunden
(vorverarbeitet am 2026-06-08)
¤
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.