]> Git Repo - J-linux.git/blob - tools/testing/selftests/bpf/progs/freplace_unreliable_prog.c
Merge tag 'vfs-6.13-rc7.fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/vfs/vfs
[J-linux.git] / tools / testing / selftests / bpf / progs / freplace_unreliable_prog.c
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";
This page took 0.029099 seconds and 4 git commands to generate.