1 // SPDX-License-Identifier: GPL-2.0-only
4 #include <bpf/bpf_helpers.h>
7 #if !defined(__clang__)
8 #pragma GCC diagnostic ignored "-Wmaybe-uninitialized"
20 __noinline int foo(const struct Big *big)
25 return bpf_get_prandom_u32() < big->y;
28 SEC("cgroup_skb/ingress")
29 __failure __msg("invalid read from stack")
30 int global_func10(struct __sk_buff *skb)
32 const struct Small small = {.x = skb->len };
34 return foo((struct Big *)&small) ? 1 : 0;