1// SPDX-License-Identifier: GPL-2.0
2/* Copyright (c) 2020 Facebook */
3
4#include <stdbool.h>
5#include <linux/bpf.h>
6#include <bpf/bpf_helpers.h>
7
8int in = 0;
9int out = 0;
10
11SEC("raw_tp/sys_enter")
12int raw_tp_prog(const void *ctx)
13{
14 out = in;
15 return 0;
16}
17
18SEC("tp_btf/sys_enter")
19int tp_btf_prog(const void *ctx)
20{
21 out = in;
22 return 0;
23}
24
25char _license[] SEC("license") = "GPL";
26

source code of linux/tools/testing/selftests/bpf/progs/test_link_pinning.c