0001
0002
0003
0004 #include <linux/bpf.h>
0005 #include <bpf/bpf_helpers.h>
0006
0007
0008 static volatile long static_var1 = 2;
0009 static volatile int static_var2 = 3;
0010 int var1 = -1;
0011
0012 const volatile int rovar1;
0013
0014
0015 static __noinline int subprog(int x)
0016 {
0017
0018 return x * 2;
0019 }
0020
0021 SEC("raw_tp/sys_enter")
0022 int handler1(const void *ctx)
0023 {
0024 var1 = subprog(rovar1) + static_var1 + static_var2;
0025
0026 return 0;
0027 }
0028
0029 char LICENSE[] SEC("license") = "GPL";
0030 int VERSION SEC("version") = 1;