19 lines · c
1// SPDX-License-Identifier: GPL-2.02#include "vmlinux.h"3#include <bpf/bpf_helpers.h>4#include <bpf/bpf_tracing.h>5 6char _license[] SEC("license") = "GPL";7 8unsigned long uprobe_trigger_body;9 10__u64 test1_result = 0;11SEC("uprobe//proc/self/exe:uprobe_trigger_body+1")12int BPF_UPROBE(test1)13{14 __u64 addr = bpf_get_func_ip(ctx);15 16 test1_result = (const void *) addr == (const void *) uprobe_trigger_body + 1;17 return 0;18}19