Back to home page

OSCL-LXR

 
 

    


0001 // SPDX-License-Identifier: GPL-2.0
0002 /* Copyright (c) 2020 Facebook */
0003 
0004 #include <stdbool.h>
0005 #include <linux/bpf.h>
0006 #include <bpf/bpf_helpers.h>
0007 
0008 int in = 0;
0009 int out = 0;
0010 
0011 SEC("raw_tp/sys_enter")
0012 int raw_tp_prog(const void *ctx)
0013 {
0014     out = in;
0015     return 0;
0016 }
0017 
0018 SEC("tp_btf/sys_enter")
0019 int tp_btf_prog(const void *ctx)
0020 {
0021     out = in;
0022     return 0;
0023 }
0024 
0025 char _license[] SEC("license") = "GPL";