~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

TOMOYO Linux Cross Reference
Linux/tools/testing/selftests/bpf/progs/bpf_iter.h

Version: ~ [ linux-6.11.5 ] ~ [ linux-6.10.14 ] ~ [ linux-6.9.12 ] ~ [ linux-6.8.12 ] ~ [ linux-6.7.12 ] ~ [ linux-6.6.58 ] ~ [ linux-6.5.13 ] ~ [ linux-6.4.16 ] ~ [ linux-6.3.13 ] ~ [ linux-6.2.16 ] ~ [ linux-6.1.114 ] ~ [ linux-6.0.19 ] ~ [ linux-5.19.17 ] ~ [ linux-5.18.19 ] ~ [ linux-5.17.15 ] ~ [ linux-5.16.20 ] ~ [ linux-5.15.169 ] ~ [ linux-5.14.21 ] ~ [ linux-5.13.19 ] ~ [ linux-5.12.19 ] ~ [ linux-5.11.22 ] ~ [ linux-5.10.228 ] ~ [ linux-5.9.16 ] ~ [ linux-5.8.18 ] ~ [ linux-5.7.19 ] ~ [ linux-5.6.19 ] ~ [ linux-5.5.19 ] ~ [ linux-5.4.284 ] ~ [ linux-5.3.18 ] ~ [ linux-5.2.21 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.322 ] ~ [ linux-4.18.20 ] ~ [ linux-4.17.19 ] ~ [ linux-4.16.18 ] ~ [ linux-4.15.18 ] ~ [ linux-4.14.336 ] ~ [ linux-4.13.16 ] ~ [ linux-4.12.14 ] ~ [ linux-4.11.12 ] ~ [ linux-4.10.17 ] ~ [ linux-4.9.337 ] ~ [ linux-4.4.302 ] ~ [ linux-3.10.108 ] ~ [ linux-2.6.32.71 ] ~ [ linux-2.6.0 ] ~ [ linux-2.4.37.11 ] ~ [ unix-v6-master ] ~ [ ccs-tools-1.8.9 ] ~ [ policy-sample ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

  1 /* SPDX-License-Identifier: GPL-2.0 */
  2 /* Copyright (c) 2020 Facebook */
  3 /* "undefine" structs in vmlinux.h, because we "override" them below */
  4 #define bpf_iter_meta bpf_iter_meta___not_used
  5 #define bpf_iter__bpf_map bpf_iter__bpf_map___not_used
  6 #define bpf_iter__ipv6_route bpf_iter__ipv6_route___not_used
  7 #define bpf_iter__netlink bpf_iter__netlink___not_used
  8 #define bpf_iter__task bpf_iter__task___not_used
  9 #define bpf_iter__task_file bpf_iter__task_file___not_used
 10 #define bpf_iter__task_vma bpf_iter__task_vma___not_used
 11 #define bpf_iter__tcp bpf_iter__tcp___not_used
 12 #define tcp6_sock tcp6_sock___not_used
 13 #define bpf_iter__udp bpf_iter__udp___not_used
 14 #define udp6_sock udp6_sock___not_used
 15 #define bpf_iter__unix bpf_iter__unix___not_used
 16 #define bpf_iter__bpf_map_elem bpf_iter__bpf_map_elem___not_used
 17 #define bpf_iter__bpf_sk_storage_map bpf_iter__bpf_sk_storage_map___not_used
 18 #define bpf_iter__sockmap bpf_iter__sockmap___not_used
 19 #define bpf_iter__bpf_link bpf_iter__bpf_link___not_used
 20 #define bpf_iter__cgroup bpf_iter__cgroup___not_used
 21 #define btf_ptr btf_ptr___not_used
 22 #define BTF_F_COMPACT BTF_F_COMPACT___not_used
 23 #define BTF_F_NONAME BTF_F_NONAME___not_used
 24 #define BTF_F_PTR_RAW BTF_F_PTR_RAW___not_used
 25 #define BTF_F_ZERO BTF_F_ZERO___not_used
 26 #define bpf_iter__ksym bpf_iter__ksym___not_used
 27 #include "vmlinux.h"
 28 #undef bpf_iter_meta
 29 #undef bpf_iter__bpf_map
 30 #undef bpf_iter__ipv6_route
 31 #undef bpf_iter__netlink
 32 #undef bpf_iter__task
 33 #undef bpf_iter__task_file
 34 #undef bpf_iter__task_vma
 35 #undef bpf_iter__tcp
 36 #undef tcp6_sock
 37 #undef bpf_iter__udp
 38 #undef udp6_sock
 39 #undef bpf_iter__unix
 40 #undef bpf_iter__bpf_map_elem
 41 #undef bpf_iter__bpf_sk_storage_map
 42 #undef bpf_iter__sockmap
 43 #undef bpf_iter__bpf_link
 44 #undef bpf_iter__cgroup
 45 #undef btf_ptr
 46 #undef BTF_F_COMPACT
 47 #undef BTF_F_NONAME
 48 #undef BTF_F_PTR_RAW
 49 #undef BTF_F_ZERO
 50 #undef bpf_iter__ksym
 51 
 52 struct bpf_iter_meta {
 53         struct seq_file *seq;
 54         __u64 session_id;
 55         __u64 seq_num;
 56 } __attribute__((preserve_access_index));
 57 
 58 struct bpf_iter__ipv6_route {
 59         struct bpf_iter_meta *meta;
 60         struct fib6_info *rt;
 61 } __attribute__((preserve_access_index));
 62 
 63 struct bpf_iter__netlink {
 64         struct bpf_iter_meta *meta;
 65         struct netlink_sock *sk;
 66 } __attribute__((preserve_access_index));
 67 
 68 struct bpf_iter__task {
 69         struct bpf_iter_meta *meta;
 70         struct task_struct *task;
 71 } __attribute__((preserve_access_index));
 72 
 73 struct bpf_iter__task_file {
 74         struct bpf_iter_meta *meta;
 75         struct task_struct *task;
 76         __u32 fd;
 77         struct file *file;
 78 } __attribute__((preserve_access_index));
 79 
 80 struct bpf_iter__task_vma {
 81         struct bpf_iter_meta *meta;
 82         struct task_struct *task;
 83         struct vm_area_struct *vma;
 84 } __attribute__((preserve_access_index));
 85 
 86 struct bpf_iter__bpf_map {
 87         struct bpf_iter_meta *meta;
 88         struct bpf_map *map;
 89 } __attribute__((preserve_access_index));
 90 
 91 struct bpf_iter__tcp {
 92         struct bpf_iter_meta *meta;
 93         struct sock_common *sk_common;
 94         uid_t uid;
 95 } __attribute__((preserve_access_index));
 96 
 97 struct tcp6_sock {
 98         struct tcp_sock tcp;
 99         struct ipv6_pinfo inet6;
100 } __attribute__((preserve_access_index));
101 
102 struct bpf_iter__udp {
103         struct bpf_iter_meta *meta;
104         struct udp_sock *udp_sk;
105         uid_t uid __attribute__((aligned(8)));
106         int bucket __attribute__((aligned(8)));
107 } __attribute__((preserve_access_index));
108 
109 struct udp6_sock {
110         struct udp_sock udp;
111         struct ipv6_pinfo inet6;
112 } __attribute__((preserve_access_index));
113 
114 struct bpf_iter__unix {
115         struct bpf_iter_meta *meta;
116         struct unix_sock *unix_sk;
117         uid_t uid;
118 } __attribute__((preserve_access_index));
119 
120 struct bpf_iter__bpf_map_elem {
121         struct bpf_iter_meta *meta;
122         struct bpf_map *map;
123         void *key;
124         void *value;
125 };
126 
127 struct bpf_iter__bpf_sk_storage_map {
128         struct bpf_iter_meta *meta;
129         struct bpf_map *map;
130         struct sock *sk;
131         void *value;
132 };
133 
134 struct bpf_iter__sockmap {
135         struct bpf_iter_meta *meta;
136         struct bpf_map *map;
137         void *key;
138         struct sock *sk;
139 };
140 
141 struct bpf_iter__bpf_link {
142         struct bpf_iter_meta *meta;
143         struct bpf_link *link;
144 };
145 
146 struct bpf_iter__cgroup {
147         struct bpf_iter_meta *meta;
148         struct cgroup *cgroup;
149 } __attribute__((preserve_access_index));
150 
151 struct btf_ptr {
152         void *ptr;
153         __u32 type_id;
154         __u32 flags;
155 };
156 
157 enum {
158         BTF_F_COMPACT   =       (1ULL << 0),
159         BTF_F_NONAME    =       (1ULL << 1),
160         BTF_F_PTR_RAW   =       (1ULL << 2),
161         BTF_F_ZERO      =       (1ULL << 3),
162 };
163 
164 struct bpf_iter__ksym {
165         struct bpf_iter_meta *meta;
166         struct kallsym_iter *ksym;
167 };
168 

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

kernel.org | git.kernel.org | LWN.net | Project Home | SVN repository | Mail admin

Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.

sflogo.php