vbpf / ebpf-samples

Sample ebpf programs to analyze
91 stars 12 forks source link

Does this repo contains 192 programs you claimed in the paper? #14

Closed hckuo2 closed 3 years ago

elazarg commented 3 years ago

Yes. There are more sections than that, but

The ebpf-verifier repo has a link to the version from the paper, in the README.md file, along with instructions how to reproduce the results.

hckuo2 commented 3 years ago

I only see 102 .o files in the repo. Could you point me to the rest?

Thanks

elazarg commented 3 years ago

Most files contain more than one section, the sections are the programs. You can list them using ./check -l PROGRAM. For example:

$ ./check -l ebpf-samples/cilium/bpf_lxc.o
2/1 2/3 2/5 2/4 2/10 2/7 2/6 from-container 2/12 2/11 1/0x1010 2/8 2/9

Alternatively, you can use llvm-objdump. For example llvm-objdump -d ebpf-samples/cilium/bpf_lxc.o prints disassembly of all the programs in the file.

elazarg commented 3 years ago

Also, see here a complete list of the programs ( = sections in the .o files) we can and cannot verify.

hckuo2 commented 3 years ago

Is each section loaded as a BPF program in the kernel?

elazarg commented 3 years ago

Yes.

hckuo2 commented 3 years ago

Thank you very much! I see 366 programs now.

