github.com/dylandreimerink/gobpfld@v0.6.1-0.20220205171531-e79c330ad608/emulator/todo.md (about) 1 # Userspace VM 2 3 ## TODO 4 5 Implementing a userspace eBPF implementation is not trivial and we don't be doing all of it at once. The following features still need to be implemented 6 7 **Instructions**: 8 9 - Atomic sub 10 - Atomic and 11 - Atomic Or 12 - Atomic Xor 13 - Atomic Exchange 14 - Atomic Compare and exchange 15 16 **Mechanisms**: 17 18 - ~~bpf-to-bpf~~ 19 - ~~Tailcalling~~ 20 21 **Map types**: 22 23 - ~~BPF_MAP_TYPE_ARRAY~~ 24 - ~~BPF_MAP_TYPE_HASH~~ 25 - ~~BPF_MAP_TYPE_PROG_ARRAY~~ 26 - ~~BPF_MAP_TYPE_PERF_EVENT_ARRAY~~ 27 - ~~BPF_MAP_TYPE_PERCPU_HASH~~ (currently we just use the normal map since we don't support parallel execution) 28 - ~~BPF_MAP_TYPE_PERCPU_ARRAY~~ (currently we just use the normal map since we don't support parallel execution) 29 - BPF_MAP_TYPE_STACK_TRACE 30 - BPF_MAP_TYPE_CGROUP_ARRAY 31 - ~~BPF_MAP_TYPE_LRU_HASH~~ 32 - ~~BPF_MAP_TYPE_LRU_PERCPU_HASH~~ (currently we just use the normal map since we don't support parallel execution) 33 - BPF_MAP_TYPE_LPM_TRIE 34 - ~~BPF_MAP_TYPE_ARRAY_OF_MAPS~~ 35 - ~~BPF_MAP_TYPE_HASH_OF_MAPS~~ 36 - BPF_MAP_TYPE_DEVMAP 37 - BPF_MAP_TYPE_SOCKMAP 38 - BPF_MAP_TYPE_CPUMAP 39 - BPF_MAP_TYPE_XSKMAP 40 - BPF_MAP_TYPE_SOCKHASH 41 - BPF_MAP_TYPE_CGROUP_STORAGE 42 - BPF_MAP_TYPE_REUSEPORT_SOCKARRAY 43 - BPF_MAP_TYPE_PERCPU_CGROUP_STORAGE 44 - ~~BPF_MAP_TYPE_QUEUE~~ 45 - ~~BPF_MAP_TYPE_STACK~~ 46 - BPF_MAP_TYPE_SK_STORAGE 47 - BPF_MAP_TYPE_DEVMAP_HASH 48 - BPF_MAP_TYPE_STRUCT_OPS 49 - BPF_MAP_TYPE_RINGBUF 50 - BPF_MAP_TYPE_INODE_STORAGE 51 - BPF_MAP_TYPE_TASK_STORAGE 52 53 **Linux helpers**: 54 55 - ~~bpf_lookup_element~~ 56 - ~~bpf_update_element~~ 57 - bpf_delete_element 58 - bpf_probe_read 59 - bpf_ktime_get_ns 60 - bpf_trace_printk 61 - bpf_get_prandom_u32 62 - bpf_get_smp_processor_id 63 - bpf_skb_store_bytes 64 - bpf_l3_csum_replace 65 - bpf_l4_csum_replace 66 - ~~bpf_tail_call~~ 67 - bpf_clone_redirect 68 - ~~bpf_get_current_pid_tgid~~ 69 - bpf_get_current_uid_gid 70 - bpf_get_current_comm 71 - bpf_get_cgroup_classid 72 - bpf_skb_vlan_push 73 - bpf_skb_vlan_pop 74 - bpf_skb_get_tunnel_key 75 - bpf_skb_set_tunnel_key 76 - bpf_perf_event_read 77 - bpf_redirect 78 - bpf_get_route_realm 79 - ~~bpf_perf_event_output~~ 80 - bpf_skb_load_bytes 81 - bpf_get_stackid 82 - bpf_csum_diff 83 - bpf_skb_get_tunnel_opt 84 - bpf_skb_set_tunnel_opt 85 - bpf_skb_change_proto 86 - bpf_skb_change_type 87 - bpf_skb_under_cgroup 88 - bpf_get_hash_recalc 89 - bpf_get_current_task 90 - bpf_probe_write_user 91 - bpf_current_task_under_cgroup 92 - bpf_skb_change_tail 93 - bpf_skb_pull_data 94 - bpf_csum_update 95 - bpf_set_hash_invalid 96 - bpf_get_numa_node_id 97 - bpf_skb_change_head 98 - bpf_xdp_adjust_head 99 - bpf_probe_read_str 100 - bpf_get_socket_cookie 101 - bpf_get_socket_uid 102 - bpf_set_hash 103 - bpf_setsockopt 104 - bpf_skb_adjust_room 105 - bpf_redirect_map 106 - bpf_sk_redirect_map 107 - bpf_sock_map_update 108 - bpf_xdp_adjust_meta 109 - bpf_perf_event_read_value 110 - bpf_perf_prog_read_value 111 - bpf_getsockopt 112 - bpf_override_return 113 - bpf_sock_ops_cb_flags_set 114 - bpf_msg_redirect_map 115 - bpf_msg_apply_bytes 116 - bpf_msg_cork_bytes 117 - bpf_msg_pull_data 118 - bpf_bind 119 - bpf_xdp_adjust_tail 120 - bpf_skb_get_xfrm_state 121 - bpf_get_stack 122 - bpf_skb_load_bytes_relative 123 - bpf_fib_lookup 124 - bpf_sock_hash_update 125 - bpf_msg_redirect_hash 126 - bpf_sk_redirect_hash 127 - bpf_lwt_push_encap 128 - bpf_lwt_seg6_store_bytes 129 - bpf_lwt_seg6_adjust_srh 130 - bpf_lwt_seg6_action 131 - bpf_rc_repeat 132 - bpf_rc_keydown 133 - bpf_skb_cgroup_id 134 - bpf_get_current_cgroup_id 135 - bpf_get_local_storage 136 - bpf_sk_select_reuseport 137 - bpf_skb_ancestor_cgroup_id 138 - bpf_sk_lookup_tcp 139 - bpf_sk_lookup_udp 140 - bpf_sk_release 141 - ~~bpf_map_push_elem~~ 142 - ~~bpf_map_pop_elem~~ 143 - ~~bpf_map_peek_elem~~ 144 - bpf_msg_push_data 145 - bpf_msg_pop_data 146 - bpf_rc_pointer_rel 147 - bpf_spin_lock 148 - bpf_spin_unlock 149 - bpf_sk_fullsock 150 - bpf_tcp_sock 151 - bpf_skb_ecn_set_ce 152 - bpf_get_listener_sock 153 - bpf_skc_lookup_tcp 154 - bpf_tcp_check_syncookie 155 - bpf_sysctl_get_name 156 - bpf_sysctl_get_current_value 157 - bpf_sysctl_get_new_value 158 - bpf_sysctl_set_new_value 159 - bpf_strtol 160 - bpf_strtoul 161 - bpf_sk_storage_get 162 - bpf_sk_storage_delete 163 - bpf_send_signal 164 - bpf_tcp_gen_syncookie 165 - bpf_skb_output 166 - bpf_probe_read_user 167 - bpf_probe_read_kernel 168 - bpf_probe_read_user_str 169 - bpf_probe_read_kernel_str 170 - bpf_tcp_send_ack 171 - bpf_send_signal_thread 172 - bpf_jiffies64 173 - bpf_read_branch_records 174 - bpf_get_ns_current_pid_tgid 175 - bpf_xdp_output 176 - bpf_get_netns_cookie 177 - bpf_get_current_ancestor_cgroup_id 178 - bpf_sk_assign 179 - bpf_ktime_get_boot_ns 180 - bpf_seq_printf 181 - bpf_seq_write 182 - bpf_sk_cgroup_id 183 - bpf_sk_ancestor_cgroup_id 184 - bpf_ringbuf_output 185 - bpf_ringbuf_reserve 186 - bpf_ringbuf_submit 187 - bpf_ringbuf_discard 188 - bpf_ringbuf_query 189 - bpf_csum_level 190 - bpf_skc_to_tcp6_sock 191 - bpf_skc_to_tcp_sock 192 - bpf_skc_to_tcp_timewait_sock 193 - bpf_skc_to_tcp_request_sock 194 - bpf_skc_to_udp6_sock 195 - bpf_get_task_stack 196 - bpf_load_hdr_opt 197 - bpf_store_hdr_opt 198 - bpf_reserve_hdr_opt 199 - bpf_inode_storage_get 200 - bpf_inode_storage_delete 201 - bpf_d_path 202 - bpf_copy_from_user 203 - bpf_snprintf_btf 204 - bpf_seq_printf_btf 205 - bpf_skb_cgroup_classid 206 - bpf_redirect_neigh 207 - bpf_per_cpu_ptr 208 - bpf_this_cpu_ptr 209 - bpf_redirect_peer 210 - bpf_task_storage_get 211 - bpf_task_storage_delete 212 - bpf_get_current_task_btf 213 - bpf_bprm_opts_set 214 - bpf_ktime_get_coarse_ns 215 - bpf_ima_inode_hash 216 - bpf_sock_from_file 217 - bpf_check_mtu 218 - bpf_for_each_map_elem 219 - bpf_snprintf 220 - bpf_sys_bpf 221 - bpf_btf_find_by_name_kind 222 - bpf_sys_close 223 - bpf_timer_init 224 - bpf_timer_set_callback 225 - bpf_timer_start 226 - bpf_timer_cancel 227 - bpf_get_func_ip 228 - bpf_get_attach_cookie 229 - bpf_task_pt_regs 230 - bpf_get_branch_snapshot 231 - bpf_trace_vprintk 232 - bpf_skc_to_unix_sock 233 - bpf_kallsyms_lookup_name 234 - bpf_find_vma 235 - bpf_loop 236 - bpf_strncmp 237 - bpf_get_func_arg 238 - bpf_get_func_ret 239 - bpf_get_func_arg_cnt