]> Git Repo - J-linux.git/blob - tools/testing/selftests/bpf/progs/test_global_func17.c
Merge tag 'vfs-6.13-rc7.fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/vfs/vfs
[J-linux.git] / 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
12 const volatile int i;
13
14 SEC("tc")
15 __failure __msg("Caller passes invalid args into func#1")
16 int global_func17(struct __sk_buff *skb)
17 {
18         return foo((int *)&i);
19 }
This page took 0.028218 seconds and 4 git commands to generate.