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 8 int in = 0; 9 int out = 0; 10 11 SEC("raw_tp/sys_enter") 12 int raw_tp_prog(const void *ctx) 13 { 14 out = in; 15 return 0; 16 } 17 18 SEC("tp_btf/sys_enter") 19 int tp_btf_prog(const void *ctx) 20 { 21 out = in; 22 return 0; 23 } 24 25 char _license[] SEC("license") = "GPL"; 26
Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.