Skip to content
Navigation Menu
Toggle navigation
Sign in
In this repository
All GitHub Enterprise
↵
Jump to
↵
No suggested jump to results
In this repository
All GitHub Enterprise
↵
Jump to
↵
In this organization
All GitHub Enterprise
↵
Jump to
↵
In this repository
All GitHub Enterprise
↵
Jump to
↵
Sign in
Reseting focus
You signed in with another tab or window.
Reload
to refresh your session.
You signed out in another tab or window.
Reload
to refresh your session.
You switched accounts on another tab or window.
Reload
to refresh your session.
Dismiss alert
{{ message }}
mariux64
/
linux
Public
Notifications
You must be signed in to change notification settings
Fork
0
Star
0
Code
Issues
2
Pull requests
0
Actions
Projects
0
Wiki
Security
Insights
Additional navigation options
Code
Issues
Pull requests
Actions
Projects
Wiki
Security
Insights
Files
fa183a8
Documentation
LICENSES
arch
block
certs
crypto
drivers
fs
include
init
ipc
kernel
lib
mm
net
samples
scripts
security
sound
tools
accounting
arch
bootconfig
bpf
build
cgroup
debugging
edid
firewire
firmware
gpio
hv
iio
include
io_uring
kvm/kvm_stat
laptop
leds
lib
memory-model
objtool
pci
pcmcia
perf
power
rcu
scripts
spi
testing
fault-injection
ktest
kunit
nvdimm
radix-tree
scatterlist
selftests
arm64
bpf
benchs
bpf_testmod
gnu
map_tests
prog_tests
progs
atomic_bounds.c
atomics.c
bind4_prog.c
bind6_prog.c
bind_perm.c
bpf_cubic.c
bpf_dctcp.c
bpf_flow.c
bpf_iter.h
bpf_iter_bpf_array_map.c
bpf_iter_bpf_hash_map.c
bpf_iter_bpf_map.c
bpf_iter_bpf_percpu_array_map.c
bpf_iter_bpf_percpu_hash_map.c
bpf_iter_bpf_sk_storage_helpers.c
bpf_iter_bpf_sk_storage_map.c
bpf_iter_ipv6_route.c
bpf_iter_netlink.c
bpf_iter_setsockopt.c
bpf_iter_sockmap.c
bpf_iter_task.c
bpf_iter_task_btf.c
bpf_iter_task_file.c
bpf_iter_task_stack.c
bpf_iter_task_vma.c
bpf_iter_tcp4.c
bpf_iter_tcp6.c
bpf_iter_test_kern1.c
bpf_iter_test_kern2.c
bpf_iter_test_kern3.c
bpf_iter_test_kern4.c
bpf_iter_test_kern5.c
bpf_iter_test_kern6.c
bpf_iter_test_kern_common.h
bpf_iter_udp4.c
bpf_iter_udp6.c
bpf_iter_unix.c
bpf_tcp_nogpl.c
bpf_tracing_net.h
bprm_opts.c
btf__core_reloc_arrays.c
btf__core_reloc_arrays___diff_arr_dim.c
btf__core_reloc_arrays___diff_arr_val_sz.c
btf__core_reloc_arrays___equiv_zero_sz_arr.c
btf__core_reloc_arrays___err_bad_zero_sz_arr.c
btf__core_reloc_arrays___err_non_array.c
btf__core_reloc_arrays___err_too_shallow.c
btf__core_reloc_arrays___err_too_small.c
btf__core_reloc_arrays___err_wrong_val_type.c
btf__core_reloc_arrays___fixed_arr.c
btf__core_reloc_bitfields.c
btf__core_reloc_bitfields___bit_sz_change.c
btf__core_reloc_bitfields___bitfield_vs_int.c
btf__core_reloc_bitfields___err_too_big_bitfield.c
btf__core_reloc_bitfields___just_big_enough.c
btf__core_reloc_enumval.c
btf__core_reloc_enumval___diff.c
btf__core_reloc_enumval___err_missing.c
btf__core_reloc_enumval___val3_missing.c
btf__core_reloc_existence.c
btf__core_reloc_existence___minimal.c
btf__core_reloc_existence___wrong_field_defs.c
btf__core_reloc_flavors.c
btf__core_reloc_flavors__err_wrong_name.c
btf__core_reloc_ints.c
btf__core_reloc_ints___bool.c
btf__core_reloc_ints___reverse_sign.c
btf__core_reloc_misc.c
btf__core_reloc_mods.c
btf__core_reloc_mods___mod_swap.c
btf__core_reloc_mods___typedefs.c
btf__core_reloc_nesting.c
btf__core_reloc_nesting___anon_embed.c
btf__core_reloc_nesting___dup_compat_types.c
btf__core_reloc_nesting___err_array_container.c
btf__core_reloc_nesting___err_array_field.c
btf__core_reloc_nesting___err_dup_incompat_types.c
btf__core_reloc_nesting___err_missing_container.c
btf__core_reloc_nesting___err_missing_field.c
btf__core_reloc_nesting___err_nonstruct_container.c
btf__core_reloc_nesting___err_partial_match_dups.c
btf__core_reloc_nesting___err_too_deep.c
btf__core_reloc_nesting___extra_nesting.c
btf__core_reloc_nesting___struct_union_mixup.c
btf__core_reloc_primitives.c
btf__core_reloc_primitives___diff_enum_def.c
btf__core_reloc_primitives___diff_func_proto.c
btf__core_reloc_primitives___diff_ptr_type.c
btf__core_reloc_primitives___err_non_enum.c
btf__core_reloc_primitives___err_non_int.c
btf__core_reloc_primitives___err_non_ptr.c
btf__core_reloc_ptr_as_arr.c
btf__core_reloc_ptr_as_arr___diff_sz.c
btf__core_reloc_size.c
btf__core_reloc_size___diff_sz.c
btf__core_reloc_size___err_ambiguous.c
btf__core_reloc_type_based.c
btf__core_reloc_type_based___all_missing.c
btf__core_reloc_type_based___diff_sz.c
btf__core_reloc_type_based___fn_wrong_args.c
btf__core_reloc_type_based___incompat.c
btf__core_reloc_type_id.c
btf__core_reloc_type_id___missing_targets.c
btf_data.c
btf_dump_test_case_bitfields.c
btf_dump_test_case_multidim.c
btf_dump_test_case_namespacing.c
btf_dump_test_case_ordering.c
btf_dump_test_case_packing.c
btf_dump_test_case_padding.c
btf_dump_test_case_syntax.c
btf_ptr.h
cg_storage_multi.h
cg_storage_multi_egress_only.c
cg_storage_multi_isolated.c
cg_storage_multi_shared.c
cgroup_skb_sk_lookup_kern.c
connect4_prog.c
connect6_prog.c
connect_force_port4.c
connect_force_port6.c
core_reloc_types.h
dev_cgroup.c
fentry_test.c
fexit_bpf2bpf.c
fexit_bpf2bpf_simple.c
fexit_sleep.c
fexit_test.c
fmod_ret_freplace.c
for_each_array_map_elem.c
for_each_hash_map_elem.c
freplace_attach_probe.c
freplace_cls_redirect.c
freplace_connect4.c
freplace_connect_v4_prog.c
freplace_get_constant.c
get_cgroup_id_kern.c
get_func_ip_test.c
ima.c
kfree_skb.c
kfunc_call_test.c
kfunc_call_test_subprog.c
linked_funcs1.c
linked_funcs2.c
linked_maps1.c
linked_maps2.c
linked_vars1.c
linked_vars2.c
load_bytes_relative.c
local_storage.c
loop1.c
loop2.c
loop3.c
loop4.c
loop5.c
loop6.c
lsm.c
map_ptr_kern.c
metadata_unused.c
metadata_used.c
modify_return.c
netcnt_prog.c
netif_receive_skb.c
perf_event_stackmap.c
perfbuf_bench.c
profiler.h
profiler.inc.h
profiler1.c
profiler2.c
profiler3.c
pyperf.h
pyperf100.c
pyperf180.c
pyperf50.c
pyperf600.c
pyperf600_nounroll.c
pyperf_global.c
pyperf_subprogs.c
recursion.c
recvmsg4_prog.c
recvmsg6_prog.c
ringbuf_bench.c
sample_map_ret0.c
sample_ret0.c
sendmsg4_prog.c
sendmsg6_prog.c
skb_pkt_end.c
socket_cookie_prog.c
sockmap_parse_prog.c
sockmap_tcp_msg_prog.c
sockmap_verdict_prog.c
sockopt_inherit.c
sockopt_multi.c
sockopt_sk.c
strobemeta.c
strobemeta.h
strobemeta_nounroll1.c
strobemeta_nounroll2.c
strobemeta_subprogs.c
syscall.c
tailcall1.c
tailcall2.c
tailcall3.c
tailcall4.c
tailcall5.c
tailcall_bpf2bpf1.c
tailcall_bpf2bpf2.c
tailcall_bpf2bpf3.c
tailcall_bpf2bpf4.c
task_local_storage.c
task_local_storage_exit_creds.c
task_ls_recursion.c
tcp_rtt.c
test_attach_probe.c
test_autoload.c
test_btf_haskv.c
test_btf_map_in_map.c
test_btf_newkv.c
test_btf_nokv.c
test_btf_skc_cls_ingress.c
test_cgroup_link.c
test_check_mtu.c
test_cls_redirect.c
test_cls_redirect.h
test_cls_redirect_subprogs.c
test_core_autosize.c
test_core_extern.c
test_core_read_macros.c
test_core_reloc_arrays.c
test_core_reloc_bitfields_direct.c
test_core_reloc_bitfields_probed.c
test_core_reloc_enumval.c
test_core_reloc_existence.c
test_core_reloc_flavors.c
test_core_reloc_ints.c
test_core_reloc_kernel.c
test_core_reloc_misc.c
test_core_reloc_mods.c
test_core_reloc_module.c
test_core_reloc_nesting.c
test_core_reloc_primitives.c
test_core_reloc_ptr_as_arr.c
test_core_reloc_size.c
test_core_reloc_type_based.c
test_core_reloc_type_id.c
test_core_retro.c
test_d_path.c
test_enable_stats.c
test_endian.c
test_get_stack_rawtp.c
test_get_stack_rawtp_err.c
test_global_data.c
test_global_func1.c
test_global_func10.c
test_global_func11.c
test_global_func12.c
test_global_func13.c
test_global_func14.c
test_global_func15.c
test_global_func16.c
test_global_func2.c
test_global_func3.c
test_global_func4.c
test_global_func5.c
test_global_func6.c
test_global_func7.c
test_global_func8.c
test_global_func9.c
test_global_func_args.c
test_hash_large_key.c
test_jhash.h
test_ksyms.c
test_ksyms_btf.c
test_ksyms_btf_null_check.c
test_ksyms_module.c
test_ksyms_weak.c
test_l4lb.c
test_l4lb_noinline.c
test_link_pinning.c
test_lirc_mode2_kern.c
test_lookup_and_delete.c
test_lwt_ip_encap.c
test_lwt_seg6local.c
test_map_in_map.c
test_map_in_map_invalid.c
test_map_init.c
test_map_lock.c
test_migrate_reuseport.c
test_misc_tcp_hdr_options.c
test_mmap.c
test_module_attach.c
test_ns_current_pid_tgid.c
test_obj_id.c
test_overhead.c
test_pe_preserve_elems.c
test_perf_branches.c
test_perf_buffer.c
test_pinning.c
test_pinning_invalid.c
test_pkt_access.c
test_pkt_md_access.c
test_probe_read_user_str.c
test_probe_user.c
test_queue_map.c
test_queue_stack_map.h
test_raw_tp_test_run.c
test_rdonly_maps.c
test_ringbuf.c
test_ringbuf_multi.c
test_seg6_loop.c
test_select_reuseport_kern.c
test_send_signal_kern.c
test_sk_assign.c
test_sk_lookup.c
test_sk_lookup_kern.c
test_sk_storage_trace_itself.c
test_sk_storage_tracing.c
test_skb_cgroup_id_kern.c
test_skb_ctx.c
test_skb_helpers.c
test_skeleton.c
test_skmsg_load_helpers.c
test_snprintf.c
test_snprintf_single.c
test_sock_fields.c
test_sockhash_kern.c
test_sockmap_invalid_update.c
test_sockmap_kern.c
test_sockmap_kern.h
test_sockmap_listen.c
test_sockmap_skb_verdict_attach.c
test_sockmap_update.c
test_spin_lock.c
test_stack_map.c
test_stack_var_off.c
test_stacktrace_build_id.c
test_stacktrace_map.c
test_static_linked1.c
test_static_linked2.c
test_subprogs.c
test_subprogs_unused.c
test_sysctl_loop1.c
test_sysctl_loop2.c
test_sysctl_prog.c
test_tc_bpf.c
test_tc_edt.c
test_tc_neigh.c
test_tc_neigh_fib.c
test_tc_peer.c
test_tc_tunnel.c
test_tcp_check_syncookie_kern.c
test_tcp_estats.c
test_tcp_hdr_options.c
test_tcpbpf_kern.c
test_tcpnotify_kern.c
test_trace_ext.c
test_trace_ext_tracing.c
test_tracepoint.c
test_trampoline_count.c
test_tunnel_kern.c
test_varlen.c
test_verif_scale1.c
test_verif_scale2.c
test_verif_scale3.c
test_vmlinux.c
test_xdp.c
test_xdp_adjust_tail_grow.c
test_xdp_adjust_tail_shrink.c
test_xdp_bpf2bpf.c
test_xdp_context_test_run.c
test_xdp_devmap_helpers.c
test_xdp_link.c
test_xdp_loop.c
test_xdp_meta.c
test_xdp_noinline.c
test_xdp_redirect.c
test_xdp_vlan.c
test_xdp_with_cpumap_helpers.c
test_xdp_with_devmap_helpers.c
timer.c
timer_mim.c
timer_mim_reject.c
trace_printk.c
trigger_bench.c
udp_limit.c
xdp_dummy.c
xdp_redirect_map.c
xdp_redirect_multi_kern.c
xdp_tx.c
xdping_kern.c
verifier
.gitignore
Makefile
Makefile.docs
README.rst
bench.c
bench.h
bpf_legacy.h
bpf_rand.h
bpf_rlimit.h
bpf_sockopt_helpers.h
bpf_tcp_helpers.h
bpf_util.h
btf_helpers.c
btf_helpers.h
cgroup_helpers.c
cgroup_helpers.h
config
flow_dissector_load.c
flow_dissector_load.h
get_cgroup_id_user.c
ima_setup.sh
netcnt_common.h
network_helpers.c
network_helpers.h
settings
test_bpftool.py
test_bpftool.sh
test_bpftool_build.sh
test_bpftool_metadata.sh
test_bpftool_synctypes.py
test_btf.h
test_cgroup_storage.c
test_cpp.cpp
test_dev_cgroup.c
test_doc_build.sh
test_flow_dissector.c
test_flow_dissector.sh
test_ftrace.sh
test_iptunnel_common.h
test_kmod.sh
test_lirc_mode2.sh
test_lirc_mode2_user.c
test_lpm_map.c
test_lru_map.c
test_lwt_ip_encap.sh
test_lwt_seg6local.sh
test_maps.c
test_maps.h
test_offload.py
test_progs.c
test_progs.h
test_select_reuseport_common.h
test_skb_cgroup_id.sh
test_skb_cgroup_id_user.c
test_sock.c
test_sock_addr.c
test_sock_addr.sh
test_sockmap.c
test_stub.c
test_sysctl.c
test_tag.c
test_tc_edt.sh
test_tc_tunnel.sh
test_tcp_check_syncookie.sh
test_tcp_check_syncookie_user.c
test_tcp_hdr_options.h
test_tcpbpf.h
test_tcpnotify.h
test_tcpnotify_user.c
test_tunnel.sh
test_verifier.c
test_verifier_log.c
test_xdp_meta.sh
test_xdp_redirect.sh
test_xdp_redirect_multi.sh
test_xdp_veth.sh
test_xdp_vlan.sh
test_xdp_vlan_mode_generic.sh
test_xdp_vlan_mode_native.sh
test_xdping.sh
test_xsk.sh
testing_helpers.c
testing_helpers.h
trace_helpers.c
trace_helpers.h
urandom_read.c
vmtest.sh
with_addr.sh
with_tunnels.sh
xdp_redirect_multi.c
xdping.c
xdping.h
xdpxceiver.c
xdpxceiver.h
xsk_prereqs.sh
breakpoints
capabilities
cgroup
clone3
core
cpu-hotplug
cpufreq
dma
dmabuf-heaps
drivers
efivarfs
exec
filesystems
firmware
fpu
ftrace
futex
gpio
ia64
intel_pstate
ipc
ir
kcmp
kexec
kmod
kselftest
kvm
landlock
lib
livepatch
lkdtm
locking
media_tests
membarrier
memfd
memory-hotplug
mincore
mount
mount_setattr
mqueue
nci
net
netfilter
nsfs
ntb
openat2
perf_events
pid_namespace
pidfd
powerpc
prctl
proc
pstore
ptp
ptrace
rcutorture
resctrl
rlimits
rseq
rtc
safesetid
sched
seccomp
sgx
sigaltstack
size
sparc64
splice
static_keys
sync
syscall_user_dispatch
sysctl
tc-testing
timens
timers
tmpfs
tpm2
uevent
user
vDSO
vm
watchdog
wireguard
x86
zram
.gitignore
Makefile
gen_kselftest_tar.sh
kselftest.h
kselftest_deps.sh
kselftest_harness.h
kselftest_install.sh
kselftest_module.h
lib.mk
run_kselftest.sh
vsock
thermal/tmon
time
tracing
usb
virtio
vm
wmi
Makefile
usr
virt
.clang-format
.cocciconfig
.get_maintainer.ignore
.gitattributes
.gitignore
.mailmap
COPYING
CREDITS
Kbuild
Kconfig
MAINTAINERS
Makefile
README
Breadcrumbs
linux
/
tools
/
testing
/
selftests
/
bpf
/
progs
/
bpf_iter.h
Blame
Blame
Latest commit
History
History
146 lines (129 loc) · 3.72 KB
Breadcrumbs
linux
/
tools
/
testing
/
selftests
/
bpf
/
progs
/
bpf_iter.h
Top
File metadata and controls
Code
Blame
146 lines (129 loc) · 3.72 KB
Raw
/* SPDX-License-Identifier: GPL-2.0 */ /* Copyright (c) 2020 Facebook */ /* "undefine" structs in vmlinux.h, because we "override" them below */ #define bpf_iter_meta bpf_iter_meta___not_used #define bpf_iter__bpf_map bpf_iter__bpf_map___not_used #define bpf_iter__ipv6_route bpf_iter__ipv6_route___not_used #define bpf_iter__netlink bpf_iter__netlink___not_used #define bpf_iter__task bpf_iter__task___not_used #define bpf_iter__task_file bpf_iter__task_file___not_used #define bpf_iter__task_vma bpf_iter__task_vma___not_used #define bpf_iter__tcp bpf_iter__tcp___not_used #define tcp6_sock tcp6_sock___not_used #define bpf_iter__udp bpf_iter__udp___not_used #define udp6_sock udp6_sock___not_used #define bpf_iter__unix bpf_iter__unix___not_used #define bpf_iter__bpf_map_elem bpf_iter__bpf_map_elem___not_used #define bpf_iter__bpf_sk_storage_map bpf_iter__bpf_sk_storage_map___not_used #define bpf_iter__sockmap bpf_iter__sockmap___not_used #define btf_ptr btf_ptr___not_used #define BTF_F_COMPACT BTF_F_COMPACT___not_used #define BTF_F_NONAME BTF_F_NONAME___not_used #define BTF_F_PTR_RAW BTF_F_PTR_RAW___not_used #define BTF_F_ZERO BTF_F_ZERO___not_used #include "vmlinux.h" #undef bpf_iter_meta #undef bpf_iter__bpf_map #undef bpf_iter__ipv6_route #undef bpf_iter__netlink #undef bpf_iter__task #undef bpf_iter__task_file #undef bpf_iter__task_vma #undef bpf_iter__tcp #undef tcp6_sock #undef bpf_iter__udp #undef udp6_sock #undef bpf_iter__unix #undef bpf_iter__bpf_map_elem #undef bpf_iter__bpf_sk_storage_map #undef bpf_iter__sockmap #undef btf_ptr #undef BTF_F_COMPACT #undef BTF_F_NONAME #undef BTF_F_PTR_RAW #undef BTF_F_ZERO struct bpf_iter_meta { struct seq_file *seq; __u64 session_id; __u64 seq_num; } __attribute__((preserve_access_index)); struct bpf_iter__ipv6_route { struct bpf_iter_meta *meta; struct fib6_info *rt; } __attribute__((preserve_access_index)); struct bpf_iter__netlink { struct bpf_iter_meta *meta; struct netlink_sock *sk; } __attribute__((preserve_access_index)); struct bpf_iter__task { struct bpf_iter_meta *meta; struct task_struct *task; } __attribute__((preserve_access_index)); struct bpf_iter__task_file { struct bpf_iter_meta *meta; struct task_struct *task; __u32 fd; struct file *file; } __attribute__((preserve_access_index)); struct bpf_iter__task_vma { struct bpf_iter_meta *meta; struct task_struct *task; struct vm_area_struct *vma; } __attribute__((preserve_access_index)); struct bpf_iter__bpf_map { struct bpf_iter_meta *meta; struct bpf_map *map; } __attribute__((preserve_access_index)); struct bpf_iter__tcp { struct bpf_iter_meta *meta; struct sock_common *sk_common; uid_t uid; } __attribute__((preserve_access_index)); struct tcp6_sock { struct tcp_sock tcp; struct ipv6_pinfo inet6; } __attribute__((preserve_access_index)); struct bpf_iter__udp { struct bpf_iter_meta *meta; struct udp_sock *udp_sk; uid_t uid __attribute__((aligned(8))); int bucket __attribute__((aligned(8))); } __attribute__((preserve_access_index)); struct udp6_sock { struct udp_sock udp; struct ipv6_pinfo inet6; } __attribute__((preserve_access_index)); struct bpf_iter__unix { struct bpf_iter_meta *meta; struct unix_sock *unix_sk; uid_t uid; } __attribute__((preserve_access_index)); struct bpf_iter__bpf_map_elem { struct bpf_iter_meta *meta; struct bpf_map *map; void *key; void *value; }; struct bpf_iter__bpf_sk_storage_map { struct bpf_iter_meta *meta; struct bpf_map *map; struct sock *sk; void *value; }; struct bpf_iter__sockmap { struct bpf_iter_meta *meta; struct bpf_map *map; void *key; struct sock *sk; }; struct btf_ptr { void *ptr; __u32 type_id; __u32 flags; }; enum { BTF_F_COMPACT = (1ULL << 0), BTF_F_NONAME = (1ULL << 1), BTF_F_PTR_RAW = (1ULL << 2), BTF_F_ZERO = (1ULL << 3), };
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
You can’t perform that action at this time.