File Index
Files and directories
Sign in
FILE

verifier_typedef.c

File preview with syntax highlighting.

linux-6.19.14/tools/testing/selftests/bpf/progs/verifier_typedef.c C
 1// SPDX-License-Identifier: GPL-2.0
 2
 3#include <vmlinux.h>
 4#include <bpf/bpf_helpers.h>
 5#include "bpf_misc.h"
 6
 7SEC("fentry/bpf_fentry_test_sinfo")
 8__description("typedef: resolve")
 9__success __retval(0)
10__naked void resolve_typedef(void)
11{
12	asm volatile ("					\
13	r1 = *(u64 *)(r1 +0);				\
14	r2 = *(u64 *)(r1 +%[frags_offs]);		\
15	r0 = 0;						\
16	exit;						\
17"	:
18	: __imm_const(frags_offs,
19		      offsetof(struct skb_shared_info, frags))
20	: __clobber_all);
21}
22
23char _license[] SEC("license") = "GPL";
~/ Read-only file preview.