/linux/tools/testing/selftests/bpf/progs/ |
H A D | verifier_direct_packet_access.c | 19 : __imm_const(__sk_buff_data, offsetof(struct __sk_buff, data)), in __retval() 20 __imm_const(__sk_buff_data_end, offsetof(struct __sk_buff, data_end)) in __retval() 39 : __imm_const(__sk_buff_data, offsetof(struct __sk_buff, data)), in direct_packet_access_test1() 40 __imm_const(__sk_buff_data_end, offsetof(struct __sk_buff, data_end)) in direct_packet_access_test1() 73 : __imm_const(__sk_buff_data, offsetof(struct __sk_buff, data)), in direct_packet_access_test2() 74 __imm_const(__sk_buff_data_end, offsetof(struct __sk_buff, data_end)), in direct_packet_access_test2() 75 __imm_const(__sk_buff_len, offsetof(struct __sk_buff, len)) in direct_packet_access_test2() 90 : __imm_const(__sk_buff_data, offsetof(struct __sk_buff, data)) in direct_packet_access_test3() 109 : __imm_const(__sk_buff_data, offsetof(struct __sk_buff, data)), in direct_packet_access_test4_write() 110 __imm_const(__sk_buff_data_end, offsetof(struct __sk_buff, data_end)) in direct_packet_access_test4_write() [all …]
|
H A D | verifier_cgroup_skb.c | 32 : __imm_const(__sk_buff_data, offsetof(struct __sk_buff, data)), in test_1_for_cgroup_skb() 33 __imm_const(__sk_buff_data_end, offsetof(struct __sk_buff, data_end)), in test_1_for_cgroup_skb() 34 __imm_const(__sk_buff_len, offsetof(struct __sk_buff, len)), in test_1_for_cgroup_skb() 35 __imm_const(__sk_buff_mark, offsetof(struct __sk_buff, mark)), in test_1_for_cgroup_skb() 36 __imm_const(__sk_buff_pkt_type, offsetof(struct __sk_buff, pkt_type)), in test_1_for_cgroup_skb() 37 __imm_const(__sk_buff_protocol, offsetof(struct __sk_buff, protocol)), in test_1_for_cgroup_skb() 38 __imm_const(__sk_buff_queue_mapping, offsetof(struct __sk_buff, queue_mapping)), in test_1_for_cgroup_skb() 39 __imm_const(__sk_buff_vlan_present, offsetof(struct __sk_buff, vlan_present)) in test_1_for_cgroup_skb() 59 : __imm_const(__sk_buff_hash, offsetof(struct __sk_buff, hash)), in test_2_for_cgroup_skb() 60 __imm_const(__sk_buff_ingress_ifindex, offsetof(struct __sk_buff, ingress_ifindex)), in test_2_for_cgroup_skb() [all …]
|
H A D | verifier_helper_packet_access.c | 157 __imm_const(__sk_buff_data, offsetof(struct __sk_buff, data)), in cls_valid_packet_ptr_range() 158 __imm_const(__sk_buff_data_end, offsetof(struct __sk_buff, data_end)) in cls_valid_packet_ptr_range() 176 __imm_const(__sk_buff_data, offsetof(struct __sk_buff, data)) in test7_cls_unchecked_packet_ptr() 205 __imm_const(__sk_buff_data, offsetof(struct __sk_buff, data)), in packet_test8_cls_variable_add() 206 __imm_const(__sk_buff_data_end, offsetof(struct __sk_buff, data_end)) in packet_test8_cls_variable_add() 230 __imm_const(__sk_buff_data, offsetof(struct __sk_buff, data)), in packet_ptr_with_bad_range_2() 231 __imm_const(__sk_buff_data_end, offsetof(struct __sk_buff, data_end)) in packet_ptr_with_bad_range_2() 254 __imm_const(__sk_buff_data, offsetof(struct __sk_buff, data)), in ptr_with_too_short_range_2() 255 __imm_const(__sk_buff_data_end, offsetof(struct __sk_buff, data_end)) in ptr_with_too_short_range_2() 279 __imm_const(__sk_buff_data, offsetof(struct __sk_buff, data)), in test11_cls_unsuitable_helper_1() [all …]
|
H A D | verifier_lwt.c | 23 : __imm_const(__sk_buff_data, offsetof(struct __sk_buff, data)), in packet_write_for_lwt_in() 24 __imm_const(__sk_buff_data_end, offsetof(struct __sk_buff, data_end)) in packet_write_for_lwt_in() 43 : __imm_const(__sk_buff_data, offsetof(struct __sk_buff, data)), in packet_write_for_lwt_out() 44 __imm_const(__sk_buff_data_end, offsetof(struct __sk_buff, data_end)) in packet_write_for_lwt_out() 63 : __imm_const(__sk_buff_data, offsetof(struct __sk_buff, data)), in packet_write_for_lwt_xmit() 64 __imm_const(__sk_buff_data_end, offsetof(struct __sk_buff, data_end)) in packet_write_for_lwt_xmit() 83 : __imm_const(__sk_buff_data, offsetof(struct __sk_buff, data)), in packet_read_for_lwt_in() 84 __imm_const(__sk_buff_data_end, offsetof(struct __sk_buff, data_end)) in packet_read_for_lwt_in() 103 : __imm_const(__sk_buff_data, offsetof(struct __sk_buff, data)), in packet_read_for_lwt_out() 104 __imm_const(__sk_buff_data_end, offsetof(struct __sk_buff, data_end)) in packet_read_for_lwt_out() [all …]
|
H A D | exceptions.c | 46 int exception_throw_always_1(struct __sk_buff *ctx) in exception_throw_always_1() 57 int exception_throw_always_2(struct __sk_buff *ctx) in exception_throw_always_2() 63 int exception_throw_unwind_1(struct __sk_buff *ctx) in exception_throw_unwind_1() 69 int exception_throw_unwind_2(struct __sk_buff *ctx) in exception_throw_unwind_2() 75 int exception_throw_default(struct __sk_buff *ctx) in exception_throw_default() 82 int exception_throw_default_value(struct __sk_buff *ctx) in exception_throw_default_value() 89 int exception_tail_call_target(struct __sk_buff *ctx) in exception_tail_call_target() 96 int exception_tail_call_subprog(struct __sk_buff *ctx) in exception_tail_call_subprog() 105 int exception_tail_call(struct __sk_buff *ctx) { in exception_tail_call() 112 __noinline int exception_ext_global(struct __sk_buff *ctx) in exception_ext_global() [all …]
|
H A D | irq.c | 16 int irq_save_bad_arg(struct __sk_buff *ctx) in irq_save_bad_arg() 24 int irq_restore_bad_arg(struct __sk_buff *ctx) in irq_restore_bad_arg() 32 int irq_restore_missing_2(struct __sk_buff *ctx) in irq_restore_missing_2() 44 int irq_restore_missing_3(struct __sk_buff *ctx) in irq_restore_missing_3() 58 int irq_restore_missing_3_minus_2(struct __sk_buff *ctx) in irq_restore_missing_3_minus_2() 84 int irq_restore_missing_1_subprog(struct __sk_buff *ctx) in irq_restore_missing_1_subprog() 94 int irq_restore_missing_2_subprog(struct __sk_buff *ctx) in irq_restore_missing_2_subprog() 106 int irq_restore_missing_3_subprog(struct __sk_buff *ctx) in irq_restore_missing_3_subprog() 120 int irq_restore_missing_3_minus_2_subprog(struct __sk_buff *ctx) in irq_restore_missing_3_minus_2_subprog() 136 int irq_balance(struct __sk_buff *ctx) in irq_balance() [all …]
|
H A D | verifier_sock.c | 72 : __imm_const(__sk_buff_sk, offsetof(struct __sk_buff, sk)) in skb_sk_no_null_check() 90 : __imm_const(__sk_buff_sk, offsetof(struct __sk_buff, sk)), in sk_family_non_fullsock_field_1() 110 : __imm_const(__sk_buff_sk, offsetof(struct __sk_buff, sk)), in sk_sk_type_fullsock_field_1() 128 __imm_const(__sk_buff_sk, offsetof(struct __sk_buff, sk)) in sk_no_skb_sk_check_1() 149 __imm_const(__sk_buff_sk, offsetof(struct __sk_buff, sk)), in no_null_check_on_ret_1() 173 __imm_const(__sk_buff_sk, offsetof(struct __sk_buff, sk)), in sk_sk_type_fullsock_field_2() 196 __imm_const(__sk_buff_sk, offsetof(struct __sk_buff, sk)), in sk_family_non_fullsock_field_2() 220 __imm_const(__sk_buff_sk, offsetof(struct __sk_buff, sk)), in sk_sk_state_narrow_load() 244 __imm_const(__sk_buff_sk, offsetof(struct __sk_buff, sk)), in port_word_load_backward_compatibility() 268 __imm_const(__sk_buff_sk, offsetof(struct __sk_buff, sk)), in sk_dst_port_half_load() [all …]
|
H A D | map_kptr_fail.c | 25 int size_not_bpf_dw(struct __sk_buff *ctx) in size_not_bpf_dw() 40 int non_const_var_off(struct __sk_buff *ctx) in non_const_var_off() 59 int non_const_var_off_kptr_xchg(struct __sk_buff *ctx) in non_const_var_off_kptr_xchg() 78 int misaligned_access_write(struct __sk_buff *ctx) in misaligned_access_write() 94 int misaligned_access_read(struct __sk_buff *ctx) in misaligned_access_read() 108 int reject_var_off_store(struct __sk_buff *ctx) in reject_var_off_store() 132 int reject_bad_type_match(struct __sk_buff *ctx) in reject_bad_type_match() 153 int marked_as_untrusted_or_null(struct __sk_buff *ctx) in marked_as_untrusted_or_null() 168 int correct_btf_id_check_size(struct __sk_buff *ctx) in correct_btf_id_check_size() 186 int inherit_untrusted_on_walk(struct __sk_buff *ctx) in inherit_untrusted_on_walk() [all …]
|
H A D | test_global_func3.c | 9 int f1(struct __sk_buff *skb) in f1() 15 int f2(int val, struct __sk_buff *skb) in f2() 21 int f3(int val, struct __sk_buff *skb, int var) in f3() 27 int f4(struct __sk_buff *skb) in f4() 33 int f5(struct __sk_buff *skb) in f5() 39 int f6(struct __sk_buff *skb) in f6() 45 int f7(struct __sk_buff *skb) in f7() 51 int f8(struct __sk_buff *skb) in f8() 58 int global_func3(struct __sk_buff *skb) in global_func3()
|
H A D | exceptions_fail.c | 55 int reject_exception_cb_type_1(struct __sk_buff *ctx) in __exception_cb() 64 int reject_exception_cb_type_2(struct __sk_buff *ctx) in __exception_cb() 73 int reject_exception_cb_type_3(struct __sk_buff *ctx) in __exception_cb() 82 int reject_exception_cb_type_4(struct __sk_buff *ctx) in __exception_cb() 97 int reject_async_callback_throw(struct __sk_buff *ctx) in reject_async_callback_throw() 107 __noinline static int subprog_lock(struct __sk_buff *ctx) in subprog_lock() 142 __noinline static int throwing_subprog(struct __sk_buff *ctx) in throwing_subprog() 191 __noinline static int subprog_ref(struct __sk_buff *ctx) in subprog_ref() 253 static __noinline int static_func(struct __sk_buff *ctx) in static_func() 258 __noinline int global_func(struct __sk_buff *ctx) in global_func() [all …]
|
H A D | preempt_lock.c | 12 int preempt_lock_missing_1(struct __sk_buff *ctx) in preempt_lock_missing_1() 20 int preempt_lock_missing_2(struct __sk_buff *ctx) in preempt_lock_missing_2() 29 int preempt_lock_missing_3(struct __sk_buff *ctx) in preempt_lock_missing_3() 39 int preempt_lock_missing_3_minus_2(struct __sk_buff *ctx) in preempt_lock_missing_3_minus_2() 61 int preempt_lock_missing_1_subprog(struct __sk_buff *ctx) in preempt_lock_missing_1_subprog() 69 int preempt_lock_missing_2_subprog(struct __sk_buff *ctx) in preempt_lock_missing_2_subprog() 78 int preempt_lock_missing_2_minus_1_subprog(struct __sk_buff *ctx) in preempt_lock_missing_2_minus_1_subprog() 93 __success int preempt_balance(struct __sk_buff *ctx) in preempt_balance() 100 __success int preempt_balance_subprog_test(struct __sk_buff *ctx) in preempt_balance_subprog_test() 138 int preempt_global_subprog_test(struct __sk_buff *ctx) in preempt_global_subprog_test()
|
H A D | test_global_func4.c | 9 int f1(struct __sk_buff *skb) in f1() 15 int f2(int val, struct __sk_buff *skb) in f2() 21 int f3(int val, struct __sk_buff *skb, int var) in f3() 27 int f4(struct __sk_buff *skb) in f4() 33 int f5(struct __sk_buff *skb) in f5() 39 int f6(struct __sk_buff *skb) in f6() 45 int f7(struct __sk_buff *skb) in f7() 52 int global_func4(struct __sk_buff *skb) in global_func4()
|
H A D | tailcall_bpf2bpf_hierarchy2.c | 6 int classifier_0(struct __sk_buff *skb); 7 int classifier_1(struct __sk_buff *skb); 25 int subprog_tail0(struct __sk_buff *skb) in subprog_tail0() 33 int classifier_0(struct __sk_buff *skb) in classifier_0() 41 int subprog_tail1(struct __sk_buff *skb) in subprog_tail1() 49 int classifier_1(struct __sk_buff *skb) in classifier_1() 59 int tailcall_bpf2bpf_hierarchy_2(struct __sk_buff *skb) in tailcall_bpf2bpf_hierarchy_2()
|
H A D | test_tc_tunnel.c | 94 static __always_inline int __encap_ipv4(struct __sk_buff *skb, __u8 encap_proto, in __encap_ipv4() 256 static __always_inline int encap_ipv4(struct __sk_buff *skb, __u8 encap_proto, in encap_ipv4() 262 static __always_inline int __encap_ipv6(struct __sk_buff *skb, __u8 encap_proto, in __encap_ipv6() 373 static int encap_ipv6_ipip6(struct __sk_buff *skb) in encap_ipv6_ipip6() 428 static __always_inline int encap_ipv6(struct __sk_buff *skb, __u8 encap_proto, in encap_ipv6() 435 int __encap_ipip_none(struct __sk_buff *skb) in __encap_ipip_none() 444 int __encap_gre_none(struct __sk_buff *skb) in __encap_gre_none() 453 int __encap_gre_mpls(struct __sk_buff *skb) in __encap_gre_mpls() 462 int __encap_gre_eth(struct __sk_buff *skb) in __encap_gre_eth() 471 int __encap_udp_none(struct __sk_buff *skb) in __encap_udp_none() [all …]
|
H A D | test_bpf_nf_fail.c | 17 struct nf_conn *bpf_skb_ct_alloc(struct __sk_buff *, struct bpf_sock_tuple *, u32, 19 struct nf_conn *bpf_skb_ct_lookup(struct __sk_buff *, struct bpf_sock_tuple *, u32, 29 int alloc_release(struct __sk_buff *ctx) in alloc_release() 43 int insert_insert(struct __sk_buff *ctx) in insert_insert() 60 int lookup_insert(struct __sk_buff *ctx) in lookup_insert() 74 int write_not_allowlisted_field(struct __sk_buff *ctx) in write_not_allowlisted_field() 88 int set_timeout_after_insert(struct __sk_buff *ctx) in set_timeout_after_insert() 105 int set_status_after_insert(struct __sk_buff *ctx) in set_status_after_insert() 122 int change_timeout_after_alloc(struct __sk_buff *ctx) in change_timeout_after_alloc() 136 int change_status_after_alloc(struct __sk_buff *ctx) in change_status_after_alloc()
|
H A D | tailcall_bpf2bpf4.c | 31 int subprog_tail_2(struct __sk_buff *skb) in subprog_tail_2() 40 int subprog_tail_1(struct __sk_buff *skb) in subprog_tail_1() 47 int subprog_tail(struct __sk_buff *skb) in subprog_tail() 54 int classifier_1(struct __sk_buff *skb) in classifier_1() 60 int classifier_2(struct __sk_buff *skb) in classifier_2() 67 int classifier_0(struct __sk_buff *skb) in classifier_0() 73 int entry(struct __sk_buff *skb) in entry()
|
H A D | test_sk_lookup_kern.c | 56 int sk_lookup_success(struct __sk_buff *skb) in sk_lookup_success() 82 int sk_lookup_success_simple(struct __sk_buff *skb) in sk_lookup_success_simple() 94 int err_use_after_free(struct __sk_buff *skb) in err_use_after_free() 109 int err_modify_sk_pointer(struct __sk_buff *skb) in err_modify_sk_pointer() 123 int err_modify_sk_or_null_pointer(struct __sk_buff *skb) in err_modify_sk_or_null_pointer() 136 int err_no_release(struct __sk_buff *skb) in err_no_release() 145 int err_release_twice(struct __sk_buff *skb) in err_release_twice() 157 int err_release_unchecked(struct __sk_buff *skb) in err_release_unchecked() 167 void lookup_no_release(struct __sk_buff *skb) in lookup_no_release() 174 int err_no_release_subcall(struct __sk_buff *skb) in err_no_release_subcall()
|
H A D | test_tunnel_kern.c | 41 int bpf_skb_set_fou_encap(struct __sk_buff *skb_ctx, 43 int bpf_skb_get_fou_encap(struct __sk_buff *skb_ctx, 58 int gre_set_tunnel(struct __sk_buff *skb) in gre_set_tunnel() 80 int gre_set_tunnel_no_key(struct __sk_buff *skb) in gre_set_tunnel_no_key() 101 int gre_get_tunnel(struct __sk_buff *skb) in gre_get_tunnel() 117 int ip6gretap_set_tunnel(struct __sk_buff *skb) in ip6gretap_set_tunnel() 141 int ip6gretap_get_tunnel(struct __sk_buff *skb) in ip6gretap_get_tunnel() 160 int erspan_set_tunnel(struct __sk_buff *skb) in erspan_set_tunnel() 203 int erspan_get_tunnel(struct __sk_buff *skb) in erspan_get_tunnel() 239 int ip4ip6erspan_set_tunnel(struct __sk_buff *skb) in ip4ip6erspan_set_tunnel() [all …]
|
H A D | tailcall2.c | 14 int classifier_0(struct __sk_buff *skb) in classifier_0() 21 int classifier_1(struct __sk_buff *skb) in classifier_1() 28 int classifier_2(struct __sk_buff *skb) in classifier_2() 34 int classifier_3(struct __sk_buff *skb) in classifier_3() 41 int classifier_4(struct __sk_buff *skb) in classifier_4() 48 int entry(struct __sk_buff *skb) in entry()
|
H A D | test_global_func2.c | 11 int f0(int var, struct __sk_buff *skb) in f0() 17 int f1(struct __sk_buff *skb) in f1() 26 int f3(int, struct __sk_buff *skb, int); 29 int f2(int val, struct __sk_buff *skb) in f2() 35 int f3(int val, struct __sk_buff *skb, int var) in f3() 46 int global_func2(struct __sk_buff *skb) in global_func2()
|
H A D | verifier_const.c | 16 int tcx1(struct __sk_buff *skb) in tcx1() 26 int tcx2(struct __sk_buff *skb) in tcx2() 36 int tcx3(struct __sk_buff *skb) in tcx3() 46 int tcx4(struct __sk_buff *skb) in tcx4() 55 int tcx5(struct __sk_buff *skb) in tcx5() 64 int tcx6(struct __sk_buff *skb) in tcx6() 83 int tcx7(struct __sk_buff *skb) in tcx7()
|
/linux/tools/testing/selftests/bpf/verifier/ |
H A D | ctx_skb.c | 5 offsetof(struct __sk_buff, len)), 8 offsetof(struct __sk_buff, mark)), 11 offsetof(struct __sk_buff, pkt_type)), 14 offsetof(struct __sk_buff, queue_mapping)), 17 offsetof(struct __sk_buff, protocol)), 20 offsetof(struct __sk_buff, vlan_present)), 23 offsetof(struct __sk_buff, vlan_tci)), 26 offsetof(struct __sk_buff, napi_id)), 54 offsetof(struct __sk_buff, pkt_type)), 67 offsetof(struct __sk_buff, pkt_type)), [all …]
|
/linux/samples/bpf/ |
H A D | tcbpf1_kern.c | 16 static inline void set_dst_mac(struct __sk_buff *skb, char *mac) in set_dst_mac() 24 static inline void set_ip_tos(struct __sk_buff *skb, __u8 new_tos) in set_ip_tos() 37 static inline void set_tcp_ip_src(struct __sk_buff *skb, __u32 new_ip) in set_tcp_ip_src() 47 static inline void set_tcp_dest_port(struct __sk_buff *skb, __u16 new_port) in set_tcp_dest_port() 56 int bpf_prog1(struct __sk_buff *skb) in bpf_prog1() 70 int _redirect_xmit(struct __sk_buff *skb) in _redirect_xmit() 75 int _redirect_recv(struct __sk_buff *skb) in _redirect_recv() 80 int _clone_redirect_xmit(struct __sk_buff *skb) in _clone_redirect_xmit() 86 int _clone_redirect_recv(struct __sk_buff *skb) in _clone_redirect_recv()
|
H A D | test_lwt_bpf.c | 29 int do_nop(struct __sk_buff *skb) in do_nop() 36 int do_test_ctx(struct __sk_buff *skb) in do_test_ctx() 49 int do_test_cb(struct __sk_buff *skb) in do_test_cb() 60 int do_test_data(struct __sk_buff *skb) in do_test_data() 84 static inline int rewrite(struct __sk_buff *skb, uint32_t old_ip, in rewrite() 141 int do_test_rewrite(struct __sk_buff *skb) in do_test_rewrite() 160 static inline int __do_push_ll_and_redirect(struct __sk_buff *skb) in __do_push_ll_and_redirect() 185 int do_push_ll_and_redirect_silent(struct __sk_buff *skb) in do_push_ll_and_redirect_silent() 191 int do_push_ll_and_redirect(struct __sk_buff *skb) in do_push_ll_and_redirect() 202 static inline void __fill_garbage(struct __sk_buff *skb) in __fill_garbage() [all …]
|
/linux/include/linux/ |
H A D | bpf_types.h | 6 struct __sk_buff, struct sk_buff) 8 struct __sk_buff, struct sk_buff) 10 struct __sk_buff, struct sk_buff) 15 struct __sk_buff, struct sk_buff) 22 struct __sk_buff, struct sk_buff) 24 struct __sk_buff, struct sk_buff) 26 struct __sk_buff, struct sk_buff) 28 struct __sk_buff, struct sk_buff) 32 struct __sk_buff, struct sk_buff) 36 struct __sk_buff, struct bpf_flow_dissector)
|