FILE
test_global_func17.c
File preview with syntax highlighting.
linux-6.19.14/tools/testing/selftests/bpf/progs/test_global_func17.c
1// SPDX-License-Identifier: GPL-2.0-only 2#include <vmlinux.h> 3#include <bpf/bpf_helpers.h> 4#include "bpf_misc.h" 5 6__noinline int foo(int *p) 7{ 8 barrier_var(p); 9 return p ? (*p = 42) : 0; 10} 11 12const volatile int i; 13 14SEC("tc") 15__failure __msg("Caller passes invalid args into func#1") 16int global_func17(struct __sk_buff *skb) 17{ 18 return foo((int *)&i); 19}
~/
Read-only file preview.