1 // SPDX-License-Identifier: GPL-2.0-only 2 #include <stddef.h> 3 #include <linux/bpf.h> 4 #include <bpf/bpf_helpers.h> 5 #include "bpf_misc.h" 6 7 __noinline int foo(int (*arr)[10]) 8 { 9 if (arr) 10 return (*arr)[9]; 11 12 return 0; 13 } 14 15 SEC("cgroup_skb/ingress") 16 __success 17 int global_func16(struct __sk_buff *skb) 18 { 19 int array[10]; 20 21 const int rv = foo(&array); 22 23 return rv ? 1 : 0; 24 } 25
Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.