1 // SPDX-License-Identifier: GPL-2.0
2 /* Copyright (c) 2020 Facebook */
5 #include <bpf/bpf_helpers.h>
6 #include <bpf/bpf_tracing.h>
7 #include <bpf/bpf_core_read.h>
9 bool prog1_called = false;
10 bool prog2_called = false;
11 bool prog3_called = false;
13 SEC("raw_tp/sys_enter")
14 int prog1(const void *ctx)
20 SEC("raw_tp/sys_exit")
21 int prog2(const void *ctx)
27 struct fake_kernel_struct {
29 } __attribute__((preserve_access_index));
31 SEC("fentry/unexisting-kprobe-will-fail-if-loaded")
32 int prog3(const void *ctx)
34 struct fake_kernel_struct *fake = (void *)ctx;
40 char _license[] SEC("license") = "GPL";