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 master 19 lines 350 B view raw
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}