1 // SPDX-License-Identifier: GPL-2.0
2 // Copyright (c) 2020 Facebook
5 #include <bpf/bpf_helpers.h>
6 #include <bpf/bpf_tracing.h>
8 SEC("freplace/btf_unreliable_kprobe")
9 /* context type is what BPF verifier expects for kprobe context, but target
10 * program has `stuct whatever *ctx` argument, so freplace operation will be
11 * rejected with the following message:
13 * arg0 replace_btf_unreliable_kprobe(struct pt_regs *) doesn't match btf_unreliable_kprobe(struct whatever *)
15 int replace_btf_unreliable_kprobe(bpf_user_pt_regs_t *ctx)
20 char _license[] SEC("license") = "GPL";