1 // SPDX-License-Identifier: GPL-2.0 2 // Copyright (c) 2020 Facebook 3 4 #include "vmlinux.h" 5 #include <bpf/bpf_helpers.h> 6 #include <bpf/bpf_tracing.h> 7 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: 12 * 13 * arg0 replace_btf_unreliable_kprobe(struct pt_regs *) doesn't match btf_unreliable_kprobe(struct whatever *) 14 */ 15 int replace_btf_unreliable_kprobe(bpf_user_pt_regs_t *ctx) 16 { 17 return 0; 18 } 19 20 char _license[] SEC("license") = "GPL"; 21
Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.