1 // SPDX-License-Identifier: GPL-2.0 2 /* Copyright (c) 2023 Red Hat, Inc. */ 3 #include <linux/bpf.h> 4 #include <bpf/bpf_helpers.h> 5 #include <bpf/bpf_tracing.h> 6 7 char _license[] SEC("license") = "GPL"; 8 9 /* Dummy fentry bpf prog for testing fentry attachment chains. It's going to be 10 * a start of the chain. 11 */ 12 SEC("fentry/bpf_testmod_fentry_test1") BPF_PROG(test1,int a)13int BPF_PROG(test1, int a) 14 { 15 return 0; 16 } 17 18 /* Dummy bpf prog for testing attach_btf presence when attaching an fentry 19 * program. 20 */ 21 SEC("raw_tp/sys_enter") BPF_PROG(fentry_target,struct pt_regs * regs,long id)22int BPF_PROG(fentry_target, struct pt_regs *regs, long id) 23 { 24 return 0; 25 } 26