Lines Matching +full:linux +full:- +full:no +full:- +full:asm
1 /* SPDX-License-Identifier: (LGPL-2.1 OR BSD-2-Clause) */
7 * vmlinux.h (auto-generated from BTF) or linux/types.h
38 _Pragma("GCC diagnostic ignored \"-Wignored-attributes\"") \
44 /* Avoid 'linux/stddef.h' definition of '__always_inline'. */
56 * Use __hidden attribute to mark a non-static BPF subprogram effectively
63 /* When utilizing vmlinux.h with BPF CO-RE, user BPF programs can't include
64 * any system-level headers (such as stddef.h, linux/version.h, etc), and
65 * commonly-used macros like NULL and KERNEL_VERSION aren't available through
66 * vmlinux.h. This just adds unnecessary hurdles and forces users to re-define
82 * offset CO-RE relocation properly, so force-redefine offsetof() using
83 * old-school approach which works with CO-RE correctly
86 #define offsetof(type, member) ((unsigned long)&((type *)0)->member)
93 ((type *)(__mptr - offsetof(type, member))); \
100 #define barrier() asm volatile("" ::: "memory")
103 /* Variable-specific compiler (optimization) barrier. It's a no-op which makes
108 * E.g., compiler might often delay or even omit 32-bit to 64-bit casting of
112 * asm section might perform some extra operations on that variable.
114 * This is a variable-specific variant of more global barrier().
117 #define barrier_var(var) asm volatile("" : "+r"(var))
150 * jmpq/nopl retpoline-free patching by the x86-64 JIT in the kernel in bpf_tail_call_static()
154 * Note on clobber list: we need to stay in-line with BPF calling in bpf_tail_call_static()
159 asm volatile("r1 = %[ctx]\n\t" in bpf_tail_call_static()
222 * BPF_SEQ_PRINTF to wrap bpf_seq_printf to-be-printed values
231 _Pragma("GCC diagnostic ignored \"-Wint-conversion\"") \
249 _Pragma("GCC diagnostic ignored \"-Wint-conversion\"") \
280 _Pragma("GCC diagnostic ignored \"-Wint-conversion\"") \
308 * using BPF open-coded iterators without having to write mundane explicit
309 * low-level loop logic. Instead, it provides for()-like generic construct
316 * bpf_printk("Child cgroup id = %d", cg->cgroup_id);
317 * if (cg->cgroup_id == 123)
321 * I.e., it looks almost like high-level for each loop in other languages,
350 /* bpf_for(i, start, end) implements a for()-like looping construct that sets
356 * Note: *start* and *end* are assumed to be expressions with no side effects