Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

at v6.5-rc7 21 lines 409 B view raw
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 7struct S { 8 int x; 9}; 10 11__noinline int foo(const struct S *s) 12{ 13 return s ? bpf_get_prandom_u32() < s->x : 0; 14} 15 16SEC("cgroup_skb/ingress") 17__failure __msg("Caller passes invalid args into func#1") 18int global_func11(struct __sk_buff *skb) 19{ 20 return foo((const void *)skb); 21}