1/0x1010 15056
1/0x1010 15096
1/0x1010 544
1/0xdc06 19048
2/10 28360
2/10 28744
2/11 13336
2/12 13728
2/1 264
2/1 264
2/1 264
2/1 264
2/1 264
2/1 264
2/1 264
2/1 344
2/1 344
2/1 344
2/1 344
2/1 352
2/2 312
2/2 312
2/2 312
2/2 312
2/2 312
2/2 320
2/2 320
2/3 1944
2/3 1944
2/3 2088
2/3 2088
2/3 2224
2/3 2344
2/3 2344
2/3 2344
2/4 2608
2/4 2608
2/4 2792
2/4 2808
2/4 2968
2/4 2984
2/4 2984
2/4 3000
2/5 3792
2/5 4008
2/5 4008
2/5 4136
2/5 4136
2/5 4344
2/5 4344
2/5 4344
2/6 1632
2/6 1632
2/6 1712
2/6 1800
2/7 11272
2/7 13072
2/7 17624
2/7 17624
2/7 2384
2/7 27096
2/7 29328
2/7 5864
2/8 3888
2/9 2936
3/2 272
3/2 272
af_xdp 16
cgroup/sock1 424
cgroup/sock2 280
classifier 520
clone_redirect_recv 48
clone_redirect_xmit 48
downcall 944
drop_non_tun_vip 216
egress 392
filter 408
filter 64
filter 64
filter 920
from-container 20000
from-container 440
from-container 472
from-container 608
from-netdev 15952
from-netdev 2352
from-netdev 2936
from-netdev 6616
from-netdev 8256
from-netdev 8464
from-netdev 968
from-overlay 15360
from-overlay 4112
ingress 400
ingress_redirect 352
kprobe/0 240
kprobe/1 248
kprobe/9 80
kprobe/blk_account_io_completion 792
kprobe/blk_start_request 112
kprobe/blk_start_request 16
kprobe/htab_map_alloc 256
kprobe/htab_map_get_next_key 256
kprobe/htab_map_lookup_elem 296
kprobe/htab_map_update_elem 256
kprobe/__htab_percpu_map_update_elem 256
kprobe/kfree_skb 232
kprobe/kmem_cache_free 72
kprobe/mutex_spin_on_owner 256
kprobe/__netif_receive_skb_core 352
kprobe/open_ctree 32
kprobe/_raw_spin_lock 256
kprobe/_raw_spin_lock_bh 256
kprobe/_raw_spin_lock_irq 256
kprobe/_raw_spin_lock_irqsave 256
kprobe/_raw_spin_trylock 256
kprobe/_raw_spin_trylock_bh 256
kprobe/_raw_spin_unlock 256
kprobe/_raw_spin_unlock_bh 256
kprobe/_raw_spin_unlock_irqrestore 256
kprobe/rwsem_spin_on_owner 256
kprobe/__seccomp_filter 272
kprobe/__set_task_comm 328
kprobe/spin_lock 256
kprobe/spin_unlock 256
kprobe/spin_unlock_irqrestore 256
kprobe/sys_connect 2528
kprobe/sys_connect 312
kprobe/sys_connect 992
kprobe/sys_getegid 200
kprobe/sys_geteuid 200
kprobe/sys_getgid 200
kprobe/sys_getpgid 2096
kprobe/sys_getppid 2096
kprobe/sys_gettid 1080
kprobe/sys_getuid 200
kprobe/sys_sync 168
kprobe/sys_write 120
kprobe/sys_write 856
kprobe/trace_preempt_off 104
kprobe/trace_preempt_on 856
kprobe/try_to_wake_up 216
kprobe/urandom_read 16
kretprobe/blk_account_io_completion 16
kretprobe/kmem_cache_alloc_node 192
l2_to_ip6tun_ingress_redirect 896
l2_to_iptun_ingress_forward 696
l2_to_iptun_ingress_redirect 600
len_hist 448
loadbalancer 472
perf_event 1104
perf_event 192
raw_tracepoint/filler/cpu_hotplug_e 6936
raw_tracepoint/filler/proc_startupdate_2 25560
raw_tracepoint/filler/proc_startupdate 26712
raw_tracepoint/filler/proc_startupdate_3 25352
raw_tracepoint/filler/sched_drop 4720
raw_tracepoint/filler/sched_switch_e 9296
raw_tracepoint/filler/sys_accept4_e 4672
raw_tracepoint/filler/sys_accept_x 16632
raw_tracepoint/filler/sys_access_e 4736
raw_tracepoint/filler/sys_autofill 16192
raw_tracepoint/filler/sys_bpf_x 5056
raw_tracepoint/filler/sys_brk_munmap_mmap_x 6568
raw_tracepoint/filler/sys_chmod_x 9960
raw_tracepoint/filler/sys_connect_x 12936
raw_tracepoint/filler/sys_creat_x 13816
raw_tracepoint/filler/sys_empty 2312
raw_tracepoint/filler/sys_eventfd_e 6960
raw_tracepoint/filler/sys_execve_e 7184
raw_tracepoint/filler/sys_fchmodat_x 12688
raw_tracepoint/filler/sys_fchmod_x 9960
raw_tracepoint/filler/sys_fcntl_e 5648
raw_tracepoint/filler/sys_flock_e 7368
raw_tracepoint/filler/sys_futex_e 10472
raw_tracepoint/filler/sys_generic 7032
raw_tracepoint/filler/sys_getresuid_and_gid_x 12872
raw_tracepoint/filler/sys_getrlimit_setrlimit_e 4152
raw_tracepoint/filler/sys_getrlimit_setrlrimit_x 9840
raw_tracepoint/filler/sys_getsockopt_x 18504
raw_tracepoint/filler/sys_linkat_x 18008
raw_tracepoint/filler/sys_llseek_e 10040
raw_tracepoint/filler/sys_lseek_e 9904
raw_tracepoint/filler/sys_mkdirat_x 12672
raw_tracepoint/filler/sys_mmap_e 18800
raw_tracepoint/filler/sys_mount_e 4808
raw_tracepoint/filler/sys_nanosleep_e 3608
raw_tracepoint/filler/sys_openat_x 19992
raw_tracepoint/filler/sys_open_x 17248
raw_tracepoint/filler/sys_pagefault_e 9464
raw_tracepoint/filler/sys_pipe_x 13400
raw_tracepoint/filler/sys_poll_e 12936
raw_tracepoint/filler/sys_poll_x 12048
raw_tracepoint/filler/sys_ppoll_e 13392
raw_tracepoint/filler/sys_pread64_e 1512
raw_tracepoint/filler/sys_preadv64_e 1512
raw_tracepoint/filler/sys_prlimit_e 7888
raw_tracepoint/filler/sys_prlimit_x 7136
raw_tracepoint/filler/sys_procexit_e 4736
raw_tracepoint/filler/sys_ptrace_e 8544
raw_tracepoint/filler/sys_ptrace_x 13048
raw_tracepoint/filler/sys_pwrite64_e 1512
raw_tracepoint/filler/sys_pwritev_e 8520
raw_tracepoint/filler/sys_quotactl_e 7960
raw_tracepoint/filler/sys_quotactl_x 21848
raw_tracepoint/filler/sys_readv_preadv_x 25952
raw_tracepoint/filler/sys_read_x 17976
raw_tracepoint/filler/sys_recvfrom_x 24160
raw_tracepoint/filler/sys_recvmsg_x 26552
raw_tracepoint/filler/sys_recvmsg_x_2 9384
raw_tracepoint/filler/sys_recv_x 16544
raw_tracepoint/filler/sys_renameat2_x 17768
raw_tracepoint/filler/sys_renameat_x 15360
raw_tracepoint/filler/sys_semctl_e 13320
raw_tracepoint/filler/sys_semget_e 9984
raw_tracepoint/filler/sys_semop_x 10480
raw_tracepoint/filler/sys_send_e 7400
raw_tracepoint/filler/sys_sendfile_e 12920
raw_tracepoint/filler/sys_sendfile_x 7320
raw_tracepoint/filler/sys_sendmsg_e 12648
raw_tracepoint/filler/sys_sendmsg_x 26432
raw_tracepoint/filler/sys_sendto_e 15648
raw_tracepoint/filler/sys_send_x 16544
raw_tracepoint/filler/sys_setns_e 8032
raw_tracepoint/filler/sys_setsockopt_x 18976
raw_tracepoint/filler/sys_shutdown_e 7368
raw_tracepoint/filler/sys_signaldeliver_e 10136
raw_tracepoint/filler/sys_single 4728
raw_tracepoint/filler/sys_single_x 4640
raw_tracepoint/filler/sys_socket_bind_x 8768
raw_tracepoint/filler/sys_socketpair_x 8416
raw_tracepoint/filler/sys_socket_x 6128
raw_tracepoint/filler/sys_symlinkat_x 7912
raw_tracepoint/filler/sys_sysdigevent_e 1512
raw_tracepoint/filler/sys_unlinkat_x 12696
raw_tracepoint/filler/sys_unshare_e 5456
raw_tracepoint/filler/sys_writev_e 7248
raw_tracepoint/filler/sys_writev_pwritev_x 27640
raw_tracepoint/filler/sys_write_x 18216
raw_tracepoint/filler/terminate_filler 664
raw_tracepoint/page_fault_kernel 2024
raw_tracepoint/page_fault_user 2024
raw_tracepoint/sched_process_exit 1728
raw_tracepoint/sched_switch 1952
raw_tracepoint/signal_deliver 2008
raw_tracepoint/sys_enter 3808
raw_tracepoint/sys_exit 3808
raw_tracepoint/task_rename 16
raw_tracepoint/urandom_read 16
redirect_recv 40
redirect_xmit 40
socket/0 304
socket1 120
socket/1 328
socket/2 152
socket2 1608
socket/3 1248
socket/4 1384
socket_filter 144
sockops 400
sockops 408
sockops 480
sockops 528
sockops 568
sockops 608
sockops 80
sockops 960
tail-0 184
tail-11 2808
tail-12 16
tail-1 2512
tail-13 2600
tail-2 4032
tail-32 6352
tail-33 6808
tail-3 3752
tail-35 2224
tail-4 2528
tail-5 2376
tail-7 2112
tail-8 2944
tc_mark 80
tc_vlan_push 40
test 80
test 96
tracepoint/irq/softirq_entry 136
tracepoint/irq/softirq_exit 136
tracepoint/irq/softirq_raise 136
tracepoint/napi/napi_poll 392
tracepoint/power/cpu_frequency 648
tracepoint/power/cpu_idle 912
tracepoint/random/urandom_read 16
tracepoint/sched/sched_switch 792
tracepoint/syscalls/sys_enter_open 192
tracepoint/syscalls/sys_exit_open 192
tracepoint/task/task_rename 16
tracepoint/xdp/xdp_cpumap_enqueue 208
tracepoint/xdp/xdp_cpumap_enqueue 208
tracepoint/xdp/xdp_cpumap_enqueue 208
tracepoint/xdp/xdp_cpumap_kthread 192
tracepoint/xdp/xdp_cpumap_kthread 192
tracepoint/xdp/xdp_cpumap_kthread 192
tracepoint/xdp/xdp_devmap_xmit 288
tracepoint/xdp/xdp_exception 120
tracepoint/xdp/xdp_exception 120
tracepoint/xdp/xdp_exception 144
tracepoint/xdp/xdp_redirect 128
tracepoint/xdp/xdp_redirect 144
tracepoint/xdp/xdp_redirect_err 128
tracepoint/xdp/xdp_redirect_err 128
tracepoint/xdp/xdp_redirect_err 128
tracepoint/xdp/xdp_redirect_err 144
tracepoint/xdp/xdp_redirect_map 128
tracepoint/xdp/xdp_redirect_map 144
tracepoint/xdp/xdp_redirect_map_err 128
tracepoint/xdp/xdp_redirect_map_err 128
tracepoint/xdp/xdp_redirect_map_err 128
tracepoint/xdp/xdp_redirect_map_err 144
xdp 112
xdp1 488
xdp1 624
xdp 2608
xdp 72
xdp 72
xdp 88
xdp_bench01 504
xdp_bench02 1048
xdp_cpu_map0 256
xdp_cpu_map0 256
xdp_cpu_map1_touch_data 352
xdp_cpu_map1_touch_data 352
xdp_cpu_map2_round_robin 472
xdp_cpu_map2_round_robin 472
xdp_cpu_map3_proto_separate 736
xdp_cpu_map3_proto_separate 832
xdp_cpu_map4_ddos_filter_pktgen 880
xdp_cpu_map4_ddos_filter_pktgen 976
xdp_cpu_map5_ip_l3_flow_hash 1696
xdp_cpu_map5_lb_hash_ip_pairs 1392
xdp_drop_vlan_4011 152
xdp_fwd 1184
xdp_fwd_direct 1184
xdp_icmp 936
xdp_mark 144
xdp_prog/0 16
xdp_prog/0 16
xdp_prog0 648
xdp_prog 40
xdp_prog 48
xdp_prog 944
xdp_redirect 344
xdp_redirect_dummy 16
xdp_redirect_dummy 16
xdp_redirect_dummy 16
xdp_redirect_map 248
xdp_redirect_map 280
xdp_redirect_map_rr 232
xdp_router_ipv4 952
xdp_sample 360
xdp_sock 168
xdp_tcpdump_to_perf_ring 176
xdp_ttl 344
xdp_tx_iptunnel 2264
xdp_vlan_change 176
xdp_vlan_remove_outer2 184
xdp_vlan_remove_outer 328